next up previous contents
Next: About the trace method Up: Using FFish script objects Previous: Attaching to a SWFKit   Contents

Adding functions, preview, and testing

After the current flash project is attached to a SWFKit project, you can begin to call FFish script in your flash project. For example, to launch a file open dialog by click a button.
on (click)
{
    import SWFKit.*;

    var file = Dialog.fileOpen("All files(*.*)|*.*|");
    if (file)
    {
        _root.strace(file);
    }

Now we can check whether the code could work by running the "swfkit_previewapp" command, which is used to preview an .exe file, whereas the "swfkit_previewscr" command is used to preview a .scr file. After running the command, the preview window is displayed and the output messages are displayed in the output panel of Flash 8. The "swfkit_previewapp" command will also display a floating information panel. If the preview window is freezing, you can kill it by closing the information panel. The "x" button of the information panel will appear about 30 seconds after the preview window is launched. However, if the preview window works well, please do not kill it by closing the information panel, because the preview window would have no chance to remove temporary folder or release memory if it is killed. So normally you should first close the preview window and then the information panel will disappear automatically.

Figure 1.7: Calling FFish Script directly in Action Script
Image t15
Similarly, you can run the "swfkit_testapp" command to build the output .exe file, launch and test it. As you can see, most of your developing works can be done directly in Flash 8.


next up previous contents
Next: About the trace method Up: Using FFish script objects Previous: Attaching to a SWFKit   Contents
Copyright ©2000-2007 Shanghai TopCMM Software Technologies. All Rights Reserved.