Flasher Archive

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


Subject: RE: [flasher] checking to see if last variable has loaded
From: Paul Willoughby
Date: Thu, 15 Mar 2001 11:59:19 -0000

George Medve [george [dot] medveatwheel [dot] co [dot] uk (mailto:george [dot] medveatwheel [dot] co [dot] uk)] wrote:
> I tried placing this on to a movieclip in the scene:
>
> Variation 1)
> ============
> I created a variable called "information=complete", which is
> at the end of
> the variable list.
> (the variable is loaded into '_root.flash_db' moviclip)
>
> onClipEvent (enterFrame) {
> if (_root.flash_db.information eq "complete") {
> _parent.gotoAndPlay("registration1");
> }
> }
>
> Flash just seems to ignore this completely...I tried to place
> the same 'if'
> statement into a keyframe and have create a loop back to the
> frame and this
> does not help either.

You need to tell Flash to loop if the condition is not met. Also, you
probably want a normal equality operator as 'eq' is deprecated in Flash 5.
Assuming you've got a blank frame before where this clip appears, try
something like:

onClipEvent (enterFrame) {
if (_root.flash_db.information == "complete") {
_parent.gotoAndPlay("registration1");
} else {
_parent.gotoAndPlay(_currentFrame - 1);
}
}

I find it easier to put loading actions into frames on the main timeline, so
you could also just put this on frame 2 of your movie (again, assuming frame
1 is blank):

if (_root.flash_db.information == "complete") {
gotoAndPlay("registration1");
} else {
gotoAndPlay(_currentFrame - 1);
}

hth

paul



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