<?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>PRAVINRANJAN&#039;s Blog</title>
	<atom:link href="http://pranjan.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://pranjan.com</link>
	<description>About flash</description>
	<lastBuildDate>Thu, 04 Aug 2011 12:17:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Use flash based animation in Flex and control it.</title>
		<link>http://pranjan.com/?p=114</link>
		<comments>http://pranjan.com/?p=114#comments</comments>
		<pubDate>Thu, 04 Aug 2011 12:15:47 +0000</pubDate>
		<dc:creator>flas3</dc:creator>
				<category><![CDATA[Flash 4]]></category>
		<category><![CDATA[Flash AS3]]></category>
		<category><![CDATA[Flex 4]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[actionscript 3]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[embed]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[swf]]></category>
		<category><![CDATA[swfloader]]></category>

		<guid isPermaLink="false">http://pranjan.com/?p=114</guid>
		<description><![CDATA[Few days ago, I was stuck in a weird problem. The problem was: Need an animation that need to be controlled by itself as well through flex. Actually I had to use the flash cs3 actionscript3 based animation into my flex 4 based application. So, I had following options... 1. Use SWFLoader component directly. 2. [...]]]></description>
			<content:encoded><![CDATA[<p>Few days ago, I was stuck in a weird problem.</p>
<p>The problem was:</p>
<pre>Need an animation that need to be controlled by itself as well through flex.
Actually I had to use the flash cs3 actionscript3 based animation into my flex 4 based application.

So, I had following options...
1. Use SWFLoader component directly.
2. Use Loader or SWFLoader and get actual bytearray, load it as MovieClip.
3. Embed the swf and extract its symbol as class. This class will be further loaded as MovieClip.
4. Embed the animation with custom class created in flex.

So, lets talk about the last option...

First create animation with flash cs3. Make sure publish settings must be targeted to actionscript 3- FP9.
Create the animation in movieclip and export as symbol. Right click and make export for actionscript.
Now export and publish the swf.

Back to Flex 4...

Create a class something like this as per your need...

[Sample]
package com.prox
{
    import flash.display.MovieClip;
    import flash.events.Event;
    import flash.events.TimerEvent;
    import flash.utils.Timer;

    <strong>[Embed(source="res/swoosh.swf", symbol='Swoosh')]</strong>
    public class Swoosh extends MovieClip
    {
        private var tmr:Timer;
        public function Swoosh()
        {
            addEventListener(Event.ADDED_TO_STAGE, clbAddedToStage);
        }

        private function clbAddedToStage(event:Event):void
        {
            event.stopImmediatePropagation();
            removeEventListener(Event.ADDED_TO_STAGE, clbAddedToStage);

            gotoAndStop("park");
        }
...
...

Now, just use this class as normal custom classes you use...

var swoosh:Swoosh = new Swoosh();
addChild(swoosh);

That's it.</pre>
]]></content:encoded>
			<wfw:commentRss>http://pranjan.com/?feed=rss2&#038;p=114</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Error in iPhone while localization</title>
		<link>http://pranjan.com/?p=111</link>
		<comments>http://pranjan.com/?p=111#comments</comments>
		<pubDate>Tue, 31 May 2011 13:06:58 +0000</pubDate>
		<dc:creator>flas3</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://pranjan.com/?p=111</guid>
		<description><![CDATA[Command /Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copystrings failed with exit code 127 The error has taken hours of my time. Just copy and execute following command. sh-3.2# cp /usr/bin/plutil /Developer/usr/bin/plutil Thats it. huh!]]></description>
			<content:encoded><![CDATA[<pre>Command /Developer/Library/Xcode/Plug-ins/CoreBuildTasks.xcplugin/Contents/Resources/copystrings failed with exit code 127

The error has taken hours of my time. Just copy and execute following command.</pre>
<pre>sh-3.2# cp /usr/bin/plutil /Developer/usr/bin/plutil</pre>
<p>Thats it. huh!</p>
]]></content:encoded>
			<wfw:commentRss>http://pranjan.com/?feed=rss2&#038;p=111</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Memory management, A habit!</title>
		<link>http://pranjan.com/?p=106</link>
		<comments>http://pranjan.com/?p=106#comments</comments>
		<pubDate>Fri, 15 Apr 2011 09:38:43 +0000</pubDate>
		<dc:creator>flas3</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[memory]]></category>

		<guid isPermaLink="false">http://pranjan.com/?p=106</guid>
		<description><![CDATA[Several times, programmers stuck in memory management issues. This is a basic issue which consumes many precious timeline hours. In my view, memory management has a very separate track. I usually follow only one thing&#8230; What you create, remove it yourself. This is the main mantra for all programmers for any language. Never ever rely [...]]]></description>
			<content:encoded><![CDATA[<p>Several times, programmers stuck in memory management issues. This is a basic issue which consumes many precious timeline hours.</p>
<p>In my view, memory management has a very separate track. I usually follow only one thing&#8230;</p>
<p><strong>What you create, remove it yourself.</strong></p>
<p>This is the main mantra for all programmers for any language. Never ever rely on self cleaning or GC. I am telling you what I experience.</p>
<p>Why not GC?</p>
<p>First thing, GC don&#8217;t know what you want to express with your code and so it works just as a routine. You better understand your baby and its need. Second thing, GC always take more time in cleaning than your logic. GC is a general routine and works similar for all. It can not behave special with your code.</p>
<p>So&#8230;use your own memory leak prevention system. The memory management techniques should be used since the beginning of the  project</p>
<p>Make a habit to remove everything what you have created. This will benefit you always in terms of precious timeline hours.</p>
<p>Lets look an example of negligence&#8230;</p>
<pre>private function assignData(data:ArrayCollection):void
{
     this.objData = data;
}
</pre>
<p>Now what about the data:ArrayCollection which came here as a parameter? I have seen in 80% cases, people leave it as it is. This is also a reference to something and also occupy some memory. Remove it.</p>
<p>WHAT YOU CREATE, REMOVE IT.</p>
]]></content:encoded>
			<wfw:commentRss>http://pranjan.com/?feed=rss2&#038;p=106</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding xml node in xml in flex: a simple way.</title>
		<link>http://pranjan.com/?p=103</link>
		<comments>http://pranjan.com/?p=103#comments</comments>
		<pubDate>Tue, 12 Apr 2011 07:36:56 +0000</pubDate>
		<dc:creator>flas3</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://pranjan.com/?p=103</guid>
		<description><![CDATA[var xmlScreenShots:XML = new XML("&#60;screenshots/&#62;"); var nLen:int = 10; var i:int; var strData:String = "Value to be inserted."; for(i = 0; i &#60; nLen; i++) {       xmlScreenShots.appendChild(&#60;mynode&#62;{strData}&#60;/mynode&#62;); }]]></description>
			<content:encoded><![CDATA[<pre>var xmlScreenShots:XML = new XML("&lt;screenshots/&gt;");</pre>
<pre>var nLen:int = 10;</pre>
<pre>var i:int;</pre>
<pre>var strData:String = "Value to be inserted.";
</pre>
<pre>for(i = 0; i &lt; nLen; i++)
{
      xmlScreenShots.appendChild(&lt;mynode&gt;{strData}&lt;/mynode&gt;);
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://pranjan.com/?feed=rss2&#038;p=103</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>error initializing java runtime environment. you may need to reinstall flash</title>
		<link>http://pranjan.com/?p=100</link>
		<comments>http://pranjan.com/?p=100#comments</comments>
		<pubDate>Thu, 27 Jan 2011 12:15:22 +0000</pubDate>
		<dc:creator>flas3</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://pranjan.com/?p=100</guid>
		<description><![CDATA[In Flash cs3 on mac, several times you may get this error&#8230; &#8220;error initializing java runtime environment. you may need to reinstall flash&#8221; To get rid of this, open a terminal and type this&#8230; cd /System/Library/Frameworks/JavaVM.framework/Versions Now, execute this sudo&#8230; sudo ln -fhsv 1.5 CurrentJDK Same as this you can change to other installed version. [...]]]></description>
			<content:encoded><![CDATA[<p>In Flash cs3 on mac, several times you may get this error&#8230;</p>
<p>&#8220;error initializing java runtime environment. you may need to reinstall flash&#8221;</p>
<p>To get rid of this, open a terminal and type this&#8230;</p>
<pre>cd /System/Library/Frameworks/JavaVM.framework/Versions
</pre>
<p>Now, execute this sudo&#8230;</p>
<pre>sudo ln -fhsv 1.5 CurrentJDK</pre>
<p>Same as this you can change to other installed version.</p>
<p>Thats it.</p>
]]></content:encoded>
			<wfw:commentRss>http://pranjan.com/?feed=rss2&#038;p=100</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AIR2 with NativeProcess and ImageMagick</title>
		<link>http://pranjan.com/?p=95</link>
		<comments>http://pranjan.com/?p=95#comments</comments>
		<pubDate>Tue, 15 Jun 2010 10:04:39 +0000</pubDate>
		<dc:creator>flas3</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Adobe AIR]]></category>
		<category><![CDATA[AIR2]]></category>
		<category><![CDATA[extendedDesktop]]></category>
		<category><![CDATA[NativeProcess]]></category>
		<category><![CDATA[NativeProcessStartupInfo]]></category>
		<category><![CDATA[supportedProfiles]]></category>

		<guid isPermaLink="false">http://pranjan.com/?p=95</guid>
		<description><![CDATA[Hi all again. AIR 2.0 is launched. A much awaited version that I was waiting for last 2 years. Lots of good things but what I like most is NativeProcess (run executables within as native process). I had done lots of tricks to execute commandline executables. But now its much easier. I bet&#8230;this feature alone, [...]]]></description>
			<content:encoded><![CDATA[<p>Hi all again. AIR 2.0 is launched. A much awaited version that I was waiting for last 2 years. Lots of good things but what I like most is NativeProcess (run executables within as native process). I had done lots of tricks to execute commandline executables. But now its much easier. I bet&#8230;this feature alone, will give Adobe AIR a new height.</p>
<p>I have done some work with ImageMagick.</p>
<p>Here is the MagickUtils class.</p>
<pre>package pravin.magick
{
 import flash.desktop.NativeProcess;
 import flash.desktop.NativeProcessStartupInfo;
 import flash.events.Event;
 import flash.events.ProgressEvent;
 import flash.events.IOErrorEvent;
 import flash.events.NativeProcessExitEvent;
 import flash.filesystem.File;
 /**
 * Image magick utility to use in Adobe AIR applications using NativeProcess.
 *  @author Pravin Ranjan
 *  @Date 16 June, 2010.
 */
 public class MagickUtils
 {
 private var objWorkingFolder:File;
 private var objOutFolder:File;
 private var process:NativeProcess;
 private var objConvertExe:File;
 /*Explicitely declared constructor.*/
 public function MagickUtils(objWorkingFolder:File,
 objOutFolder:File, onOutputData:Function,
 onErrorData:Function, onExit:Function, onIOError:Function)
 {
 this.objWorkingFolder = objWorkingFolder;
 this.objOutFolder = objOutFolder;

 objConvertExe = File.applicationDirectory.resolvePath("imagemagik/win/convert.exe");

 process = new NativeProcess();
 process.addEventListener(ProgressEvent.STANDARD_OUTPUT_DATA, onOutputData);
 process.addEventListener(ProgressEvent.STANDARD_ERROR_DATA, onErrorData);
 process.addEventListener(NativeProcessExitEvent.EXIT, onExit);
 process.addEventListener(IOErrorEvent.STANDARD_OUTPUT_IO_ERROR, onIOError);
 process.addEventListener(IOErrorEvent.STANDARD_ERROR_IO_ERROR, onIOError);
 }

 public function convertTo(strFromImage:String, strToImage:String):void
 {
 var objFile:File = objWorkingFolder.resolvePath(strFromImage);
 strFromImage = objFile.nativePath;
 strToImage = objOutFolder.nativePath + File.separator + strToImage;
 trace("strFromImage: " + strFromImage);
 trace("strToImage: " + strToImage);

 var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
 nativeProcessStartupInfo.executable = objConvertExe;
 var processArgs:Vector.&lt;String&gt; = new Vector.&lt;String&gt;();
 processArgs.push(strFromImage);
 processArgs.push(strToImage);
 nativeProcessStartupInfo.arguments = processArgs;
 process.start(nativeProcessStartupInfo);
 }
 }
}
</pre>
<p>AND here is main class&#8230;</p>
<pre>package
{
 import flash.display.Sprite;
 import flash.desktop.NativeProcess;
 import flash.desktop.NativeProcessStartupInfo;
 import flash.events.Event;
 import flash.events.ProgressEvent;
 import flash.events.IOErrorEvent;
 import flash.events.NativeProcessExitEvent;
 import flash.filesystem.File;
 import pravin.magick.MagickUtils;

 public class NativeProcessExample extends Sprite
 {
 public var process:NativeProcess;

 public function NativeProcessExample()
 {
 if(NativeProcess.isSupported)
 {
 setupAndLaunch();
 }
 else
 {
 trace("NativeProcess not supported.");
 }
 }

 public function setupAndLaunch():void
 {     
 var magik:MagickUtils = new MagickUtils(File.applicationDirectory, File.applicationDirectory, onOutputData, onErrorData, onExit, onIOError);
 magik.convertTo("MyImage.jpg", "OutImage.png");
 }

 public function onOutputData(event:ProgressEvent):void
 {
 trace("Got: ", process.standardOutput.readUTFBytes(process.standardOutput.bytesAvailable));
 }

 public function onErrorData(event:ProgressEvent):void
 {
 trace("ERROR -", process.standardError.readUTFBytes(process.standardError.bytesAvailable));
 }

 public function onExit(event:NativeProcessExitEvent):void
 {
 trace("Process exited with ", event.exitCode);
 }

 public function onIOError(event:IOErrorEvent):void
 {
 trace(event.toString());
 }
 }
}
</pre>
<p>ImageMagick path need to be changed and wow. It works perfectly. My app executes convert.exe and my desired output is generated.</p>
<p>Wait a minute&#8230;</p>
<p>Now what you need. AIR 2.0 SDK, AIR 2.0 runtime, ImageMagick and flash CS4 (latest one).</p>
<p>Your app xml would look like this&#8230;</p>
<address>&lt;?xml version =&#8221;1.0&#8243; encoding=&#8221;utf-8&#8243; ?&gt;<strong>&lt;application xmlns=&#8221;http://ns.adobe.com/air/application/2.0&#8243;&gt;</strong>&lt;id&gt;com.adobe.example.nativeprocess&lt;/id&gt;<strong>&lt;supportedProfiles&gt;extendedDesktop&lt;/supportedProfiles&gt;</strong>&lt;version&gt;1.0&lt;/version&gt;&lt;filename&gt;nativeprocess&lt;/filename&gt;&lt;description&gt;&lt;/description&gt;&lt;!&#8211; To localize the description, use the following format for the description element.&lt;description&gt;&lt;text xml:lang=&#8221;en&#8221;&gt;English App description goes here&lt;/text&gt;&lt;text xml:lang=&#8221;fr&#8221;&gt;French App description goes here&lt;/text&gt;&lt;text xml:lang=&#8221;ja&#8221;&gt;Japanese App description goes here&lt;/text&gt;&lt;/description&gt;&#8211;&gt;&lt;name&gt;nativeprocess&lt;/name&gt;&lt;!&#8211; To localize the name, use the following format for the name element.&lt;name&gt;&lt;text xml:lang=&#8221;en&#8221;&gt;English App name goes here&lt;/text&gt;&lt;text xml:lang=&#8221;fr&#8221;&gt;French App name goes here&lt;/text&gt;&lt;text xml:lang=&#8221;ja&#8221;&gt;Japanese App name goes here&lt;/text&gt;&lt;/name&gt;&#8211;&gt;&lt;copyright&gt;&lt;/copyright&gt;&lt;initialWindow&gt;&lt;content&gt;nativeprocess.swf&lt;/content&gt;&lt;systemChrome&gt;standard&lt;/systemChrome&gt;&lt;transparent&gt;false&lt;/transparent&gt;&lt;visible&gt;true&lt;/visible&gt;&lt;/initialWindow&gt;&lt;icon&gt;&lt;/icon&gt;&lt;customUpdateUI&gt;false&lt;/customUpdateUI&gt;&lt;allowBrowserInvocation&gt;false&lt;/allowBrowserInvocation&gt;&lt;/application&gt;</address>
<address> </address>
<p>Now compile. If all well, you&#8217;ll get a converted image. You can also create preformatted commands in actionscript to perform actions.</p>
<p>Thats it for now. See you soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://pranjan.com/?feed=rss2&#038;p=95</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Fisix engine vector class not working with flex.</title>
		<link>http://pranjan.com/?p=92</link>
		<comments>http://pranjan.com/?p=92#comments</comments>
		<pubDate>Thu, 03 Jun 2010 08:10:56 +0000</pubDate>
		<dc:creator>flas3</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://pranjan.com/?p=92</guid>
		<description><![CDATA[While working with fisix engine with flex, I stucked in a situation&#8230; 1067: Implicit coercion of a value of type __AS3__.vec:Vector to an unrelated type com.fileitup.fisixengine.core:Vector. I checked http://blog.maxkunz.de/?p=170 for the solution. Yeah, good solution but not worked on my problem. There is another solution. Go to compiler option and add &#8220;-target-player=9.0.0&#8243; as shown below.]]></description>
			<content:encoded><![CDATA[<p>While working with fisix engine with flex, I stucked in a situation&#8230;</p>
<p>1067: Implicit coercion of a value of type __AS3__.vec:Vector to an unrelated type com.fileitup.fisixengine.core:Vector.</p>
<p>I checked http://blog.maxkunz.de/?p=170 for the solution. Yeah, good solution but not worked on my problem.</p>
<p>There is another solution. Go to compiler option and add &#8220;-target-player=9.0.0&#8243; as shown below.</p>
<div id="attachment_93" class="wp-caption alignnone" style="width: 457px"><a href="http://pranjan.com/wp-content/uploads/2010/06/bg1.jpg"><img class="size-full wp-image-93" title="bg1" src="http://pranjan.com/wp-content/uploads/2010/06/bg1.jpg" alt="Compiler option" width="447" height="310" /></a><p class="wp-caption-text">Compiler option</p></div>
]]></content:encoded>
			<wfw:commentRss>http://pranjan.com/?feed=rss2&#038;p=92</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex repeater control part 2</title>
		<link>http://pranjan.com/?p=87</link>
		<comments>http://pranjan.com/?p=87#comments</comments>
		<pubDate>Thu, 15 Apr 2010 05:25:09 +0000</pubDate>
		<dc:creator>flas3</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dataProvider]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[LinkButton]]></category>
		<category><![CDATA[mx]]></category>
		<category><![CDATA[repeater]]></category>
		<category><![CDATA[Script]]></category>

		<guid isPermaLink="false">http://pranjan.com/?p=87</guid>
		<description><![CDATA[Return back again. In this section we&#8217;ll see how to retrieve repeater item and its data. Lets have our example&#8230; &#60;mx:VBox id="box" height="100%" width="100%"&#62;      &#60;mx:Spacer height="10"/&#62;      &#60;mx:Repeater id="r" dataProvider="{xmlColMenu}" startingIndex="0" recycleChildren="true"&#62;          &#60;mx:LinkButton id="idx" label="{r.currentItem.name}" click="{clbClick(event);}" styleName="RightLink"/&#62;          &#60;mx:Repeater id="s" dataProvider="{r.currentItem.link}"              startingIndex="0" recycleChildren="true"&#62;             &#60;mx:LinkButton id="idy" label="{s.currentItem.name}"                 click="{clbClick(event);}" fontFamily="Verdana"                 fontSize="9" [...]]]></description>
			<content:encoded><![CDATA[<p>Return back again.</p>
<p>In this section we&#8217;ll see how to retrieve repeater item and its data.</p>
<p>Lets have our example&#8230;</p>
<pre><span style="color: #800000;">&lt;mx:VBox id="box" height="100%" width="100%"&gt;
     &lt;mx:Spacer height="10"/&gt;
     <strong>&lt;mx:Repeater id="r" dataProvider="{xmlColMenu}" startingIndex="0" recycleChildren="true"&gt;</strong>
         &lt;mx:LinkButton id="idx" label="{r.currentItem.name}" click="{clbClick(event);}" styleName="RightLink"/&gt;
         <strong>&lt;mx:Repeater id="s" dataProvider="{r.currentItem.link}" </strong>
             startingIndex="0" recycleChildren="true"&gt;
            &lt;mx:LinkButton id="idy" label="{s.currentItem.name}"
                click="{clbClick(event);}" fontFamily="Verdana"
                fontSize="9" fontStyle="normal" fontWeight="normal"
                textSelectedColor="#03598B" textRollOverColor="#47A318" disabledColor="#47A318" height="15"
                color="#666666" themeColor="#FFFFFF"/&gt;
         <strong>&lt;/mx:Repeater&gt;</strong>
     <strong>&lt;/mx:Repeater&gt;</strong>
 &lt;/mx:VBox&gt;

</span></pre>
<p>Now we will write <strong>clbClick</strong> event for the repeater item. Indeed, your event handler will be written in <strong>&lt;mx:Script&gt; </strong>block.</p>
<pre><span style="color: #800000;">/**
 * Navigation item click event.
 * @param event of type MouseEvent.
 */
 private function clbClick(event:MouseEvent):void
 {
     trace(event.target.getRepeaterItem().id);
 }
</span></pre>
<p>If you use <strong>getRepeaterItem()</strong>, it gives you access to the data item that you&#8217;d set earlier while repeating the item.</p>
<pre><span style="color: #800000;">&lt;mx:LinkButton id="idx" label="{<strong>r.currentItem</strong>.name}" click="{clbClick(event);}" styleName="RightLink"/&gt;
</span></pre>
<p>In my case, I need to access <strong>id</strong>. You may have different data.</p>
<p>In next section we&#8217;ll check how to update repeater control dynamically. Till then c. y.</p>
]]></content:encoded>
			<wfw:commentRss>http://pranjan.com/?feed=rss2&#038;p=87</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex repeater control part1</title>
		<link>http://pranjan.com/?p=82</link>
		<comments>http://pranjan.com/?p=82#comments</comments>
		<pubDate>Sat, 10 Apr 2010 08:35:26 +0000</pubDate>
		<dc:creator>flas3</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[repeater]]></category>

		<guid isPermaLink="false">http://pranjan.com/?p=82</guid>
		<description><![CDATA[Repeater control is very useful but little bit complex to understand. Why flex introduced this repeater control. Very simple. To avoid unnecessary looping and to reduce complexity of component/s or control/s repeatation. In simple way, we can do the same repeatation by using for loop or while or do-while loop. Repeater control saves our time. [...]]]></description>
			<content:encoded><![CDATA[<p>Repeater control is very useful but little bit complex to understand.</p>
<p>Why flex introduced this repeater control. Very simple. To avoid unnecessary looping and to reduce complexity of component/s or control/s repeatation.</p>
<p>In simple way, we can do the same repeatation by using <strong>for loop </strong>or <strong>while </strong>or<strong> do-while loop</strong>. Repeater control saves our time.</p>
<pre><span style="color: #800000;">&lt;?xml version="1.0"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"&gt;

  &lt;mx:Script&gt;
    &lt;![CDATA[
      [Bindable]
      public var myArray:Array=[1,2,3,4];
    ]]&gt;
  &lt;/mx:Script&gt;

  &lt;mx:ArrayCollection id="myAC" source="{myArray}"/&gt;
  <strong>&lt;mx:Repeater id="myrep" dataProvider="{myAC}"&gt;
    &lt;mx:Label id="Label1" text="This is loop #{myrep.currentItem}"/&gt;
  &lt;/mx:Repeater&gt;</strong>
&lt;/mx:Application&gt;</span>
</pre>
<p>This is a simple example how the repeater component is used. <strong>Please note here that the repeater control is itself a loop so don&#8217;t need to use another loop to support the control.</strong><br />
We can also use nested repeater controls. Just like example below.</p>
<pre><span style="color: #800000;">&lt;?xml version="1.0"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*"&gt;

  &lt;mx:Script&gt;
    &lt;![CDATA[
      [Bindable]
      public var myArray:Array=[1,2,3,4];
    ]]&gt;
  &lt;/mx:Script&gt;

  &lt;mx:ArrayCollection id="myAC" source="{myArray}"/&gt;
  <strong>&lt;mx:Repeater id="myrep" dataProvider="{myAC}"&gt;
    &lt;mx:Label id="Label1" text="This is loop #{myrep.currentItem}"/&gt;</strong></span>
    <span style="color: #800000;"><strong>&lt;mx:Repeater id="nestedrep" dataProvider="{myrep.currentItem.secondaryXMLList}"&gt;
        &lt;mx:Label id="Label2" text="This is loop #{nestedrep.currentItem}"/&gt;<strong><strong>
     &lt;/mx:Repeater&gt;</strong></strong></strong></span><span style="color: #800000;"><strong><span style="color: #800000;">  </span>
   &lt;/mx:Repeater&gt;</strong>
&lt;/mx:Application&gt;

</span></pre>
<p>In next series, we&#8217;ll see how to retrieve data from repeated controls or components. We&#8217;ll also see controlling and refreshing the repeater component.</p>
<p>ciao.</p>
]]></content:encoded>
			<wfw:commentRss>http://pranjan.com/?feed=rss2&#038;p=82</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The site name is now very simple</title>
		<link>http://pranjan.com/?p=81</link>
		<comments>http://pranjan.com/?p=81#comments</comments>
		<pubDate>Wed, 14 Oct 2009 09:32:54 +0000</pubDate>
		<dc:creator>flas3</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[name]]></category>
		<category><![CDATA[pranjan]]></category>
		<category><![CDATA[pravinranjan]]></category>
		<category><![CDATA[simple]]></category>

		<guid isPermaLink="false">http://pranjan.com/?p=81</guid>
		<description><![CDATA[The site name is changed from pravinranjan.com to pranjan.com. Its simple to say now pranjan [p r a n j a n].]]></description>
			<content:encoded><![CDATA[<p>The site name is changed from pravinranjan.com to pranjan.com.</p>
<p>Its simple to say now pranjan [p r a n j a n].<br />
 <img src='http://pranjan.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://pranjan.com/?feed=rss2&#038;p=81</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

