Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
| Subject: | RE: [flasher] RE: checking to see if last variable has loaded |
| From: | Paul Willoughby |
| Date: | Fri, 16 Mar 2001 11:16:01 -0000 |
Yes but 'onClipEvent(enterFrame)' creates an automatic loop within the
clip's scope not on the main timeline. It doesn't stop the clip's timeline
or main timeline from playing. If you want a clip to not do anything until a
condition is met in a enterFrame clip event, you need a stop action on the
first frame in the clip. If you want to pause the main timeline until a
condition is met you're best bet is a frame loop. An enterFrame clipEvent
just says 'do this every frame, *regardless of what's going on in the rest
of the movie*'. For that reason there are still many situations where a
frame loop makes more sense.
It's difficult to solve your problem without a bit more info. I'm guessing
that you want to wait until all the information is loaded , then go to a
frame labelled "registration1" on the main timeline. If that's the case you
need to tell the main timeline to go back a frame if the condition you're
testing is not met, because the main timeline plays regardless of any clips
'on(enterFrame)' actions.
Or do you want the clip these actions are on to wait until the data is
loaded then go to "registration1", which is a label in that clips timeline?
If that's the case you need a stop action in the first frame of that clip as
it will play regardless of the enterFrame action. The problem with this is
that now, because information == complete, every frame that clip will try to
go and play "registration1", unless you set the variable information to "".
By loading actions I mean the actual looping while you wait for data or a
movie to load. I prefer to put these in frames because, as i explain above,
if you use enterFrame to check for an end of file variable you then have to
reset that variable so the clip won't keep performing the action associated
with it once the data is loaded. This gets even more hairy with loading
movies because there's no eof variable so once a condition is satisfied
(like '__bytesLoaded == _totalBytes') you would have to set another variable
to say 'ignore that enter frame action when the movies loaded', which is
messy and also means an enterFrame action is left eating CPU unneccesarily.
IMHO a loading action is something you want to do and then discard, so you
do it in frames then move on when it's completed.
You did say you tried a frame loop before, so what code did you use for
that? It would help to know a bit more about the structure of your movie to
give a definite answer.
The 'eq' vs '==' isn't really an issue, it's just that in Flash 5 '==' is
the equality operator for strings and numbers. 'eq' is deprecated which
means if it's gone in Flash 6 your movie won't work.
paul
> -----Original Message-----
> From: George Medve [george [dot] medve
> Sent: 15 March 2001 17:38
> To: flasher from chinwag
> Subject: [flasher] RE: checking to see if last variable has loaded
>
>
>
>
> onClipEvent (enterFrame) This command automatically loops (create a
> simple counter and trace the result, you will see), there is
> no need to tell
> frames to loop. (Paul, you will notice that I mentioned that
> I tried that
> already.)
>
> I have used 'eq' because I am dealing with a string, I have
> tried "==" with
> no luck...but this way I am telling Flash that this IS a
> string to compare.
>
> Loading actions? It don't matter where I have them surely,
> button, keyframe
> or on clip?
>
>
> Cheers.
>
> G.
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]

