Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-17-2004, 03:51 PM
Junior Member
 
Join Date: Mar 2004
Posts: 3
Default Please help me with setVariable

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
Reply With Quote
  #2 (permalink)  
Old 03-17-2004, 04:57 PM
Senior Member
 
Join Date: Feb 2003
Posts: 212
Default Re:Please help me with setVariable

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.
Reply With Quote
  #3 (permalink)  
Old 03-17-2004, 06:08 PM
Junior Member
 
Join Date: Mar 2004
Posts: 3
Default Re:Please help me with setVariable

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?
Reply With Quote
  #4 (permalink)  
Old 03-17-2004, 10:49 PM
Junior Member
 
Join Date: Mar 2004
Posts: 3
Default Re:Please help me with setVariable

If anybody can help me out here that would be just great. I really need to find a solution to this problem as soon as posible.
Reply With Quote
  #5 (permalink)  
Old 03-18-2004, 01:54 PM
Junior Member
 
Join Date: Feb 2004
Posts: 14
Default Re:Please help me with setVariable

Hi, please look into the sample
http://www.swfkit.com/download/samples/setvar.zip
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 05:56 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.