Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-11-2009, 05:27 PM
Junior Member
 
Join Date: May 2009
Posts: 6
Default trouble using Ffish script objects synchronously in AS2/3

Hello, I got trouble. I use the following code in AS as a button
on(release){
import SWFKit.*;
Encryption.decFile("aaa", "a.swf", "b.swf");
loadMovie("b.swf", "_root.container"):
}

I got the following error messages when testing the app,
**Error** C:\Program Files\SWFKit Pro 3\Classes\BaseObj.as: Line 8: There is no method with the name 'flash'.
var ret = ExternalInterface.call("ffish_new", objName);
**Error** C:\Program Files\SWFKit Pro 3\Classes\BaseObj.as: Line 20: There is no method with the name 'flash'.
ExternalInterface.call("ffish_delete", this.Identifier);
**Error** C:\Program Files\SWFKit Pro 3\Classes\BaseObj.as: Line 26: There is no method with the name 'flash'.
ExternalInterface.addCallBack(handlerName, this, handler);
**Error** C:\Program Files\SWFKit Pro 3\Classes\BaseObj.as: Line 27: There is no method with the name 'flash'.
ExternalInterface.call("ffish_seh", this.Identifier, event, handlerName);

I use Flash 8 and SwfKit Pro 3. Could anyone help me, please ? Thanks before
Reply With Quote
  #2 (permalink)  
Old 05-11-2009, 05:30 PM
Junior Member
 
Join Date: May 2009
Posts: 6
Default continue

FYI, I did not use any variable name 'flash' in my script. Thanks
Reply With Quote
  #3 (permalink)  
Old 05-14-2009, 11:32 AM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default

You don't need to encrypt and decrypt swf files by yourself, as swfkit can do it for you transparently.

The problem is very strange. Can you call ExternalInterface directly in your fla file?
Reply With Quote
  #4 (permalink)  
Old 05-23-2009, 07:29 AM
Junior Member
 
Join Date: May 2009
Posts: 6
Default

I call the encrypt/decrypt function of Swfkit from AS, because in tutorial I found that I could call the Swfkit functions from AS. I already did all the procedures such as
- Setting the class path for ActionScript 2/3
- Defining hot keys for SWFKit plug-in commands
- Attaching to a SWFKit project
But when I try the example provided by tutorial
on (click)
{
import SWFKit.*;

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

}
I got the same error. I already upgrade to Flash 9 and AS3 but the error still exist. Is it really possible to call Swfkit functions from AS? Or Could you please provide more help in setting the flash so that I could call the Swfkit functions using AS? Thanks
Reply With Quote
  #5 (permalink)  
Old 05-23-2009, 07:35 AM
Junior Member
 
Join Date: May 2009
Posts: 6
Default

Quote:
Originally Posted by SWFKit View Post
Can you call ExternalInterface directly in your fla file?
When I call the ExternalInterface directly like the following
import flash.external.*;

var isAvailable:Boolean = ExternalInterface.available;
trace(isAvailable);

I got the result undefined. Do you have any suggestions?
Thanks
Reply With Quote
  #6 (permalink)  
Old 05-26-2009, 01:50 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default

It's possible for the avialable property. However, have you tried other methods?
Reply With Quote
  #7 (permalink)  
Old 05-26-2009, 02:39 PM
Junior Member
 
Join Date: May 2009
Posts: 6
Default

Quote:
Originally Posted by SWFKit View Post
It's possible for the avialable property. However, have you tried other methods?
Thans, I've already found the problem. It is because I published it for flash player 7. When I publish for flash player 8, everything works perfect. Thanks a lot.
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 02:54 PM.


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.