Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: FLASH: Evaluate a variable in a loop...
From: m i l e s l i g h t w o o d
Date: Mon, 20 Sep 1999 23:26:21 +0100

I've checked the docs, MACR's site, and the other usual suspects to no
avail so here it goes.

What is the best way to test a variable in a looping segment of a timeline?

For example I have this action attached to a button:

On Release
Comment: read in status.txt; typical contents: status=ok
Load Variables("status.txt",0)
Go To and Play("Submit_Loop")
end release

The contents of status.txt file is "status=ok", so ok appears on stage in
the status field variable. This field is visible in all frames of the movie.

I have a label called "Submit_Loop", that contains this frame action:

Comment: Handle ok result
If (Eval(status) = ok)
Go to and Stop ("OK")
Comment: Handle not_ok result
Else If (Eval(status) = not_ok)
Go to and Stop ("Not_OK")
Comment: Handle bad_data result
Else If (Eval(status) = bad_data)
Go to and Stop ("Bad_Data")
End If

Three frames later I have another frame with this frame action that creates
the loop:

Go to and Play("Submit_Loop")

Regardless of the value of status, the movie goes to "Bad_Data". How do I
modify
the above to have status evaluated correctly? It's probably an easy fix but
I've been unable to figure it out.

All of the above is in one bare-bones test movie with 1 main timeline and
no movie clips.

And on a side note, is there a more comprehensive resource for the syntax
of actions? The docs leave many questions unanswered.

TIA for any assistance.

Ciao,

m i l e s
_______________________________________________________________________

m i l e s l i G h T w O o d
_______________________________________________________________________
m i l e s G T O @ p o b o x . c o m
_______________________________________________________________________
multimedia development: director lingo shockwave java +1 213.353.9850



------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manageratchinwag [dot] com. Problems to: helpatchinwag [dot] com
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-manageratchinwag [dot] com


Replies
  Re: FLASH: Evaluate a variable in a loop, Nathan Dicken

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]