|
|||
|
Good Day,
I have read through most of this forum looking for answers to who to use setVariable. I have found a number of entries about the topic and they have been helpful. I have implemented the setVariable method a few times now and I always need to fiddle with it for a while before I can get it to work. Most recently I have not been able to get my most recent attempt to function. In previous attempts I found that I needed to call the ffish script and then aquire the new variable in the following frame. Is this a rule or can you aquire the the new variable in the line directly following the ffish call? Also it would be very helpful is somebody could please let me know what the restrictions are on this method? Most importanlty in my current attempt the new variable does not seem to work. I am running a loop which is contantly checking the value and it never gets set. I am using the following code in my script. var videoFileName = new String(fileGUID + ".swf"); Dialogs.msgBox( "videoFileName: " + videoFileName, "MLP Pro Edition", 64 ); FlashPlayer.setVariable("VideoFileName", videoFileName); As you can see I display the value of the field before I call the setVariable method to make sure that the text value is set correctly, and it is. The "fileGUID" is a string as well. Please help |
|
|||
|
I experienced the same thing earlier.
I reckon you have written the setVariable command in the initialize script. That didn't work for me either. I guess the Flashplayer is created after the initialize script returns 'true', so any FlashPlayer.setVariable command doesn't have any effect there, because at that time there isn't any FlashPlayer. This is what you should do: 1.Put the FlashPlayer.setVariable command in another Ffishcommand. (for example: TransferVars) 2. In the first frame of your flashmovie call for the Ffishcommand.(FSCommand("FFish_Run","TransferVars" ) Maybe there are other (simpler) ways. But that worked for me. |
|
|||
|
Thanks for the quick reply on this matter. I should have mentioned before that I am not using the initialize script here. I read some articles on this forum that let me to believe the same thing you said. I am using a script named "GetFileName" and I am calling it from the first frame of my movie.
Any thoughts on what else it might be? |
|
|||
|
Hi, please look into the sample
http://www.swfkit.com/download/samples/setvar.zip |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|