<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Replacing ENTER_FRAME</title>
	<atom:link href="http://alecmce.com/as3/replacing-enter_frame/feed" rel="self" type="application/rss+xml" />
	<link>http://alecmce.com/as3/replacing-enter_frame</link>
	<description>Coding on the Flash Platform</description>
	<lastBuildDate>Thu, 11 Mar 2010 04:57:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: cambiata</title>
		<link>http://alecmce.com/as3/replacing-enter_frame/comment-page-1#comment-215</link>
		<dc:creator>cambiata</dc:creator>
		<pubDate>Sat, 30 Jan 2010 19:23:01 +0000</pubDate>
		<guid isPermaLink="false">http://alecmce.com/?p=552#comment-215</guid>
		<description>Hi Alec!&lt;br&gt;&lt;br&gt;Thank you for sharing.&lt;br&gt;&lt;br&gt;As your code example doesn&#039;t &quot;do&quot; anything, maybe the following change/addition to your could clarify it, for Signal newbees like me...:&lt;br&gt;&lt;br&gt;public function init():void		{&lt;br&gt;	// functionality here...&lt;br&gt;	trace(&#039;init&#039;);&lt;br&gt;	frame.add(onFrame);&lt;br&gt;}&lt;br&gt;&lt;br&gt;private function onFrame():void {&lt;br&gt;	trace(&#039;onFrame&#039;);&lt;br&gt;}&lt;br&gt;&lt;br&gt;Regards! / Jonas</description>
		<content:encoded><![CDATA[<p>Hi Alec!</p>
<p>Thank you for sharing.</p>
<p>As your code example doesn&#39;t &#8220;do&#8221; anything, maybe the following change/addition to your could clarify it, for Signal newbees like me&#8230;:</p>
<p>public function init():void		{<br />	// functionality here&#8230;<br />	trace(&#39;init&#39;);<br />	frame.add(onFrame);<br />}</p>
<p>private function onFrame():void {<br />	trace(&#39;onFrame&#39;);<br />}</p>
<p>Regards! / Jonas</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alecmce</title>
		<link>http://alecmce.com/as3/replacing-enter_frame/comment-page-1#comment-204</link>
		<dc:creator>alecmce</dc:creator>
		<pubDate>Wed, 20 Jan 2010 05:37:04 +0000</pubDate>
		<guid isPermaLink="false">http://alecmce.com/?p=552#comment-204</guid>
		<description>I&#039;m not sure that would give us any performance improvements would it? It is certainly need in that it cuts down the number of event objects being constructed per cycle, but it is still double the events that the EnterFrame ticker uses: one event for the ENTER_FRAME and one for the RENDER.&lt;br&gt;&lt;br&gt;Still, a nice addition to the panoply of alternatives, tanks og2t</description>
		<content:encoded><![CDATA[<p>I&#39;m not sure that would give us any performance improvements would it? It is certainly need in that it cuts down the number of event objects being constructed per cycle, but it is still double the events that the EnterFrame ticker uses: one event for the ENTER_FRAME and one for the RENDER.</p>
<p>Still, a nice addition to the panoply of alternatives, tanks og2t</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: og2t</title>
		<link>http://alecmce.com/as3/replacing-enter_frame/comment-page-1#comment-196</link>
		<dc:creator>og2t</dc:creator>
		<pubDate>Tue, 19 Jan 2010 16:18:57 +0000</pubDate>
		<guid isPermaLink="false">http://alecmce.com/?p=552#comment-196</guid>
		<description>How about of triggering stage.invalidate() from within Event.ENTER_FRAME handler, and then subscribing to the Event.RENDER to defer updating objects on the screen?</description>
		<content:encoded><![CDATA[<p>How about of triggering stage.invalidate() from within Event.ENTER_FRAME handler, and then subscribing to the Event.RENDER to defer updating objects on the screen?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RobotLegsPong Part 1 &#8211; Overview at AlecMcE.com</title>
		<link>http://alecmce.com/as3/replacing-enter_frame/comment-page-1#comment-195</link>
		<dc:creator>RobotLegsPong Part 1 &#8211; Overview at AlecMcE.com</dc:creator>
		<pubDate>Tue, 19 Jan 2010 07:01:27 +0000</pubDate>
		<guid isPermaLink="false">http://alecmce.com/?p=552#comment-195</guid>
		<description>[...] This implementation came out of a discussion on Twitter that I was involved in on the fringes; I wrote about it in a previous blog post. [...]</description>
		<content:encoded><![CDATA[<p>[...] This implementation came out of a discussion on Twitter that I was involved in on the fringes; I wrote about it in a previous blog post. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Replacing ENTER_FRAME &#8211; Testing Tickers at AlecMcE.com</title>
		<link>http://alecmce.com/as3/replacing-enter_frame/comment-page-1#comment-177</link>
		<dc:creator>Replacing ENTER_FRAME &#8211; Testing Tickers at AlecMcE.com</dc:creator>
		<pubDate>Sun, 29 Nov 2009 23:34:59 +0000</pubDate>
		<guid isPermaLink="false">http://alecmce.com/?p=552#comment-177</guid>
		<description>[...] Replacing ENTER_FRAME &#8211; Testing Tickers [...]</description>
		<content:encoded><![CDATA[<p>[...] Replacing ENTER_FRAME &#8211; Testing Tickers [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jacksondunstan</title>
		<link>http://alecmce.com/as3/replacing-enter_frame/comment-page-1#comment-176</link>
		<dc:creator>jacksondunstan</dc:creator>
		<pubDate>Sat, 28 Nov 2009 05:56:31 +0000</pubDate>
		<guid isPermaLink="false">http://alecmce.com/?p=552#comment-176</guid>
		<description>I see what you&#039;re getting at now. I saw the ENTER_FRAME listener but didn&#039;t see that you remove it and replace it with an addFrameScript. I hadn&#039;t heard of addFrameScript, probably because it&#039;s undocumented. It does seem to fix the problem I brought up in my initial comment of all rapid update callbacks requiring an AS3 event since this approach just uses a plain Function callback. I like the idea and really look forward to someone doing as you suggest: a rigorous, isolated test. Joa&#039;s results are, sadly, not encouraging. :( Thanks for the fascinating article and patient explanation!</description>
		<content:encoded><![CDATA[<p>I see what you&#39;re getting at now. I saw the ENTER_FRAME listener but didn&#39;t see that you remove it and replace it with an addFrameScript. I hadn&#39;t heard of addFrameScript, probably because it&#39;s undocumented. It does seem to fix the problem I brought up in my initial comment of all rapid update callbacks requiring an AS3 event since this approach just uses a plain Function callback. I like the idea and really look forward to someone doing as you suggest: a rigorous, isolated test. Joa&#39;s results are, sadly, not encouraging. <img src='http://alecmce.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  Thanks for the fascinating article and patient explanation!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alecmce</title>
		<link>http://alecmce.com/as3/replacing-enter_frame/comment-page-1#comment-175</link>
		<dc:creator>alecmce</dc:creator>
		<pubDate>Sat, 28 Nov 2009 00:55:27 +0000</pubDate>
		<guid isPermaLink="false">http://alecmce.com/?p=552#comment-175</guid>
		<description>Hi Jackson,&lt;br&gt;&lt;br&gt;I think you&#039;ve missed the point - that or I&#039;m being foolish!&lt;br&gt;&lt;br&gt;The hypothesis is that there&#039;s a difference between adding an event listener using addEventListener, and triggering a method to be called in a frame script. The first necessitates the creation of an Event object, but there&#039;s no reason why the method called by the addFrameScript should create an event object. In which case, there ought to be a marginal saving between a loop created by addFrameScript over a loop created by addEventListener. As I say, it&#039;s a hypothesis. Joa Ebert&#039;s results cast doubt about it, but until a rigorous, isolated test can be done, and both the test and results agreed to be accurate, we can&#039;t really be sure.&lt;br&gt;&lt;br&gt;Perhaps the confusion stems from the fact that I do in fact create an onEnterFrame listener in the EnterFrameDispatcher class? I do, because the [Frame] metadata tag works in such a way that the original class (Main) is inaccessible until the second frame. I have to wait for a frame to elapse before I can inject the frame Signal into the Main class. I add an ENTER_FRAME listener, then trigger nextFrame(). As soon as the onEnterFrame is triggered I remove that listener - it is not responsible for the loop.&lt;br&gt;&lt;br&gt;The loop is in fact generated by the addFrameScript(0, frameMethod, 1, frameMethod) line, which attaches the frameMethod function to both frames in the 2-frame timeline (created by the [Frame] metadata tag), which I then play.</description>
		<content:encoded><![CDATA[<p>Hi Jackson,</p>
<p>I think you&#39;ve missed the point &#8211; that or I&#39;m being foolish!</p>
<p>The hypothesis is that there&#39;s a difference between adding an event listener using addEventListener, and triggering a method to be called in a frame script. The first necessitates the creation of an Event object, but there&#39;s no reason why the method called by the addFrameScript should create an event object. In which case, there ought to be a marginal saving between a loop created by addFrameScript over a loop created by addEventListener. As I say, it&#39;s a hypothesis. Joa Ebert&#39;s results cast doubt about it, but until a rigorous, isolated test can be done, and both the test and results agreed to be accurate, we can&#39;t really be sure.</p>
<p>Perhaps the confusion stems from the fact that I do in fact create an onEnterFrame listener in the EnterFrameDispatcher class? I do, because the [Frame] metadata tag works in such a way that the original class (Main) is inaccessible until the second frame. I have to wait for a frame to elapse before I can inject the frame Signal into the Main class. I add an ENTER_FRAME listener, then trigger nextFrame(). As soon as the onEnterFrame is triggered I remove that listener &#8211; it is not responsible for the loop.</p>
<p>The loop is in fact generated by the addFrameScript(0, frameMethod, 1, frameMethod) line, which attaches the frameMethod function to both frames in the 2-frame timeline (created by the [Frame] metadata tag), which I then play.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jacksondunstan</title>
		<link>http://alecmce.com/as3/replacing-enter_frame/comment-page-1#comment-174</link>
		<dc:creator>jacksondunstan</dc:creator>
		<pubDate>Fri, 27 Nov 2009 23:52:05 +0000</pubDate>
		<guid isPermaLink="false">http://alecmce.com/?p=552#comment-174</guid>
		<description>But his original tweet that you quoted says &quot;Listening to a single #AS3 enterFrame will create over 1000 event instances per minute.&quot;. Then your whole &quot;Why replace the ENTER_FRAME?&quot; section says this again in even more depth. In your code example you are literally listening to a single AS3 enterFrame. The only savings I see is by making sure that you only listen to that *single* enterFrame and not have lots of enterFrame listeners. But if, as you claim now, Event objects are not created when passing from frame to frame, then why would it matter in the first place? Maybe I have missed something fundamental about this discussion... :)</description>
		<content:encoded><![CDATA[<p>But his original tweet that you quoted says &#8220;Listening to a single #AS3 enterFrame will create over 1000 event instances per minute.&#8221;. Then your whole &#8220;Why replace the ENTER_FRAME?&#8221; section says this again in even more depth. In your code example you are literally listening to a single AS3 enterFrame. The only savings I see is by making sure that you only listen to that *single* enterFrame and not have lots of enterFrame listeners. But if, as you claim now, Event objects are not created when passing from frame to frame, then why would it matter in the first place? Maybe I have missed something fundamental about this discussion&#8230; <img src='http://alecmce.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alecmce</title>
		<link>http://alecmce.com/as3/replacing-enter_frame/comment-page-1#comment-173</link>
		<dc:creator>alecmce</dc:creator>
		<pubDate>Fri, 27 Nov 2009 15:58:49 +0000</pubDate>
		<guid isPermaLink="false">http://alecmce.com/?p=552#comment-173</guid>
		<description>@joa reports that he implemented the frameloop in his AudioBox tool, but found no memory nor performance improvements: &lt;a href=&quot;http://bit.ly/7FGv2c&quot; rel=&quot;nofollow&quot;&gt;http://bit.ly/7FGv2c&lt;/a&gt;, &lt;a href=&quot;http://bit.ly/8KW0XM&quot; rel=&quot;nofollow&quot;&gt;http://bit.ly/8KW0XM&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>@joa reports that he implemented the frameloop in his AudioBox tool, but found no memory nor performance improvements: <a href="http://bit.ly/7FGv2c" rel="nofollow">http://bit.ly/7FGv2c</a>, <a href="http://bit.ly/8KW0XM" rel="nofollow">http://bit.ly/8KW0XM</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alecmce</title>
		<link>http://alecmce.com/as3/replacing-enter_frame/comment-page-1#comment-172</link>
		<dc:creator>alecmce</dc:creator>
		<pubDate>Fri, 27 Nov 2009 15:55:34 +0000</pubDate>
		<guid isPermaLink="false">http://alecmce.com/?p=552#comment-172</guid>
		<description>I don&#039;t think so Jackson. The frame loop is internal-to-player functionality; the player has no reason to construct an Event object when passing from frame to frame. That&#039;s why this solution is different and interesting! I have to admit, I haven&#039;t tested this assertion, mostly because it was late in the UK and I needed to go to sleep! It would seem that Penner has though: &lt;a href=&quot;http://bit.ly/8IYtuv&quot; rel=&quot;nofollow&quot;&gt;http://bit.ly/8IYtuv&lt;/a&gt;. I will try to today if I get the chance.&lt;br&gt;&lt;br&gt;I need to make this clearer in the post, I think, to avoid this confusion. Thanks for the feedback!</description>
		<content:encoded><![CDATA[<p>I don&#39;t think so Jackson. The frame loop is internal-to-player functionality; the player has no reason to construct an Event object when passing from frame to frame. That&#39;s why this solution is different and interesting! I have to admit, I haven&#39;t tested this assertion, mostly because it was late in the UK and I needed to go to sleep! It would seem that Penner has though: <a href="http://bit.ly/8IYtuv" rel="nofollow">http://bit.ly/8IYtuv</a>. I will try to today if I get the chance.</p>
<p>I need to make this clearer in the post, I think, to avoid this confusion. Thanks for the feedback!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
