next up previous contents
Next: Calling methods written in Up: Using FFish script objects Previous: Wrapping ActiveX components   Contents

Differences between wrapper classes for actionscript 2 and actionscript 3

The wrapper classes for actionscript 2 are in the ``classes'' sub folder of the swfkit installed folder, while the wrapper classes for actionscript 3 are in the ``classes 3'' sub folder of the swfkit installed folder. The two sets of classes have same objects, methods, properties and events. However, there are some differences between them.

First, the ActiveXObject class for actionscript 3 can access any method or property of the ActiveXObject object it wraps; whereas, the ActiveXObject class for actionscript 2 can only access properties of the ActiveXObject it wraps.

Second, except the Global class, the sound.playback class and the sound.recording class, all wrapper classes for actionscript 3 have no static methods or properties. That is to say, you will have to first create a new instance of the class before you can call its methods, even if the methods in ffish script is static. For example, in actionscript, you can show a message box by calling ``Dialogs.msgBox(``Hello world'');'', while in actionscript 3, you will have to create an instance of the ``Dialogs'' class first. For example

import SWFKit.*;
var dlg = new Dialogs;
dlg.msgBox("hello world");
dlg.Release();


next up previous contents
Next: Calling methods written in Up: Using FFish script objects Previous: Wrapping ActiveX components   Contents
Copyright ©2000-2007 Shanghai TopCMM Software Technologies. All Rights Reserved.