A Flash Developer Resource Site

Results 1 to 3 of 3

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

  1. #1
    Junior Member
    Join Date
    Jul 2000
    Posts
    5
    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?

  2. #2
    Junior Member
    Join Date
    Jul 2000
    Posts
    11
    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.

  3. #3
    Junior Member
    Join Date
    Jul 2000
    Posts
    5
    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 .

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center