<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Flash execution order: introduction</title>
	<atom:link href="http://www.bunnyhero.org/2006/10/04/flash-execution-order-introduction/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bunnyhero.org/2006/10/04/flash-execution-order-introduction/</link>
	<description>Notes on Flash and Web development</description>
	<pubDate>Sat, 22 Nov 2008 00:53:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: bunnyhero</title>
		<link>http://www.bunnyhero.org/2006/10/04/flash-execution-order-introduction/#comment-30</link>
		<dc:creator>bunnyhero</dc:creator>
		<pubDate>Tue, 27 Feb 2007 19:51:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.bunnyhero.org/2006/10/04/flash-execution-order-introduction/#comment-30</guid>
		<description>morghen: very interesting! Thanks for the tip. I'll have to try that out.</description>
		<content:encoded><![CDATA[<p>morghen: very interesting! Thanks for the tip. I&#8217;ll have to try that out.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: morghen</title>
		<link>http://www.bunnyhero.org/2006/10/04/flash-execution-order-introduction/#comment-28</link>
		<dc:creator>morghen</dc:creator>
		<pubDate>Tue, 27 Feb 2007 09:59:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.bunnyhero.org/2006/10/04/flash-execution-order-introduction/#comment-28</guid>
		<description>Actually for your interest I've discovered that flash player 9 and flash player 8 behave differently…</description>
		<content:encoded><![CDATA[<p>Actually for your interest I&#8217;ve discovered that flash player 9 and flash player 8 behave differently…</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aidan Fraser</title>
		<link>http://www.bunnyhero.org/2006/10/04/flash-execution-order-introduction/#comment-9</link>
		<dc:creator>Aidan Fraser</dc:creator>
		<pubDate>Wed, 31 Jan 2007 13:11:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.bunnyhero.org/2006/10/04/flash-execution-order-introduction/#comment-9</guid>
		<description>Yeah, how about that Flash, huh? Pretty screwy if you ask me.

I'm doing some experimentation at the moment to try and figure out the execution cycle of onEnterFrame events and frame scripts, especially when there are chained gotoAndPlay calls floating about.

The execution model I've come up is a little bit shaky, but it's best I've been able to come up with so far.

1. onEnterFrame events are executed.
2. Frame scripts are executed.
3. If one or more gotoAndPlay was called by step 2, go to the last frame requested and repeat step 2.
4. Render the frame. (Delay?)
5. Advance the current frame.

It's helpful to remember that this is conceptually a cycle, not a list, so there isn't really a 'step 1'. However, I'm pretty certain that onEnterFrame events get executed before Frame scripts, and that rendering happens after frame scripts, but before onEnterFrame events. (If you disagree, think about how onEnterFrame events are only executable once defined in frame scripts...)

It's also interesting to note that onEnterFrame events seem to execute even if the movieclip is not playing. If you declare an onEnterFrame function and call stop() in the frame script, the function will continue to be executed once every frame. I didn't expect this, but the documentation says that onEnterFrame is "Invoked repeatedly at the frame rate of the SWF file" so I'll let that one slide without too much grizzling.

I'm sure I'll come back to this post in a week or so and laugh at these ideas. (I'm looking forward to it.) It'd be great if anyone could help me figure this out, or point to some resource.</description>
		<content:encoded><![CDATA[<p>Yeah, how about that Flash, huh? Pretty screwy if you ask me.</p>
<p>I&#8217;m doing some experimentation at the moment to try and figure out the execution cycle of onEnterFrame events and frame scripts, especially when there are chained gotoAndPlay calls floating about.</p>
<p>The execution model I&#8217;ve come up is a little bit shaky, but it&#8217;s best I&#8217;ve been able to come up with so far.</p>
<p>1. onEnterFrame events are executed.<br />
2. Frame scripts are executed.<br />
3. If one or more gotoAndPlay was called by step 2, go to the last frame requested and repeat step 2.<br />
4. Render the frame. (Delay?)<br />
5. Advance the current frame.</p>
<p>It&#8217;s helpful to remember that this is conceptually a cycle, not a list, so there isn&#8217;t really a &#8217;step 1&#8242;. However, I&#8217;m pretty certain that onEnterFrame events get executed before Frame scripts, and that rendering happens after frame scripts, but before onEnterFrame events. (If you disagree, think about how onEnterFrame events are only executable once defined in frame scripts&#8230;)</p>
<p>It&#8217;s also interesting to note that onEnterFrame events seem to execute even if the movieclip is not playing. If you declare an onEnterFrame function and call stop() in the frame script, the function will continue to be executed once every frame. I didn&#8217;t expect this, but the documentation says that onEnterFrame is &#8220;Invoked repeatedly at the frame rate of the SWF file&#8221; so I&#8217;ll let that one slide without too much grizzling.</p>
<p>I&#8217;m sure I&#8217;ll come back to this post in a week or so and laugh at these ideas. (I&#8217;m looking forward to it.) It&#8217;d be great if anyone could help me figure this out, or point to some resource.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
