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:59:59 GMT

Ok, I'll bite my tongue.
I just tried your action and it seems to work just fine. I changed it a bit, so that whatever the value of txtStatus is, that's
where the main timeline will go to.

onClipEvent (enterFrame) {
loadVariables ("alert_status.txt", this);
// 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 != null) {
_root.gotoAndStop(txtStatus);
}
}

In the main timeline, three labels: low, normal, high.

There's still the browser cache problem though. Adding a random variable to the loadvariables () is not a good idea, since it will
keep adding the textfile to the browser cache. This might lead to a crash, or at least a huge temp internet folder after a few
minutes :-).

Muzak
----- Original Message -----
From: "Colleen Appleton" <listatgoldlink [dot] com>
To: <flasheratchinwag [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 helpatchinwag [dot] com
>
>
>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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 helpatchinwag [dot] com


Replies
  SOLVED - Re: FLASH: How do I read the va, Colleen Appleton

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]