Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-01-2007, 09:59 PM
Junior Member
 
Join Date: Jun 2005
Posts: 22
Default Global.createControl Help

Hi all;

I did this:

import SWFKit.*;


mplayer = Global.createControl("WMPlayer.OCX.7",0,0,200,200) ;
mplayer.activex.URL = Global.getAppDir() + FileName;


the control will be created but the URL does not work !

What is the mistake plese reply soooooon

Thank you in advance
Reply With Quote
  #2 (permalink)  
Old 10-03-2007, 05:01 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: Global.createControl Help

You must be working with actionscript 2. In actionscript 2 you must use a wrapper class for the ActiveX component to call its properties and methods directly. If you do not want to use wrapper classes, you must call its properties in the way shown in the following code

Code:
mplayer.activex.setProperty("url", Global.getAppDir() + FileName);
Reply With Quote
  #3 (permalink)  
Old 12-20-2007, 07:34 AM
Junior Member
 
Join Date: Dec 2007
Posts: 5
Default Re: Global.createControl Help

I have the very same problem, but im using Flash 9 and AS3, i try both ways and none of them work.

import SWFKit.*;
var pdf = new Global();
pdf.createControl("vspdfviewerx.vspdfviewer", 100, 0, 1024, 768);
pdf.activex.setProperty("Load", "c:\\my.psd","");

If i a wrapper is required, could you plz explain where exactly to put it, im not much into classes and packages. I have read the help file, but i dont knowwhere to place the example.
Reply With Quote
  #4 (permalink)  
Old 12-20-2007, 12:23 PM
Junior Member
 
Join Date: Dec 2007
Posts: 5
Default Re: Global.createControl Help

Help files are screw up!. None of the examples work. I have tried everything, and i cant get it to execute anything. The only way to do it is if i do it in FFish. Could you plz post something that actually works for AS3.

And yes i created the wrapper!.

import SWFKit.*;
function strace(value)
{
SWFKit.Global.trace(value);
}

var ax = new SWFKit.Global();
ax.createControl("vspdfviewerx.vspdfviewer", 100, 0, 1024, 768);
var pdf = new SWFKit.PDFViewer.fromID(ax.activex);
Reply With Quote
  #5 (permalink)  
Old 12-25-2007, 07:42 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re: Global.createControl Help

SWFKit wrapper classes for as3 are based the Proxy object, so they support dynamic methods and properties.

Code:
import SWFKit.*;
function strace(value)
{
  SWFKit.Global.trace(value);
}

var ax = SWFKit.Global.createControl("vspdfviewerx.vspdfviewer", 100, 0, 1024, 768);
var pdf = ax.activex;
pdf.load("c:\\my.psd");
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 04:33 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.