I am having trouble understanding the order Flash choses to execute code
for what I would think would be a simple case.
Consider the following experiments:
1) Create an application with two frames. Attach AS code to each
frame, say:
Frame 1: trace("inside 1") ;
Frame 2: trace("two") ;
It now happily alternates the traces statements for ever as the movie
starts over after completing frame2.
2) Now, just create an application with one frame and
attach AS code to the frame:
trace("hi") ;
Flash only plays this ONCE in the output window. Shouldn't flash print
"hi" out over and over? Why not? Does it not restart the movie after
completing frame one, and hence play frame 1 again, and again...
3) Trying to figure this out I thought maybe it had something to do
with trace and ctrl-enter versus "publishing" the movie. So I created
a dynamic text box and did the same one frame versus two frame example.
Same behavior.
4) I then tried displaying the time (in seconds) by creating
Date() objects in frames 1 and 2, works great, but if only
one frame exists it prints out the time once and never runs the code
again.
5) I tried the one frame example and created an onEnterFrame event,
sticking the time display code inside the function. Sure enough, it
keeps updating the time, so even though there is only one frame, it
presumably keeps playing that frame over and over and runs the
onEnterFrame code. This seems to me to be at odds with (2) above?!
*** Could someone explain this behavior? What am I missing? Why if I
just have one frame does that frame not get re-executed?
Note, there are no stop() or play() command anyplace, no other
movieClips, super simply just a few lines of AS code inside one or two
frames.
Thanks much,
Scott
--
leut
------------------------------------------------------------------------
leut's Profile:
http://www.24help.info/member.php?userid=336 View this thread:
http://www.24help.info/showthread.php?t=447130 24help.info - IT Newsgroups @
http://www.24help.info