<?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: As3 event management</title>
	<atom:link href="http://blowingthroughlines.com/2007/11/03/flash-as-3/as3-event-management/feed/" rel="self" type="application/rss+xml" />
	<link>http://blowingthroughlines.com/2007/11/03/flash-as-3/as3-event-management/</link>
	<description>Highly addictive code.</description>
	<lastBuildDate>Sun, 22 Apr 2012 18:42:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: mike</title>
		<link>http://blowingthroughlines.com/2007/11/03/flash-as-3/as3-event-management/comment-page-1/#comment-9064</link>
		<dc:creator>mike</dc:creator>
		<pubDate>Mon, 04 Oct 2010 19:23:54 +0000</pubDate>
		<guid isPermaLink="false">http://blowingthroughlines.com/flash-as3/jeff/as3-event-management/#comment-9064</guid>
		<description>Hey - I came across this, but couldn&#039;t get it to work. Eventually I came up with this code, though, which is a bit simpler and does what I want it to:

//I add the stage listener just before any of my button listeners

stage.addEventListener(Event.ENTER_FRAME, initfunction)
function initfunction(e:Event):void{
	buttonName.dispatchEvent(new MouseEvent(MouseEvent.CLICK,true));
        stage.removeEventListener(Event.ENTER_FRAME, initfunction);
}

//I remove the event listener in its own function - if it just needs to click, then it can go away as soon as it comes in</description>
		<content:encoded><![CDATA[<p>Hey &#8211; I came across this, but couldn&#8217;t get it to work. Eventually I came up with this code, though, which is a bit simpler and does what I want it to:</p>
<p>//I add the stage listener just before any of my button listeners</p>
<p>stage.addEventListener(Event.ENTER_FRAME, initfunction)<br />
function initfunction(e:Event):void{<br />
	buttonName.dispatchEvent(new MouseEvent(MouseEvent.CLICK,true));<br />
        stage.removeEventListener(Event.ENTER_FRAME, initfunction);<br />
}</p>
<p>//I remove the event listener in its own function &#8211; if it just needs to click, then it can go away as soon as it comes in</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jeff</title>
		<link>http://blowingthroughlines.com/2007/11/03/flash-as-3/as3-event-management/comment-page-1/#comment-58</link>
		<dc:creator>jeff</dc:creator>
		<pubDate>Mon, 07 Apr 2008 14:24:21 +0000</pubDate>
		<guid isPermaLink="false">http://blowingthroughlines.com/flash-as3/jeff/as3-event-management/#comment-58</guid>
		<description>Your correct.  However it should be noted that then your target will be null.  Thus if you you perform an action on the button onclick then this ability will be lost by passing null</description>
		<content:encoded><![CDATA[<p>Your correct.  However it should be noted that then your target will be null.  Thus if you you perform an action on the button onclick then this ability will be lost by passing null</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rich</title>
		<link>http://blowingthroughlines.com/2007/11/03/flash-as-3/as3-event-management/comment-page-1/#comment-59</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Mon, 07 Apr 2008 02:56:34 +0000</pubDate>
		<guid isPermaLink="false">http://blowingthroughlines.com/flash-as3/jeff/as3-event-management/#comment-59</guid>
		<description>Another way to execute an event listener function, without the originally intended event, is to pass in null. You can just replace line 12 above with functiontorun(null); Nice blog, thanks!</description>
		<content:encoded><![CDATA[<p>Another way to execute an event listener function, without the originally intended event, is to pass in null. You can just replace line 12 above with functiontorun(null); Nice blog, thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

