|
|||
|
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? |
|
|||
|
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. |
|
|||
|
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)
{
...
}
fscommand("ffish_eval", "addUser('peter');"); |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|