<?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>TutorBoy &#187; Flash</title>
	<atom:link href="http://articles.tutorboy.com/topics/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://articles.tutorboy.com</link>
	<description>Log on to Techknowledgey</description>
	<lastBuildDate>Wed, 18 Jan 2012 09:06:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Set your Flash Player Settings for Browsers</title>
		<link>http://articles.tutorboy.com/2010/10/30/set-your-flash-player-settings-for-browsers/</link>
		<comments>http://articles.tutorboy.com/2010/10/30/set-your-flash-player-settings-for-browsers/#comments</comments>
		<pubDate>Sat, 30 Oct 2010 05:58:03 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash CS3]]></category>
		<category><![CDATA[Flash Player]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2570</guid>
		<description><![CDATA[Adobe is committed to providing you with options to control SWF or FLV content and applications that run in Adobe ...]]></description>
			<content:encoded><![CDATA[<p><a href="http://articles.tutorboy.com/flash/set-your-flash-player-settings-for-browsers.html"><img class="size-full wp-image-2572 alignleft" title="Flash_Player_Settings" src="http://articles.tutorboy.com/content/uploads/2010/10/Flash_Player_Settings.png" alt="" width="222" height="187" /></a>Adobe is committed to providing you with options to control SWF or FLV content and applications that run in Adobe Flash Player. The Flash Player Settings Manager lets you manage global privacy settings, storage settings, security settings, and automatic notification settings.</p>
<p>The Settings Manager is a special control panel that runs on your local              computer but is displayed within and <span id="more-2570"></span>accessed from the Adobe website. Adobe does              not have access to the settings that you see in the Settings Manager or to              personal information on your computer.</p>
<ul>
<li><strong><a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager.html">Settings Manager</a></strong>
<ul>
<li><a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager02.html">Global Privacy Settings panel</a></li>
<li><a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager03.html">Global Storage Settings panel</a></li>
<li><a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html">Global Security Settings panel</a></li>
<li><a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager05.html">Global Notifications Settings panel</a></li>
<li><a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager06.html">Website Privacy Settings panel</a></li>
<li><a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager07.html">Website Storage Settings panel</a></li>
<li><a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager08.html">Protected Content Playback Settings panel</a></li>
<li><a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager09.html">Peer-Assisted Networking Panel</a></li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2010/10/30/set-your-flash-player-settings-for-browsers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fullscreen in ActionScript 3.0</title>
		<link>http://articles.tutorboy.com/2010/10/23/fullscreen-in-actionscript-3-0/</link>
		<comments>http://articles.tutorboy.com/2010/10/23/fullscreen-in-actionscript-3-0/#comments</comments>
		<pubDate>Sat, 23 Oct 2010 09:07:00 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Action Script 3.0]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash CS3]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2549</guid>
		<description><![CDATA[To make a Full Screen mode for a flash application is much easier, you just need to assign this StageDisplayState.FULL_SCREEN ...]]></description>
			<content:encoded><![CDATA[<p>To make a Full Screen mode for a flash application is much easier, you just need to assign this StageDisplayState.FULL_SCREEN value to your stage object&#8217;s state ie stage.displayState. So to full screen <em>stage.displayState = StageDisplayState.FULL_SCREEN;</em><strong> </strong>and switch back to normal <em>stage.displayState = StageDisplayState.NORMAL;<span id="more-2549"></span></em></p>
<p>But you can&#8217;t simply add this code anywhere in the program, because we need an event to trigger full screen. A Mouse Click or Keyboard Events are valid for this, but ENTER_FRAME, Mouse Over, Mouse Out, Mouse UP and Mouse Down won&#8217;t work properly.</p>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2010/10/23/fullscreen-in-actionscript-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 Function CallBack Feature with apply(), call() methods</title>
		<link>http://articles.tutorboy.com/2010/10/07/as3-callback-feature-with-apply-call-methods/</link>
		<comments>http://articles.tutorboy.com/2010/10/07/as3-callback-feature-with-apply-call-methods/#comments</comments>
		<pubDate>Thu, 07 Oct 2010 05:04:52 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Action Script 3.0]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[CallBack]]></category>
		<category><![CDATA[Flash CS3]]></category>
		<category><![CDATA[Functions]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2535</guid>
		<description><![CDATA[Like in JavaScript, Action Script have the callback feature. You guys are always using that in addEventListener/removeEventListener, out of that ...]]></description>
			<content:encoded><![CDATA[<p>Like in JavaScript, Action Script have the <strong>callback </strong>feature. You guys are always using that in <em>addEventListener/removeEventListener</em>, out of that you can be able to implement that for your own functions. <em>apply()</em> and <em>call()</em> are the methods to invoke &#8216;Function&#8217; objects. Basically both are same, but the only difference is that, <em>apply() </em>is using  when the parameters to the callback function are unknown,  but <em>call()</em> is using when the parameters to the functions are know.<span id="more-2535"></span></p>
<p>If you have a function like callMe(), and wanna callback, just use <strong>callMe.call();</strong> from any where in your class, if you want to call from another class just pass the name to that class&#8217;s member function and just call from there with that name. If you don&#8217;t understand this just look into my demonstration or download the source file.</p>
<p><a class="wp-caption" href="http://downloads.tutorboy.com/articles/AS3_CallBack.zip" target="_self">Download Source<br />
</a></p>
<p><strong>Here is my simple demonstration of callback.</strong><br />
ClassOne and Message are the classes used. ClassOne have two member functions called <em>ClassOneMemberFunction</em> and <em>ClassOneMemberFunctionWithParams.</em> Message class have one member function called <em>showMessage, </em>which accept one string param and other two optional parameters for callback, _callBack and _callBackPrams.</p>
<h2>ClassOne.as</h2>
<pre class="brush:as3">public class ClassOne {

	public function ClassOne ():void {
		var msg = new Message;
		msg.showMessage ("This message from ClassOne", ClassOneMemberFunction);
	}
	private function ClassOneMemberFunction ():void {
		trace ("ClassOneMemberFunction is a private function on ClassOne(Called by callback method)");
	}
	private function ClassOneMemberFunctionWithParams (prams:*):void {
		trace ("::::: Prams are " + prams.value1 );
	}
}</pre>
<p>msg.showMessage (&#8220;This message from ClassOne&#8221;, ClassOneMemberFunction); in this line the ClassOneMemberFunction is the callback function name you can see a function in the class. It will be called from Message Class.</p>
<h2>Message.as</h2>
<pre class="brush:as3">public class Message {

	public function Message ():void {
	}

	public function showMessage(msg:String, _callBack:Object = null, _callBackPrams:* = null){
		trace("ShowMessage: " + msg);

		if(_callBack != null &amp;&amp; _callBackPrams != null ) {
			_callBack.call(null, _callBackPrams);
		}else if(_callBack != null){
			_callBack.call();
		}
	}
}</pre>
<p>In our example _callBack.call() means ClassOneMemberFunction.call().  Hope you understood the callback feature. You will get a clear picture while executing the example source code.</p>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2010/10/07/as3-callback-feature-with-apply-call-methods/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JSON for Flex/Flash AS3 application development</title>
		<link>http://articles.tutorboy.com/2010/07/30/as3-flex-flash-json-parser/</link>
		<comments>http://articles.tutorboy.com/2010/07/30/as3-flex-flash-json-parser/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 09:33:55 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[Action Script 2.0]]></category>
		<category><![CDATA[Action Script 3.0]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[as3corelib]]></category>
		<category><![CDATA[Deserialize]]></category>
		<category><![CDATA[Flash CS3]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Json Parser]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Serialization]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=2057</guid>
		<description><![CDATA[One of my project I want implement JSON method as the data exchange, as there is no standalone functions for ...]]></description>
			<content:encoded><![CDATA[<p>One of my project I want implement JSON method as the data exchange, as there is no standalone functions for JSON Parser. But adobe have the solutions for these include classes for MD5 and SHA 1 hashing, Image encoders, and JSON serialization as well as general String, Number and Date APIs. You can find the library <a title="http://github.com/mikechambers/as3corelib" href="http://github.com/mikechambers/as3corelib">here</a><span id="more-2057"></span></p>
<h3>Json Input</h3>
<pre class="brush:as3">{"userId":[11,8,13,4,15,6,72],
"userData":{"11":{"loginTime":"04:32", "userName":"First Name"},"8":{"loginTime":"04:32", "userName":"My Name"},"13":{"loginTime":"11:33", "userName":"Ammu"},"4":{"loginTime":"10:32", "userName":"Chinnu"},"15":{"loginTime":"04:55", "userName":"Minnu"},"6":{"loginTime":"02:00", "userName":"Vimal"},"72":{"loginTime":"06:20", "userName":"Gijo"}} }
</pre>
<h3>Output</h3>
<p>You can access the json string as Object in as3 application. So as from the above input you access the objects like</p>
<h2>JSON: ActionScript 3.0</h2>
<pre class="brush:as3">import com.adobe.serialization.json.JSON;
var jsonObj:Object = JSON.deserialize(string);

// Usage
trace(jsonObj.userId[5]) // 6
trace(jsonObj.userId[0]) // 11
trace(jsonObj.userData[6].loginTime) // 02:00
trace(jsonObj.userData[4].userName) // Chinnu
</pre>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2010/07/30/as3-flex-flash-json-parser/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AS3 Set Keyboard Autofocus For SWF</title>
		<link>http://articles.tutorboy.com/2010/07/26/as3-set-keyboard-autofocus-for-swf/</link>
		<comments>http://articles.tutorboy.com/2010/07/26/as3-set-keyboard-autofocus-for-swf/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 10:33:55 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Action Script 3.0]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash CS3]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=1997</guid>
		<description><![CDATA[Its too simple to remember, the problem is because of, Flash will lose the focus of the stage while adding(addChild) ...]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Its too simple to remember, the problem is because of, Flash will lose the focus of the stage while adding(<em>addChild</em>) or removing(<em>removeChild</em>) the child like Sprite, MovieClips. So we need to enable focus after each add/remove function calls. Use the following code snippet after the above mentioned functions. <img src='http://articles.tutorboy.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<h2>ActionScript 3.0</h2>
<pre>// enabling the focus to the stage.
stage.focus = stage;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2010/07/26/as3-set-keyboard-autofocus-for-swf/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Load External XML File In Flash ActionScript 3.0</title>
		<link>http://articles.tutorboy.com/2010/06/27/load-external-xml-file-in-flash-actionscript-3-0/</link>
		<comments>http://articles.tutorboy.com/2010/06/27/load-external-xml-file-in-flash-actionscript-3-0/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 11:11:51 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Action Script 3.0]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Functions]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=1919</guid>
		<description><![CDATA[Here is the simplest method to load an external XML file to the flash using Actionscript 3.0. You need to ...]]></description>
			<content:encoded><![CDATA[<p>Here is the simplest method to load an external XML file to the flash using Actionscript 3.0. You need to import the following classes to your package ie URLLoader, URLRequest, Event and XML;<span id="more-1919"></span></p>
<pre class="brush:as3'">package {
	import flash.display.*;
	import flash.xml.*;
	import flash.events.*;
	import flash.net.*;

	public class Main extends MovieClip {
		// URL Loader variable to load the URL from external
		public var loader:URLLoader;
		// XML variable to hold the XML Object
		public var xml:XML;
		function Main():void {
			// Set the file name
			var xmlPath:String = "fileName.xml"
			// Create the URLLoader class object
			loader = new URLLoader;
			// Load the URL with URL Request object.
			loader.load(new URLRequest(xmlPath));
			// Add a listener to the load completion process.
			loader.addEventListener(Event.COMPLETE, xmlLoaded);
		}

		public function xmlLoaded(e:Event):void {
			if (e.target  as  URLLoader != null) {
				// assgin the XML Object from the loader variable to XML variable
				xml = new XML(loader.data);
				trace(xml)
			}
		}
	}
}</pre>
<p>asdas</p>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2010/06/27/load-external-xml-file-in-flash-actionscript-3-0/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Adding Nodes to XML Object in ActionScript 3.0</title>
		<link>http://articles.tutorboy.com/2010/06/27/adding-nodes-to-xml-object-in-actionscript-3-0/</link>
		<comments>http://articles.tutorboy.com/2010/06/27/adding-nodes-to-xml-object-in-actionscript-3-0/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 06:30:53 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Action Script 3.0]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Functions]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=1926</guid>
		<description><![CDATA[There are 4 kinds of operations are available to add a new node to the XML Object.  
1. appendChild(),
2. ...]]></description>
			<content:encoded><![CDATA[<p>There are 4 kinds of operations are available to add a new node to the XML Object. <em> </em><br />
<em>1. appendChild(),<br />
2. prependChild()<br />
3. insertChildAfter()<br />
4. insertChildBefore()<span id="more-1926"></span><br />
</em></p>
<h2>Sample XML</h2>
<pre class="brush:xml">&lt;parentNode&gt;
 &lt;childNode1&gt;Normal&lt;/childNode1&gt;
 &lt;childNode2&gt;Normal&lt;/childNode2&gt;
 &lt;childNode3&gt;Normal&lt;/childNode3&gt;
 &lt;childNode4&gt;Normal&lt;/childNode4&gt;
&lt;/parentNode&gt;
</pre>
<h2>1. appendChild()</h2>
<p>Appends the given child to the end of the XML object&#8217;s properties.  The <code><em>appendChild</em>()</code> method takes an <strong><em>XML object</em></strong>, an <em><strong>XMLList  object</strong></em>, or   <em><strong>any other data type</strong></em> that is then converted to a String. The xmlObject hold the value of the above sample XML.</p>
<pre class="brush:as3">xmlObject.appendChild(&lt;childNode5&gt;appendChild&lt;/childNode5&gt;);

/*XML AFTER appendChild()
-----------------------
&lt;parentNode&gt;
 &lt;childNode1&gt;Normal&lt;/childNode1&gt;
 &lt;childNode2&gt;Normal&lt;/childNode2&gt;
 &lt;childNode3&gt;Normal&lt;/childNode3&gt;
 &lt;childNode4&gt;Normal&lt;/childNode4&gt;
 &lt;childNode5&gt;appendChild&lt;/childNode5&gt;
&lt;/parentNode&gt;*/
</pre>
<h2>2. prependChild()</h2>
<p>Inserts a copy of the provided <code>child</code> object into the XML  element before any existing XML   properties for that element.</p>
<pre class="brush:as3">xml.prependChild(&lt;childNode0&gt;prependChild&lt;/childNode0&gt;);

/*XML AFTER prependChild()
-----------------------
&lt;parentNode&gt;
 &lt;childNode0&gt;prependChild&lt;/childNode0&gt;
 &lt;childNode1&gt;Normal&lt;/childNode1&gt;
 &lt;childNode2&gt;Normal&lt;/childNode2&gt;
 &lt;childNode3&gt;Normal&lt;/childNode3&gt;
 &lt;childNode4&gt;Normal&lt;/childNode4&gt;
&lt;/parentNode&gt;
*/
</pre>
<h2>3. insertChildAfter()</h2>
<p>Inserts the given <code>child2</code> parameter after the <code>child1</code> parameter in this XML object and returns the   resulting object. If the <code>child1</code> parameter is <code>null</code>,  the method  inserts the contents of <code>child2</code> <em>before</em> all children  of the XML object   (in other words, after <em>none</em>). If <code>child1</code> is  provided, but it does not   exist in the XML object, the XML object is not modified and <code>undefined</code> is   returned.</p>
<p>If you call this method on an XML child that is not an element  (text, attributes, comments, pi, and so on)   <code>undefined</code> is returned.</p>
<pre class="brush:as3">xml.insertChildAfter(xml.childNode4, &lt;childNode41&gt;insertChildAfter childNode4 &lt;/childNode41&gt;);

/*XML AFTER insertChildAfter()
----------------------------
&lt;parentNode&gt;
 &lt;childNode1&gt;Normal&lt;/childNode1&gt;
 &lt;childNode2&gt;Normal&lt;/childNode2&gt;
 &lt;childNode3&gt;Normal&lt;/childNode3&gt;
 &lt;childNode4&gt;Normal&lt;/childNode4&gt;
 &lt;childNode41&gt;insertChildAfter childNode4&lt;/childNode41&gt;
&lt;/parentNode&gt;
*/
</pre>
<h2>3. insertChildBefore()</h2>
<p>Inserts the given <code>child2</code> parameter before the <code>child1</code> parameter   in this XML object and returns the resulting object. If the <code>child1</code> parameter   is <code>null</code>, the method inserts the contents of      <code>child2</code> <em>after</em> all children of the XML object (in  other words, before   <em>none</em>). If <code>child1</code> is provided, but it does not exist  in the XML object,   the XML object is not modified and <code>undefined</code> is returned.</p>
<p>If you call this method on an XML child that is not an element  (text, attributes,   comments, pi, and so on) <code>undefined</code> is returned.</p>
<pre class="brush:as3">xml.insertChildBefore(xml.childNode3, &lt;childNode21&gt;insertChildBefore childNode3 &lt;/childNode21&gt;);

/*XML AFTER insertChildBefore()
----------------------------
&lt;parentNode&gt;
 &lt;childNode1&gt;Normal&lt;/childNode1&gt;
 &lt;childNode2&gt;Normal&lt;/childNode2&gt;
 &lt;childNode21&gt;insertChildBefore childNode3&lt;/childNode21&gt;
 &lt;childNode3&gt;Normal&lt;/childNode3&gt;
 &lt;childNode4&gt;Normal&lt;/childNode4&gt;
&lt;/parentNode&gt;*/
</pre>
<p><em><strong>Related Topics</strong></em><br />
1 . <a href="http://articles.tutorboy.com/flash/load-external-xml-file-in-flash-actionscript-3-0.html">Load  External XML File</a><br />
2. <a href="http://articles.tutorboy.com/flash/adding-nodes-to-xml-object-in-actionscript-3-0.html">Adding  Nodes to XML Object</a><br />
3. <a href="http://articles.tutorboy.com/flash/remove-a-node-from-xml-object-in-actionscript-3-0.html">Delete  a node from XML Object</a></p>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2010/06/27/adding-nodes-to-xml-object-in-actionscript-3-0/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>XML In Flash ActionScript 3.0</title>
		<link>http://articles.tutorboy.com/2010/06/27/xml-in-flash-action-script-3-0/</link>
		<comments>http://articles.tutorboy.com/2010/06/27/xml-in-flash-action-script-3-0/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 06:30:27 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Action Script 3.0]]></category>
		<category><![CDATA[Functions]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=1889</guid>
		<description><![CDATA[XML stands for EXtensible Markup Language. XML was introduced to hierarchically structure, store and transport data or information. In ActionScript ...]]></description>
			<content:encoded><![CDATA[<p>XML stands for E<strong>X</strong>tensible <strong>M</strong>arkup <strong>L</strong>anguage. XML was introduced to hierarchically structure, store and transport data or information. In ActionScript XML class was created to  handle XML Objects. But in later versions of ActionScript that is in 3.0, they implemented the powerful XML-handling standards defined in <em><strong>ECMAScript for XML </strong><strong>E4X</strong></em> specification. This was one of the most significant changes to ActionScript 3.0.<br />
<span id="more-1889"></span></p>
<h2>Sample XML Document</h2>
<pre class="brush:xml">&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;books&gt;
&lt;category name="Programming"&gt;
&lt;title&gt;
&lt;name&gt;Professional JavaScript For Web Developers&lt;/name&gt;
&lt;author&gt;Nicholas C. Zakas&lt;/author&gt;
&lt;isbn&gt;ISBN-13: 978-0-7645-7908-0&lt;/isbn&gt;
&lt;/title&gt;
&lt;title&gt;
&lt;name&gt;Object-Oriented Programming with PHP5&lt;/name&gt;
&lt;author&gt;Hasin Hayder&lt;/author&gt;
&lt;isbn&gt;ISBN 978-1-847192-56-1&lt;/isbn&gt;
&lt;/title&gt;
&lt;/category&gt;
&lt;/books&gt;
</pre>
<p>Here, the 1st line is called<strong> XML Declaration</strong>, 2nd line <strong>&lt;books&gt;</strong> is the <strong>Parent Node</strong> of this sample XML. 3rd line <strong>&lt;category&gt; </strong>is<strong> Child Node</strong> and name is an<strong> Attribute Name</strong> and Programming is the value of that <strong>attribute</strong>. <strong>&lt;title&gt;</strong> is the<strong> Child Node</strong> of the <strong>&lt;category&gt;</strong>. This is only sample pattern of parent child relation. Hope you understood the very basic structure of the XML.</p>
<p>Okey, Now you just refresh the terms <em>Parent Node</em>, <em>Child Node</em>, <em>Attributes</em>, <em>Attributes name</em>, <em>Attributes value </em>etc in your mind. <img src='http://articles.tutorboy.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Now we can quickly jump into the ActionScript coding for XML Read/Write operations. In ActionScript 3.0 the XML class contains methods and properties for working with XML objects.</p>
<h1>Write XML inside actionscript code.</h1>
<h2>ActionScript 3.0</h2>
<pre class="brush:xml">var books:XML = &lt;books&gt;
&lt;category name="Programming"&gt;
&lt;title&gt;
&lt;name&gt;Professional JavaScript For Web Developers&lt;/name&gt;
&lt;author&gt;Nicholas C. Zakas&lt;/author&gt;
&lt;isbn&gt;ISBN-13: 978-0-7645-7908-0&lt;/isbn&gt;
&lt;/title&gt;
&lt;title&gt;
&lt;name&gt;Object-Oriented Programming with PHP5&lt;/name&gt;
&lt;author&gt;Hasin Hayder&lt;/author&gt;
&lt;isbn&gt;ISBN 978-1-847192-56-1&lt;/isbn&gt;
&lt;/title&gt;
&lt;/category&gt;
&lt;/books&gt;

trace(books);
</pre>
<h2>Output</h2>
<p><a href="http://articles.tutorboy.com/content/uploads/2010/06/xml_inside_actionscript_code.jpg"><img class="alignnone size-full wp-image-1897" title="xml_inside_actionscript_code" src="http://articles.tutorboy.com/content/uploads/2010/06/xml_inside_actionscript_code.jpg" alt="" width="662" height="340" /></a></p>
<h1>How to read node properties.</h1>
<h2>length property</h2>
<p>For XML objects, this method always returns the integer 1. The length() method of the XMLList class returns a value of 1 for an XMLList object that contains only one value.</p>
<p><em>From the above example</em></p>
<pre class="brush:as3">trace("books.length() =&gt; " + books.length());
trace("books.category.length() =&gt; " + books.category.length());
trace("books.category.title.length() =&gt; " + books.category.title.length());
</pre>
<h2>Output</h2>
<p><a href="http://articles.tutorboy.com/content/uploads/2010/06/xml_length_properties.jpg"><img class="alignnone size-full wp-image-1898" title="xml_length_properties" src="http://articles.tutorboy.com/content/uploads/2010/06/xml_length_properties.jpg" alt="" width="395" height="154" /></a></p>
<h2>Read Attribute value</h2>
<p>To read the attribute information of a particular node, two methods are there.<br />
1. Using the &#8216;@&#8217; symbol to locate an attribute on a XML Object.<br />
2. Using of attribute(&#8220;attributeName&#8221;) function.<br />
See the Example:</p>
<pre class="brush:as3">trace("books.category.@['name']  =&gt; " + books.category.@['name']);
trace("books.category.@name      =&gt; " + books.category.@name);
trace('books.category.attribute("name") =&gt; ' + books.category.attribute("name"));
</pre>
<h2>Output</h2>
<p><a href="http://articles.tutorboy.com/content/uploads/2010/06/reading_attribute_values.jpg"><img class="alignnone size-full wp-image-1896" title="reading_attribute_values" src="http://articles.tutorboy.com/content/uploads/2010/06/reading_attribute_values.jpg" alt="" width="509" height="122" /></a></p>
<h2>Read the values of childNode(s)</h2>
<pre class="brush:as3">trace("books.category.title[0].name   =&gt; " + books.category.title[0].name);
trace("books.category.title[0].author =&gt; " + books.category.title[0].author);
trace("books.category.title[1].name   =&gt; " + books.category.title[1].name);
trace("books.category.title[1].author =&gt; " + books.category.title[0].author);
</pre>
<p><a href="http://articles.tutorboy.com/content/uploads/2010/06/read_node_values.jpg"><img class="alignnone size-full wp-image-1895" title="read_node_values" src="http://articles.tutorboy.com/content/uploads/2010/06/read_node_values.jpg" alt="" width="693" height="160" /></a></p>
<p>These are the basic and commonly used methods when working with XML in ActionScript 3.0. Read the following posts for more details of XML and ActionScript 3.0.</p>
<p><em><strong>Related Topics</strong></em><br />
1 . <a href="http://articles.tutorboy.com/flash/load-external-xml-file-in-flash-actionscript-3-0.html">Load  External XML File</a><br />
2. <a href="http://articles.tutorboy.com/flash/adding-nodes-to-xml-object-in-actionscript-3-0.html">Adding  Nodes to XML Object</a><br />
3. <a href="http://articles.tutorboy.com/flash/remove-a-node-from-xml-object-in-actionscript-3-0.html">Delete  a node from XML Object</a></p>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2010/06/27/xml-in-flash-action-script-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delete a node from XML Object in ActionScript 3.0</title>
		<link>http://articles.tutorboy.com/2010/06/27/delete-a-node-from-xml-object-in-actionscript-3-0/</link>
		<comments>http://articles.tutorboy.com/2010/06/27/delete-a-node-from-xml-object-in-actionscript-3-0/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 06:30:12 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Action Script 3.0]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash CS3]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://articles.tutorboy.com/?p=1951</guid>
		<description><![CDATA[Deletes the XML elements or attributes specified by reference. When used with an XMLList operand, the result of the delete ...]]></description>
			<content:encoded><![CDATA[<p>Deletes the XML elements or attributes specified by <code>reference</code>. When used with an XMLList operand, the result of the <code>delete</code> operator is always <code>true</code> because the XMLList operand always  refers to a valid (though possibly empty) XMLList object.<span id="more-1951"></span><br />
<strong>delete XML Object</strong></p>
<pre class="brush:as3">delete xml.childNode3;
/*
XML BEFORE
----------
&lt;parentNode&gt;
 &lt;childNode1&gt;Normal&lt;/childNode1&gt;
 &lt;childNode2&gt;Normal&lt;/childNode2&gt;
 &lt;childNode3&gt;Normal&lt;/childNode3&gt;
 &lt;childNode4&gt;Normal&lt;/childNode4&gt;
&lt;/parentNode&gt;

XML AFTER DELETION
------------------
&lt;parentNode&gt;
 &lt;childNode1&gt;Normal&lt;/childNode1&gt;
 &lt;childNode2&gt;Normal&lt;/childNode2&gt;
 &lt;childNode4&gt;Normal&lt;/childNode4&gt;
&lt;/parentNode&gt;
*/
</pre>
<p><em><strong>Related Topics</strong></em><br />
1 . <a href="http://articles.tutorboy.com/flash/load-external-xml-file-in-flash-actionscript-3-0.html">Load External XML File</a><br />
2. <a href="http://articles.tutorboy.com/flash/adding-nodes-to-xml-object-in-actionscript-3-0.html">Adding Nodes to XML Object</a><br />
3. <a href="http://articles.tutorboy.com/actionscript-3-0/remove-a-node-from-xml-object-in-actionscript-3-0.html">Delete a node from XML Object</a></p>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2010/06/27/delete-a-node-from-xml-object-in-actionscript-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Double Click Event in Action Script 3.0</title>
		<link>http://articles.tutorboy.com/2010/06/15/double-click-event-in-action-script-3-0/</link>
		<comments>http://articles.tutorboy.com/2010/06/15/double-click-event-in-action-script-3-0/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 12:21:54 +0000</pubDate>
		<dc:creator>Midhun Devasia</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Action Script 3.0]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Mouse Events]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://tutorboy.com/articles/?p=1756</guid>
		<description><![CDATA[In Flash Action Script 3. 0 the Mouse Double Click event is disabled by default. The most commonly used event ...]]></description>
			<content:encoded><![CDATA[<p>In Flash Action Script 3. 0 the <em><strong>Mouse Double Click</strong></em> event is disabled by default. The most commonly used event is single click. If you want to use the<em><strong> DOUBLE CLICK</strong></em> for an object, you need to enable the <em><strong>doubleClickEnabled </strong></em>value.</p>
<h2>Action Script 3.0</h2>
<pre class="brush:as3">var myButton:Sprite = new Sprite;
// Enabling the double click for myButon
myButton.doubleClickEnabled = true;
</pre>
<p><span id="more-1756"></span><br />
Adding Event Listener to the DOUBLE CLICK.</p>
<h2>Action Script 3.0</h2>
<pre class="brush:as3">var myButton:Sprite = new Sprite;
// Enabling the double click for myButon
myButton.doubleClickEnabled = true;
myButton.addEventListener(MouseEvent.DOUBLE_CLICK, onDoubleClick);

private function onDoubleClick(event:Event) :void {
     trace("Double Click Detected");
}
</pre>
<p>Well!!! all these are okay for a simple movie clip/sprite. But When your movie clip having multiple children then you need to disable the mouse children. Otherwise you wont get the Double Click event from the child clips.<br />
So the Final code Looks like this.</p>
<h2>Action Script 3.0</h2>
<pre class="brush:as3">var myButton:Sprite = new Sprite;
// Enabling the double click for myButon
myButton.doubleClickEnabled = true;
// Disable the mouse children of the parent clip.
myButton.mouseChildren = false;
myButton.addEventListener(MouseEvent.DOUBLE_CLICK, onDoubleClick);

private function onDoubleClick(event:Event) :void {
     trace("Double Click Detected");
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://articles.tutorboy.com/2010/06/15/double-click-event-in-action-script-3-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

