Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | Re: FLASH: How do I read the value of a variable? |
From: | Muzak |
Date: | Thu, 14 Dec 2000 00:06:03 GMT |
A common problem when loading variables from a text file, is that you can't do anything with those variable values in the same
keyframe, since the variables might not be loaded yet.
So, my guess is that using an onClipEvent (enterFrame) action for loading the textfile is not a good idea. Or maybe use a timer, to
build in a pause.
Also consider the browser caching the textfile, so updates might not show up, it will just load from the cache. Using a random
number with the loadvariables is a possible solution.
hth,
Muzak
----- Original Message -----
From: "Colleen Appleton" <listgoldlink [dot] com>
To: <flasherchinwag [dot] com>
Sent: Thursday, December 14, 2000 12:32 AM
Subject: FLASH: How do I read the value of a variable?
> Hello Flashers,
>
> I'm stumped on this and have tried every possible combo I can but it's not
> working. I have a movie clip called getStatus with a dynamic field called
> txtStatus.
>
> The actions for getStatus are:
>
> // reads the text file.
> onClipEvent (load) {
> loadVariables ("alert_status.txt", "");
> }
> // Dynamically updates the results if the text file changes.
> onClipEvent (enterFrame) {
> loadVariables ("alert_status.txt", "");
> // If the results is normal, then send the playhead to frame label normal.
> If it reads HIGH, send it to label high.
> // If it reads low, send to label low.
> if (txtStatus == "NORMAL") {
> tellTarget ("_root") {
> gotoAndStop ("normal");
> }
> }
> }
>
> The question is, how do we get the result of alert_status.txt to use in our
> if.. script? The value will be either: NORMAL, HIGH, or LOW. If it sees
> the word normal, the playhead needs to jump to the main timeline called
> "normal". etc. The text file is updated constantly but will only display
> one of those values. If say the value changes from NORMAL, to HIGH, then
> the playhead has to jump to the label "high" and the script loops there
> until the status changes again.
>
> The text displays dynamically as planned, but I can't grab the results and
> direct the script in an if statement.
>
> Any help would be appreciated!
>
> Colleen
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and the Flash(tm) Film Festival
November 27-29, 2000, LONDON, National Film Theatre
Produced by United Digital Artists and lynda.com
-Sponsored by Macromedia, Adobe Systems and Apple Computer
-http://www.flashforward2000.com or UK tel. +44 (0870) 751 1526
Register before November 10 and save �200
http:// www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
Replies
FLASH: getURL from Flash as QTMovie in D, Stephen Recker
FLASH: How do I read the value of a vari, Colleen Appleton
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]