<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>K a r t h i K</title>
	<atom:link href="http://shanmukarthik.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://shanmukarthik.wordpress.com</link>
	<description>&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124; Think Possible, Do Impossible &#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;&#124;</description>
	<lastBuildDate>Fri, 26 Feb 2010 18:08:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='shanmukarthik.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>K a r t h i K</title>
		<link>http://shanmukarthik.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://shanmukarthik.wordpress.com/osd.xml" title="K a r t h i K" />
	<atom:link rel='hub' href='http://shanmukarthik.wordpress.com/?pushpress=hub'/>
		<item>
		<title>What is mx_internal? When and How to use it?</title>
		<link>http://shanmukarthik.wordpress.com/2010/02/26/what-is-mx_internal-when-and-how-to-use-it/</link>
		<comments>http://shanmukarthik.wordpress.com/2010/02/26/what-is-mx_internal-when-and-how-to-use-it/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 18:08:32 +0000</pubDate>
		<dc:creator>shanmukarthik</dc:creator>
				<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://shanmukarthik.wordpress.com/?p=59</guid>
		<description><![CDATA[I prefer the following two URLs to know better about the mx_internal on flex. http://raghuonflex.wordpress.com/2007/09/03/mx_internal-a-life-saver/ http://codeofdoom.com/wordpress/2009/03/12/when-and-how-to-use-mx_internal-in-flex/<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&amp;blog=4386605&amp;post=59&amp;subd=shanmukarthik&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I prefer the following two URLs to know better about the mx_internal on flex.</p>
<div id="_mcePaste"><a class="aligncenter" href="http://raghuonflex.wordpress.com/2007/09/03/mx_internal-a-life-saver/" target="_blank">http://raghuonflex.wordpress.com/2007/09/03/mx_internal-a-life-saver/</a></div>
<div id="_mcePaste"><a class="aligncenter" href="http://codeofdoom.com/wordpress/2009/03/12/when-and-how-to-use-mx_internal-in-flex/" target="_blank">http://codeofdoom.com/wordpress/2009/03/12/when-and-how-to-use-mx_internal-in-flex/</a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shanmukarthik.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shanmukarthik.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shanmukarthik.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shanmukarthik.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shanmukarthik.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shanmukarthik.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shanmukarthik.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shanmukarthik.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shanmukarthik.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shanmukarthik.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shanmukarthik.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shanmukarthik.wordpress.com/59/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shanmukarthik.wordpress.com/59/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shanmukarthik.wordpress.com/59/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&amp;blog=4386605&amp;post=59&amp;subd=shanmukarthik&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shanmukarthik.wordpress.com/2010/02/26/what-is-mx_internal-when-and-how-to-use-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cd5c0d36222968c3ae3c1991a620078?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">KarthiK</media:title>
		</media:content>
	</item>
		<item>
		<title>Flex Multiline Button</title>
		<link>http://shanmukarthik.wordpress.com/2010/02/25/flex-multiline-button/</link>
		<comments>http://shanmukarthik.wordpress.com/2010/02/25/flex-multiline-button/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 14:13:25 +0000</pubDate>
		<dc:creator>shanmukarthik</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://shanmukarthik.wordpress.com/?p=56</guid>
		<description><![CDATA[Here is the code that will help us to create a multilined button component in flex. package com.kw.components { import flash.display.DisplayObject; import flash.text.TextLineMetrics; import mx.controls.Button; import mx.core.IFlexDisplayObject; import mx.core.mx_internal; use namespace mx_internal; public class KWButton extends Button { public function KWButton() { super(); } public var tagid:Number; override protected function createChildren():void { if (!textField) { [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&amp;blog=4386605&amp;post=56&amp;subd=shanmukarthik&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here is the code that will help us to create a multilined button component in flex.</p>
<pre>package com.kw.components
{
 import flash.display.DisplayObject;
 import flash.text.TextLineMetrics;

 import mx.controls.Button;
 import mx.core.IFlexDisplayObject;
 import mx.core.mx_internal;
 use namespace mx_internal;

 public class KWButton extends Button
 {
 public function KWButton()
 {
 super();
 }
 public var tagid:Number;
 override protected function createChildren():void
 {
 if (!textField)
 {
 textField = new NoTruncationUITextField();
 textField.styleName = this;
 addChild(DisplayObject(textField));
 }
 super.createChildren();
 textField.multiline = true;
 textField.wordWrap = true;
 textField.width = width;
 }
 override protected function measure():void
 {
 if (!isNaN(explicitWidth))
 {
 var tempIcon:IFlexDisplayObject = getCurrentIcon();
 var w:Number = explicitWidth;
 if (tempIcon)
 w -= tempIcon.width + getStyle("horizontalGap") + getStyle("paddingLeft") + getStyle("paddingRight");
 textField.width = w;
 }
 super.measure();
 }
 override public function measureText(s:String):TextLineMetrics
 {
 textField.text = s;
 var lineMetrics:TextLineMetrics = textField.getLineMetrics(0);
 lineMetrics.width = textField.textWidth + 4;
 lineMetrics.height = textField.textHeight + 4;
 return lineMetrics;
 }
 }
}
import mx.core.UITextField;
class NoTruncationUITextField extends UITextField
{
 public function NoTruncationUITextField()
 {
 super();
 }
 override public function truncateToFit(s:String = null):Boolean
 {
 return false;
 }
}</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shanmukarthik.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shanmukarthik.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shanmukarthik.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shanmukarthik.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shanmukarthik.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shanmukarthik.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shanmukarthik.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shanmukarthik.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shanmukarthik.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shanmukarthik.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shanmukarthik.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shanmukarthik.wordpress.com/56/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shanmukarthik.wordpress.com/56/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shanmukarthik.wordpress.com/56/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&amp;blog=4386605&amp;post=56&amp;subd=shanmukarthik&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shanmukarthik.wordpress.com/2010/02/25/flex-multiline-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cd5c0d36222968c3ae3c1991a620078?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">KarthiK</media:title>
		</media:content>
	</item>
		<item>
		<title>Time conversion, Seconds to minutes, hours</title>
		<link>http://shanmukarthik.wordpress.com/2010/02/25/time-conversion-seconds-to-minutes-hours/</link>
		<comments>http://shanmukarthik.wordpress.com/2010/02/25/time-conversion-seconds-to-minutes-hours/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 14:11:37 +0000</pubDate>
		<dc:creator>shanmukarthik</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://shanmukarthik.wordpress.com/?p=54</guid>
		<description><![CDATA[Here is the function that will help you to convert the given seconds to time format. public static function formatTime ( time:Number ):String { var remainder:Number;             var hours:Number = time / ( 60 * 60 );             remainder = hours - (Math.floor ( hours ));             hours = [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&amp;blog=4386605&amp;post=54&amp;subd=shanmukarthik&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here is the function that will help you to convert the given seconds to time format.</p>
<pre>public static function formatTime ( time:Number ):String
 {
 var remainder:Number;            
 var hours:Number = time / ( 60 * 60 );            
 remainder = hours - (Math.floor ( hours ));            
 hours = Math.floor ( hours );            
 var minutes:Number = remainder * 60;            
 remainder = minutes - (Math.floor ( minutes ));            
 minutes = Math.floor ( minutes );            
 var seconds:Number = remainder * 60;            
 remainder = seconds - (Math.floor ( seconds ));            
 seconds = Math.floor ( seconds );            
 var hString:String = hours &lt; 10 ? "0" + hours : "" + hours;    
 var mString:String = minutes &lt; 10 ? "0" + minutes : "" + minutes;
 var sString:String = seconds &lt; 10 ? "0" + seconds : "" + seconds;                        
 if ( time &lt; 0 || isNaN(time)) return "00:00";                        
 if ( hours &gt; 0 )
 {            
 return hString + ":" + mString + ":" + sString;
 }else
 {
 return mString + ":" + sString;
 }
 }</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shanmukarthik.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shanmukarthik.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shanmukarthik.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shanmukarthik.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shanmukarthik.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shanmukarthik.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shanmukarthik.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shanmukarthik.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shanmukarthik.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shanmukarthik.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shanmukarthik.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shanmukarthik.wordpress.com/54/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shanmukarthik.wordpress.com/54/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shanmukarthik.wordpress.com/54/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&amp;blog=4386605&amp;post=54&amp;subd=shanmukarthik&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shanmukarthik.wordpress.com/2010/02/25/time-conversion-seconds-to-minutes-hours/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cd5c0d36222968c3ae3c1991a620078?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">KarthiK</media:title>
		</media:content>
	</item>
		<item>
		<title>Changing MovieClip&#8217;s registration point using AS3</title>
		<link>http://shanmukarthik.wordpress.com/2010/01/28/changing-movieclips-registration-point-using-as3/</link>
		<comments>http://shanmukarthik.wordpress.com/2010/01/28/changing-movieclips-registration-point-using-as3/#comments</comments>
		<pubDate>Thu, 28 Jan 2010 13:23:10 +0000</pubDate>
		<dc:creator>shanmukarthik</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://shanmukarthik.wordpress.com/?p=48</guid>
		<description><![CDATA[Hey all, here is the simple class that helps you to create a custom MovieClip and you can change its registration point at anytime, package com.karthik.web.display { import flash.display.MovieClip; import flash.events.Event; import flash.geom.Point;     public class KMovieClip extends MovieClip { protected var _registrationX:Number;        // Registration point X protected var _registrationY:Number;        // Registration point [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&amp;blog=4386605&amp;post=48&amp;subd=shanmukarthik&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hey all,</p>
<p>here is the simple class that helps you to create a custom MovieClip and you can change its registration point at anytime,</p>
<pre>package com.karthik.web.display {
 import flash.display.MovieClip;
 import flash.events.Event;
 import flash.geom.Point;    

 public class KMovieClip extends MovieClip {

 protected var _registrationX:Number;        // Registration point X
 protected var _registrationY:Number;        // Registration point Y
 protected var _x:Number;            // User-defined X
 protected var _y:Number;            // User-defined Y

 protected var setToUpdate:Boolean;        // Whether this instance is already set to update on the next Event.RENDER

 // CONSTRUCTOR 

 public function KMovieClip() {
 super();

 // Reads the current __values to keep them
 _x = super.x;
 _y = super.y;
 _registrationX = 0;
 _registrationY = 0;
 fixPosition();
 }

 // INTERNAL functions 

 protected function fixPosition(): void {
 // Using localToGlobal/globalToLocal is less precise than doing it mathematically, but the end result is more accurate inside Flash because it's in sync with Flash's positioning and rotating limitations
 var op:Point = new Point(0, 0);
 var rp:Point = new Point(_registrationX, _registrationY);
 rp = parent.globalToLocal(localToGlobal(rp));
 op = parent.globalToLocal(localToGlobal(op));
 super.x = _x - (rp.x - op.x);
 super.y = _y - (rp.y - op.y);
 }

 protected function requestPositionFix(): void {
 if (Boolean(stage) &amp;&amp; !setToUpdate) {
 setToUpdate = true;
 stage.addEventListener(Event.RENDER, onRender, false, 0, true);
 stage.invalidate();
 }
 }

 // EVENT functions ------------------------------------------------------------------------------------------------

 protected function onRender(e:Event): void {
 stage.removeEventListener(Event.RENDER, onRender);
 setToUpdate = false;
 fixPosition();
 }

 // ACCESSOR functions ---------------------------------------------------------------------------------------------

 override public function get x(): Number {
 return _x;
 }
 override public function set x(__value:Number): void {
 _x = __value;
 requestPositionFix();
 }

 override public function get y(): Number {
 return _y;
 }
 override public function set y(__value:Number): void {
 _y = __value;
 requestPositionFix();
 }

 override public function set rotation(__value:Number): void {
 super.rotation = __value;
 requestPositionFix();
 }
 override public function set scaleX(__value:Number): void {
 super.scaleX = __value;
 requestPositionFix();
 }
 override public function set scaleY(__value:Number): void {
 super.scaleY = __value;
 requestPositionFix();
 }

 public function get registrationX(): Number {
 return _registrationX;
 }
 public function set registrationX(__value:Number): void {
 _registrationX = __value;
 requestPositionFix();
 }

 public function get registrationY(): Number {
 return _registrationY;
 }
 public function set registrationY(__value:Number): void {
 _registrationY = __value;
 requestPositionFix();
 }

 }
}

After creating an instance of this MovieClip class, you can change the registration point as below,
<pre>mc.registrationX = 10;
mc.registrationY = 10;
</pre>
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shanmukarthik.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shanmukarthik.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shanmukarthik.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shanmukarthik.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shanmukarthik.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shanmukarthik.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shanmukarthik.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shanmukarthik.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shanmukarthik.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shanmukarthik.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shanmukarthik.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shanmukarthik.wordpress.com/48/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shanmukarthik.wordpress.com/48/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shanmukarthik.wordpress.com/48/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&amp;blog=4386605&amp;post=48&amp;subd=shanmukarthik&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shanmukarthik.wordpress.com/2010/01/28/changing-movieclips-registration-point-using-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cd5c0d36222968c3ae3c1991a620078?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">KarthiK</media:title>
		</media:content>
	</item>
		<item>
		<title>FLEX/AIR Dispatch Custom Events from Popup or between mxml components</title>
		<link>http://shanmukarthik.wordpress.com/2010/01/19/flexair-dispatch-custom-events-from-popup-or-between-mxml-components/</link>
		<comments>http://shanmukarthik.wordpress.com/2010/01/19/flexair-dispatch-custom-events-from-popup-or-between-mxml-components/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 10:34:30 +0000</pubDate>
		<dc:creator>shanmukarthik</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://shanmukarthik.wordpress.com/?p=45</guid>
		<description><![CDATA[Here is the way how we can achieve the thing dispatching custom events between components. PopUp window: &#60;mx:script&#62; dispatchEvent( new Event(MyEvent.MY_DATA_CHANGED, true)); &#60;/mx:script&#62; Other mxml component: &#60;mx:script&#62; private function onClick():void { var win:MyForm = PopUpManager.createPopUp(this, MyForm, true) as MyForm; win.addEventListener(MyEvent.MY_DATA_CHANGED, onMyDataChanged); } private function onMyDataChanged(event:Event):void { trace("DATA CHANGED"); } &#60;/mx:script&#62; MyEvent: public static const MY_DATA_CHANGED:String [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&amp;blog=4386605&amp;post=45&amp;subd=shanmukarthik&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here is the way how we can achieve the thing dispatching custom events between components.</p>
<p><span style="text-decoration:underline;">PopUp window:</span></p>
<pre><span style="color:#0000ff;">&lt;mx:script&gt;
dispatchEvent( new Event(MyEvent.MY_DATA_CHANGED, true));
&lt;/mx:script&gt;</span></pre>
<p><span style="text-decoration:underline;">Other mxml component:</span></p>
<pre><span style="color:#0000ff;">&lt;mx:script&gt;
     private function onClick():void {
       var win:MyForm = PopUpManager.createPopUp(this, MyForm, true) as MyForm;
       win.addEventListener(MyEvent.MY_DATA_CHANGED, onMyDataChanged);
     }
     private function onMyDataChanged(event:Event):void {
       trace("DATA CHANGED");
     }
&lt;/mx:script&gt;</span>
</pre>
<p><span style="text-decoration:underline;">MyEvent:</span></p>
<pre><span style="color:#0000ff;">public static const MY_DATA_CHANGED:String = "myDataChanged";</span></pre>
<p>I hope this will help.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shanmukarthik.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shanmukarthik.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shanmukarthik.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shanmukarthik.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shanmukarthik.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shanmukarthik.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shanmukarthik.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shanmukarthik.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shanmukarthik.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shanmukarthik.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shanmukarthik.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shanmukarthik.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shanmukarthik.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shanmukarthik.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&amp;blog=4386605&amp;post=45&amp;subd=shanmukarthik&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shanmukarthik.wordpress.com/2010/01/19/flexair-dispatch-custom-events-from-popup-or-between-mxml-components/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cd5c0d36222968c3ae3c1991a620078?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">KarthiK</media:title>
		</media:content>
	</item>
		<item>
		<title>Flex/AS3 Convert string to uppercase on each word</title>
		<link>http://shanmukarthik.wordpress.com/2010/01/19/flexas3-convert-string-to-uppercase-on-each-word/</link>
		<comments>http://shanmukarthik.wordpress.com/2010/01/19/flexas3-convert-string-to-uppercase-on-each-word/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 10:27:05 +0000</pubDate>
		<dc:creator>shanmukarthik</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://shanmukarthik.wordpress.com/?p=43</guid>
		<description><![CDATA[Here is the way, we can do convert a string to uppercase on each word starting letters as like in the PHP (ucword). str.replace(/\b./g,function(...m):String{return m[0].toUpperCase()});<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&amp;blog=4386605&amp;post=43&amp;subd=shanmukarthik&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here is the way, we can do convert a string to uppercase on each word starting letters as like in the PHP (ucword).</p>
<pre><code><strong><span style="color:#0000ff;">str.replace(/\b./g,function(...m):String{return m[0].toUpperCase()});</span></strong>
</code></pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shanmukarthik.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shanmukarthik.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shanmukarthik.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shanmukarthik.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shanmukarthik.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shanmukarthik.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shanmukarthik.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shanmukarthik.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shanmukarthik.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shanmukarthik.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shanmukarthik.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shanmukarthik.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shanmukarthik.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shanmukarthik.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&amp;blog=4386605&amp;post=43&amp;subd=shanmukarthik&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shanmukarthik.wordpress.com/2010/01/19/flexas3-convert-string-to-uppercase-on-each-word/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cd5c0d36222968c3ae3c1991a620078?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">KarthiK</media:title>
		</media:content>
	</item>
		<item>
		<title>Compare two xml</title>
		<link>http://shanmukarthik.wordpress.com/2009/12/05/compare-two-xml/</link>
		<comments>http://shanmukarthik.wordpress.com/2009/12/05/compare-two-xml/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 13:56:37 +0000</pubDate>
		<dc:creator>shanmukarthik</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://shanmukarthik.wordpress.com/?p=40</guid>
		<description><![CDATA[package{ import flash.display.Sprite; public class Main extends Sprite{ public function Main(){ var msg1:XML = &#60;GREETING&#62; &#60;TO&#62;A&#60;/TO&#62; &#60;FROM&#62;Programmer&#60;/FROM&#62; &#60;MESSAGE&#62;Hello&#60;/MESSAGE&#62; &#60;/GREETING&#62;; var msg2:XML = &#60;GREETING&#62; &#60;TO&#62;A&#60;/TO&#62; &#60;FROM&#62;Programmer&#60;/FROM&#62; &#60;MESSAGE&#62;Hello&#60;/MESSAGE&#62; &#60;/GREETING&#62;; trace(msg1.* == msg2.*);  // Displays: true } } }<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&amp;blog=4386605&amp;post=40&amp;subd=shanmukarthik&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>package{<br />
import flash.display.Sprite;</p>
<p>public class Main extends Sprite{<br />
public function Main(){<br />
var msg1:XML = &lt;GREETING&gt;<br />
&lt;TO&gt;A&lt;/TO&gt;<br />
&lt;FROM&gt;Programmer&lt;/FROM&gt;<br />
&lt;MESSAGE&gt;Hello&lt;/MESSAGE&gt;<br />
&lt;/GREETING&gt;;</p>
<p>var msg2:XML = &lt;GREETING&gt;<br />
&lt;TO&gt;A&lt;/TO&gt;<br />
&lt;FROM&gt;Programmer&lt;/FROM&gt;<br />
&lt;MESSAGE&gt;Hello&lt;/MESSAGE&gt;<br />
&lt;/GREETING&gt;;</p>
<p>trace(msg1.* == msg2.*);  // Displays: true<br />
}<br />
}<br />
}</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shanmukarthik.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shanmukarthik.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shanmukarthik.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shanmukarthik.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shanmukarthik.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shanmukarthik.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shanmukarthik.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shanmukarthik.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shanmukarthik.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shanmukarthik.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shanmukarthik.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shanmukarthik.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shanmukarthik.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shanmukarthik.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&amp;blog=4386605&amp;post=40&amp;subd=shanmukarthik&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shanmukarthik.wordpress.com/2009/12/05/compare-two-xml/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cd5c0d36222968c3ae3c1991a620078?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">KarthiK</media:title>
		</media:content>
	</item>
		<item>
		<title>Comparing Two Objects in Actionscript</title>
		<link>http://shanmukarthik.wordpress.com/2009/12/05/comparing-two-objects-in-actionscript/</link>
		<comments>http://shanmukarthik.wordpress.com/2009/12/05/comparing-two-objects-in-actionscript/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 13:54:20 +0000</pubDate>
		<dc:creator>shanmukarthik</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://shanmukarthik.wordpress.com/?p=36</guid>
		<description><![CDATA[Use this function to compare two objects that contains large number of properties. public function compareObject(obj1:Object,obj2:Object):Boolean { var buffer1:ByteArray = new ByteArray(); buffer1.writeObject(obj1); var buffer2:ByteArray = new ByteArray(); buffer2.writeObject(obj2);   // compare the lengths var size:uint = buffer1.length; if (buffer1.length == buffer2.length) { buffer1.position = 0; buffer2.position = 0;   // then the bits while [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&amp;blog=4386605&amp;post=36&amp;subd=shanmukarthik&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>
<div>
<pre>Use this function to compare two objects that contains large number of properties.

public function compareObject(obj1:Object,obj2:Object):Boolean
{
    var buffer1:ByteArray = new ByteArray();
    buffer1.writeObject(obj1);
    var buffer2:ByteArray = new ByteArray();
    buffer2.writeObject(obj2);
 
    // compare the lengths
    var size:uint = buffer1.length;
    if (buffer1.length == buffer2.length) {
        buffer1.position = 0;
        buffer2.position = 0;
 
        // then the bits
        while (buffer1.position &lt; size) {
            var v1:int = buffer1.readByte();
            if (v1 != buffer2.readByte()) {
                return false;
            }
        }
        return true;
    }
    return false;
}</pre>
</div>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shanmukarthik.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shanmukarthik.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shanmukarthik.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shanmukarthik.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shanmukarthik.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shanmukarthik.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shanmukarthik.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shanmukarthik.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shanmukarthik.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shanmukarthik.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shanmukarthik.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shanmukarthik.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shanmukarthik.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shanmukarthik.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&amp;blog=4386605&amp;post=36&amp;subd=shanmukarthik&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shanmukarthik.wordpress.com/2009/12/05/comparing-two-objects-in-actionscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cd5c0d36222968c3ae3c1991a620078?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">KarthiK</media:title>
		</media:content>
	</item>
		<item>
		<title>MP3 Player in AS3</title>
		<link>http://shanmukarthik.wordpress.com/2008/09/17/mp3-player-in-as3/</link>
		<comments>http://shanmukarthik.wordpress.com/2008/09/17/mp3-player-in-as3/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 08:44:32 +0000</pubDate>
		<dc:creator>shanmukarthik</dc:creator>
				<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://shanmukarthik.wordpress.com/?p=27</guid>
		<description><![CDATA[This the code which you may use it to create a MP3 player using AS3. Copy these scripts in a class called Mp3Player and use this class in your flash cs3 as follows. var player:Mp3Player = new Mp3Player(); player.play('blah.mp3'); or var player:Mp3Player = new Mp3Player(); player.playlist = ['item1.mp3','item2.mp3']; player.next(); package { import flash.events.Event; import flash.events.EventDispatcher; [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&amp;blog=4386605&amp;post=27&amp;subd=shanmukarthik&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><code>This the code which you may use it to create a MP3 player using AS3. Copy these scripts in a class called </code>Mp3Player and use this class in your flash cs3 as follows.</p>
<p><em><code>var player:Mp3Player =  new Mp3Player();<br />
player.play('blah.mp3');<br />
or<br />
var player:Mp3Player =  new Mp3Player();<br />
player.playlist = ['item1.mp3','item2.mp3'];<br />
player.next();</code></em></p>
<pre>package {
	import flash.events.Event;
	import flash.events.EventDispatcher;
	import flash.media.Sound;
	import flash.media.SoundChannel;
	import flash.media.SoundTransform;
	import flash.net.URLRequest;
	import flash.utils.clearInterval;
	import flash.utils.setInterval;		

	public class Mp3Player extends EventDispatcher {

		static public const EVENT_TIME_CHANGE:String = 'Mp3Player.TimeChange';
		static public const EVENT_VOLUME_CHANGE:String = 'Mp3Player.VolumeChange';
		static public const EVENT_PAN_CHANGE:String = 'Mp3Player.PanningChange';
		static public const EVENT_PAUSE:String = 'Mp3Player.Pause';
		static public const EVENT_UNPAUSE:String = 'Mp3Player.Unpause';
		static public const EVENT_PLAY:String = 'Mp3Player.Play';
		//
		public var playing:Boolean;
		public var playlist:Array;
		public var currentUrl:String;
		public var playlistIndex:int = -1;
		//
		protected var sound:Sound;
		protected var soundChannel:SoundChannel;
		protected var soundTrans:SoundTransform;
		protected var progressInt:Number;

		public function play( url:String ):void {
			clearInterval(progressInt);
			if ( sound ) {
				soundChannel.stop();
			}
			currentUrl = url;
			sound = new Sound();
			sound.addEventListener(Event.COMPLETE, onLoadSong);
			sound.addEventListener(Event.ID3, onId3Info);

			sound.load(new URLRequest(currentUrl));

			soundChannel = sound.play();
			if ( soundTrans ) {
				soundChannel.soundTransform = soundTrans;
			} else {
				soundTrans = soundChannel.soundTransform;
			}
			soundChannel.addEventListener(Event.COMPLETE, onSongEnd);
			playing = true;
			clearInterval(progressInt);
			progressInt = setInterval(updateProgress, 30);
			dispatchEvent(new Event(EVENT_PLAY));
		}
		public function pause():void {
			if ( soundChannel ) {
				soundChannel.stop();
				dispatchEvent(new Event(EVENT_PAUSE));
				playing = false;
			}
		}
		public function unpause():void {
			if ( playing ) return;
			if ( soundChannel.position &lt; sound.length ) {
				soundChannel = sound.play(soundChannel.position);
				soundChannel.soundTransform = soundTrans;
			} else {
				soundChannel = sound.play();
			}
			dispatchEvent(new Event(EVENT_UNPAUSE));
			playing = true;
		}
		public function seek( percent:Number ):void {
			soundChannel.stop();
			soundChannel = sound.play(sound.length * percent);
		}
		public function prev():void {
			playlistIndex--;
			if ( playlistIndex &lt; 0 ) playlistIndex = playlist.length - 1;
			play(playlist[playlistIndex]);
		}
		public function next():void {
			playlistIndex++;
			if ( playlistIndex == playlist.length ) playlistIndex = 0;
			play(playlist[playlistIndex]);
		}
		public function get volume():Number {
			if (!soundTrans) return 0;
			return soundTrans.volume;
		}
		public function set volume( n:Number ):void {
			if ( !soundTrans ) return;
			soundTrans.volume = n;
			soundChannel.soundTransform = soundTrans;
			dispatchEvent(new Event(EVENT_VOLUME_CHANGE));
		}
		public function get pan():Number {
			if (!soundTrans) return 0;
			return soundTrans.pan;
		}
		public function set pan( n:Number ):void {
			if ( !soundTrans ) return;
			soundTrans.pan = n;
			soundChannel.soundTransform = soundTrans;
			dispatchEvent(new Event(EVENT_PAN_CHANGE));
		}
		public function get length():Number {
			return sound.length;
		}
		public function get time():Number {
			return soundChannel.position;
		}
		public function get timePretty():String {
			var secs:Number = soundChannel.position / 1000;
			var mins:Number = Math.floor(secs / 60);
			secs = Math.floor(secs % 60);
			return mins + ":" + (secs &lt; 10 ? "0" : "") + secs;
		}
		public function get timePercent():Number {
			if ( !sound.length ) return 0;
			return soundChannel.position / sound.length;
		}
		protected function onLoadSong( e:Event ):void {
		}
		protected function onSongEnd( e:Event ):void {
			if ( playlist )
				next();
		}
		protected function onId3Info( e:Event ):void {
			dispatchEvent(new Event(Event.ID3, e.target.id3));
		}
		protected function updateProgress():void {
			dispatchEvent(new Event(EVENT_TIME_CHANGE));
			if ( timePercent &gt;= .99 ) {
				onSongEnd(new Event(Event.COMPLETE));
				clearInterval(progressInt);
			}
		}
	}
}</pre>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shanmukarthik.wordpress.com/27/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shanmukarthik.wordpress.com/27/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shanmukarthik.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shanmukarthik.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shanmukarthik.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shanmukarthik.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shanmukarthik.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shanmukarthik.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shanmukarthik.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shanmukarthik.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shanmukarthik.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shanmukarthik.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shanmukarthik.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shanmukarthik.wordpress.com/27/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shanmukarthik.wordpress.com/27/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shanmukarthik.wordpress.com/27/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&amp;blog=4386605&amp;post=27&amp;subd=shanmukarthik&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shanmukarthik.wordpress.com/2008/09/17/mp3-player-in-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cd5c0d36222968c3ae3c1991a620078?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">KarthiK</media:title>
		</media:content>
	</item>
		<item>
		<title>Current System Time using Timer()</title>
		<link>http://shanmukarthik.wordpress.com/2008/09/11/current-system-time-using-timer/</link>
		<comments>http://shanmukarthik.wordpress.com/2008/09/11/current-system-time-using-timer/#comments</comments>
		<pubDate>Thu, 11 Sep 2008 06:07:44 +0000</pubDate>
		<dc:creator>shanmukarthik</dc:creator>
				<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://shanmukarthik.wordpress.com/?p=23</guid>
		<description><![CDATA[This is about basically how to get your current system time using Timer() function using AS3.   For this you need to create four dynamic text boxes and name those as txtHrs, txtMins, txtSecs, and txtDate.   Put the following actions in your movie frame and create a class and use these.   var time:Timer = new Timer(10); tm.addEventListener(TimerEvent.TIMER, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&amp;blog=4386605&amp;post=23&amp;subd=shanmukarthik&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is about basically how to get your current system time using Timer() function using AS3.</p>
<p> </p>
<p>For this you need to create four dynamic text boxes and name those as <em>txtHrs</em>, <em>txtMins</em>, <em>txtSecs</em>, and <em>txtDate</em>.</p>
<p> </p>
<p>Put the following actions in your movie frame and create a class and use these.</p>
<p> </p>
<p style="text-align:left;"><em>var time:Timer = new Timer(10);</em></p>
<p style="text-align:left;"><em>tm.addEventListener(TimerEvent.TIMER, update);</em></p>
<p style="text-align:left;"><em>function update(tevt:TimerEvent):void {</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         var now:Date = new Date();</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         var hr:Number = now.hours;</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         var min:Number = now.minutes;</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         var sec:Number = now.seconds;</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         if (hr &gt; 12) {</em></p>
<p style="text-align:left;"><span><em></em></span><em>                                                  hr -= 12;</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         }</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         txtHrs.text = String(hr);</em></p>
<p style="text-align:left;"><span><em> </em></span></p>
<p style="text-align:left;"><span><em></em></span><em>                         if (min &lt; 10) {</em></p>
<p style="text-align:left;"><span><em></em></span><em>                                                  txtMins.text = &#8220;0&#8243;;</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         }</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         else {</em></p>
<p style="text-align:left;"><span><em></em></span><em>                                                  txtMins.text = &#8220;&#8221;;</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         }</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         txtMins.appendText(String(min));</em></p>
<p style="text-align:left;"><span><em> </em></span></p>
<p style="text-align:left;"><span><em></em></span><em>                         if (sec &lt; 10) {</em></p>
<p style="text-align:left;"><span><em></em></span><em>                                                  txtSecs.text = &#8220;0&#8243;;</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         }</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         else {</em></p>
<p style="text-align:left;"><span><em></em></span><em>                                                  txtSecs.text = &#8220;&#8221;;</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         }</em></p>
<p style="text-align:left;"><span><em></em></span><em>                         txtSecs.appendText(String(sec));</em></p>
<p style="text-align:left;"><span><em> </em></span></p>
<p style="text-align:left;"><span><em></em></span><em>                         txtDate.text = now.toDateString();</em></p>
<p style="text-align:left;"><em>}</em></p>
<p style="text-align:left;"><em><br />
</em></p>
<p style="text-align:left;"><em>time.start();</em></p>
<p> </p>
<p>Now test your movie and you can see your system time on your movie display.</p>
<p>Try this!.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/shanmukarthik.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/shanmukarthik.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/shanmukarthik.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/shanmukarthik.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/shanmukarthik.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/shanmukarthik.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/shanmukarthik.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/shanmukarthik.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/shanmukarthik.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/shanmukarthik.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/shanmukarthik.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/shanmukarthik.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/shanmukarthik.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/shanmukarthik.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/shanmukarthik.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/shanmukarthik.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=shanmukarthik.wordpress.com&amp;blog=4386605&amp;post=23&amp;subd=shanmukarthik&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://shanmukarthik.wordpress.com/2008/09/11/current-system-time-using-timer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/8cd5c0d36222968c3ae3c1991a620078?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">KarthiK</media:title>
		</media:content>
	</item>
	</channel>
</rss>
