|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi,
I am not sure how to use setVariable in the script. I want some variables from the script to be placed on the first page of my exe. I tried writing it in a script and called the script from flash. But my program does not go into the script file. I have a trace and it doesnt do the trace. In my flash I have the command like fscommand("FFish_Run", "script1") _root.textVariable = textVariable; In my script1 I have textVar = new String("hello"); trace(textVar ); FlashPlayer.getVariable("_root.textVariable", textVar ) However, when I preview my application I do not get the trace and instead it says script1 not found. Then I replaced the call as Ffishcommand.fscommand("FFish_Run", "script1"); Now it does not complain that the script does not exist, but still I do not get the trace. I want my variables to be loaded when the flash movie opens. I am not sure how to do this. Any help is appreciated. Thanks Bharathy |
|
|||
|
If you're using as2 or as3, and swfkit 3, it's highly recommended that you use the external interface instead of the fscommands.
Say you've a function in ffish script, returning a string: Code:
function myFSFunc(param1)
{
var str;
...
return str;
}
Code:
textField1.value = ExternalInterface.call("myFSFunc", param1);
|
|
|||
|
Thank you for the response. I placed my code inside script1. My flash did not seem to call script1. Therefore, I moved my function from script 1 to Initialize and even then it does not seem to call the script from my action script. What do I need to do for my as2 code to call the script? I exactly copied and pasted the above code to see if it printed something, but with no luck. I use swf 3.2. My problems seems to be in action script code not calling the script. Am I missing some steps?
Thank you Bharathy Last edited by bharkan; 06-25-2009 at 07:38 AM. |
|
|||
|
Thank you I got it working. I imported the class. I also found another problem. I had set the preference and classPath but for some reason when I logged in as another user, the settings were gone and hence I couldnt get it to do anything. When I checked with the previous user's id it works fine.
Thanks for the help. |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|