Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
| Subject: | Re: FLASH: Variables in MC unchanged by Load Variables |
| From: | Max Kreilein |
| Date: | Tue, 7 Dec 1999 13:35:16 GMT |
"DeJarnett, Gary" wrote:
>
> All within a movie clip with an instance named Library I have:
>
> A loop to initialize an array of variables as follows:
>
> Set Variable: "Counter" = 1
> Loop While (Counter < 50)
> Set Variable: "/Library:name" & Counter = "a"
> Set Variable: "Counter" = Counter + 1
> End Loop
>
> I?ve confirmed with a trace that this initializes name1, name2, etc? within
> this instance to ?a?.
>
> I then have the following load variables statement:
>
> Load Variables ("test.asp", "/Library", vars=POST)
> The test.asp page simply has:
> Response.Write("&name1=Gary&name2=Austin&name3=Grant&") for testing right
> now.
>
> This also works properly, and now here is the output from List Variables
> when I play the movie:
>
> Variable _level0/Library:name1 = "Gary"
> Variable _level0/Library:name2 = "Austin"
> Variable _level0/Library:name3 = "Grant"
> Variable _level0/Library:name4 = "a"
>
> Now, I want to move values from this array to another array. Here is my
> other loop within the same movie clip:
>
> Set Variable: "Menu1Items" = 3
> Set Variable: "Counter" = 0
> Loop While (Counter < Menu1Items)
> Set Variable: "Counter" = Counter + 1
> Set Variable: "/Library:Menu1Item" & Counter = Eval("/Library:name" &
> Counter)
> Trace (Eval("/Library:name" & Counter)) <-- this statement yields ?a?,
> but should be ?Gary? according to the list variables above
> Trace (Eval("/Library:Menu1Item" & Counter))
> End Loop
>
> Here is my problem. At this point, I?m expecting Menu1Item1 to be ?Gary?,
> etc?, but instead, here is the result of my list variables:
>
> Variable _level0/Library:Menu1Item1 = "a"
> Variable _level0/Library:Menu1Item2 = "a"
> Variable _level0/Library:Menu1Item3 = "a"
>
> As you can see, the loop did assign a new value to each menu item, but the
> menu items were assigned the original values of the array, not the new
> values which were loaded from the ASP page. I?ve tried this without
> initializing the values, and in that case, the menu items are all null.
>
> If you have had a similar experience, or can see what I?m missing, I would
> appreciate any response.
Did you include a loop to wait for the variables to be retrieved
completely from the ASP ? Otherwise they might be retrieved correctly
but to late to be taken into consideration .
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Streaming Media WEST '99 Conference & Exhibition
"The Worlds largest Internet Audio & Video Event"
December 7 - 9, San Jose Convention Center, California
Reserve your space today at http://www.streamingmedia.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email help
Replies
FLASH: Variables in MC unchanged by Load, DeJarnett, Gary
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]

