Flasher Archive

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


Subject: RE: FLASH: BUG? (is: handler execution)
From: John Dowdell
Date: Mon, 14 Aug 2000 23:59:19 +0100

At 2:55 PM 8/14/0, Jason Bouwmeester quote'n'wrote:
> > I wonder why this script always jumps to flame 5?
> >
> > (frame1)
> > Set Variable: "i" = 3
> > If (i = 3)
> > Go to and Stop (3)
> > End If
> > Go to and Stop (5)
>
>
> Try doing:
> If (i = 3)
> Go to and Stop (3)
> Else
> Go to and Stop (5)
> End If


I'd go with this too... if you want an ELSE, then might as well use it.... ;-)

I haven't tested this in Macromedia Flash myself, but it seems similar to
what we see in Lingo and other languages: a handler fully executes, and a
navigational change does not prevent this.

In BASIC you would actually jump immediately to new code on that "GoTo"
command, because "goTo" there moves around various blocks of code. In a
procedural language "goTo" moves the execution point in the big mass of
executable lines.

In an event-driven language like Lingo or ActionScript, a "goTo" moves the
playback head. It doesn't stop the rest of the script from executing. Even
though the playback head moves to frame 3 in one command, it immediately
moves to frame 5 in the next command.

I haven't tested fully against this in Macromedia Flash myself yet, but
what you describe seems consistent in other event-based environments. Does
this ring true for you, too...?

Summary: A "goTo" moves the playback head, but handlers still execute fully.

jd





John Dowdell, Macromedia Tech Support, San Francisco CA US
Search technotes: http://www.macromedia.com/support/search/
Offlist email risks capture by the spam filters. I may not see your
email if it's not on the list. Private one-on-one email options are
available via Priority Access: http://www.macromedia.com/support/



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Full flasher archive now available online at:
http://www.chinwag.com/flasher/archive.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  Odp: FLASH: BUG? (is: handler execution, axel

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