PDA

Click to See Complete Forum and Search --> : How can I make sure "Load Variables" is completed? ?



jackcat
07-24-2000, 01:42 AM
I want to load a variable from a cgi program by
"Load Variables" command, and in the next frame
I want to use this variable . But sometime because
"Load Variable" command is delayed by the network
transmission ( espectially in the first time I visited
the swf file), the variable is still not loaded when
the next frame is running.

How can I make sure "Load Variables" is completed?

scrollo
07-24-2000, 05:03 AM
Hi there,

You have a three frame sequence. In the first frame you load the variables. Leave the second frame blank (blank keyframe). In the third frame put a check (i.e. if you're loading variables and one of them is Poo, do the following)

Frame 1: Load Variables
Frame 2: Blank
Frame 3: if (Poo eq "")
GoTo and Play 2

This will cycle through frames 2 and 3 until the variable Poo has been set. It is important that you don't go back to frame 1 because this will keep trying to load the variables again which can get nasty. To make this more sturdy implement a timeout in frame 3 (i.e. a count that goes to frame1 after a certain number of times).

Hope this helps.

jackcat
07-24-2000, 06:35 AM
Originally posted by scrollo
Hi there,

You have a three frame sequence. In the first frame you load the variables. Leave the second frame blank (blank keyframe). In the third frame put a check (i.e. if you're loading variables and one of them is Poo, do the following)

Frame 1: Load Variables
Frame 2: Blank
Frame 3: if (Poo eq "")
GoTo and Play 2

This will cycle through frames 2 and 3 until the variable Poo has been set. It is important that you don't go back to frame 1 because this will keep trying to load the variables again which can get nasty. To make this more sturdy implement a timeout in frame 3 (i.e. a count that goes to frame1 after a certain number of times).

Hope this helps.


Thank you very much. I will try it .