Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-22-2004, 12:10 PM
Member
 
Join Date: May 2003
Posts: 35
Default FFish_Eval

I want to call a SWKit function from Flash and pass parameters to it at the same time so I used:
FSCommand("FFish_Eval", "{addUser}(userObj);")
Where addUser is the function and userObj is the parameter.


In SWFKit trace window I get this:
FSCommand("FFish_Eval", "{addUser}(userObj);")
Warning: using undefined variable "addUser"
Warning: using undefined variable "userObj"

Why?
Reply With Quote
  #2 (permalink)  
Old 10-22-2004, 01:59 PM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re:FFish_Eval

I mostly use


Code:
FSCommand("FFish_Eval", "addUser('userObj')")
and it works for me
Reply With Quote
  #3 (permalink)  
Old 10-22-2004, 03:11 PM
Member
 
Join Date: May 2003
Posts: 35
Default Re:FFish_Eval

Nope,

It doesn't work for me. I get this when I run it:
FSCommand("FFish_Eval", "addUser('userObj')")
Warning: using undefined variable "addUser"
Warning: call a undefined function

The addUser function does exist and works fine when I use FFish_run. I'm trying to use FFish_eval so I won't have to transfer variables to SWFKit.

Would it be possible that the problem is caused by the parameter which is an Object?

Does the object has to exist in SWFKit before the call is made?

Thankx for your help.
Reply With Quote
  #4 (permalink)  
Old 10-26-2004, 12:48 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default Re:FFish_Eval

The "FFish_Eval" is used to run FFish script code, not a ffish script.

'addUser' must be a function in your script. E.g. In "initialize" script

Code:
function addUser(username)
{
    ...
}
Then you call it in Action script
fscommand("ffish_eval", "addUser('peter');");
Reply With Quote
  #5 (permalink)  
Old 10-26-2004, 02:19 PM
Member
 
Join Date: May 2003
Posts: 35
Default Re:FFish_Eval

Function not script.

Make sense.

Thankx for the pointer.
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 03:27 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.