<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>SnippetRepoBrowser</title>
    <link>http://snippet.gnstudio.com/snippetrepobrowser/index</link>    
    <description>RSS Feed of SnippetRepoBrowser (Global RSS)</description>    
    <language>en-us</language>
    <pubDate>Thu, 09 Feb 2012 20:49:50 +0100</pubDate>
    <docs>SnippetRepoBrowser/index</docs>
    <generator>SnippetRepoBrowser Feed Generator</generator>
    <item>
      <title><![CDATA[Duplicate SWF or raster content of an Image component]]></title>
      <link>http://snippet.gnstudio.com/viewtopic/94</link>
      <description><![CDATA[Using the BitmapData class is quite easy and fast copy or manipulate an external image loaded into a Flex application, it&#39;s quite interesting the difference between the data type of the content property of an Image component because it changes if a bitmap or a SWF has been loaded: <br /><ul><li>the first one is a Bitmap </li><li>the second on is a MovieClipLoaderAsset </li></ul><br /><br />In order to let you copy the content also with a SWF file loaded into the Image component you can use a Loader and the loadBytes() method.<br />]]><![CDATA[<div class="divcode"><pre lang="actionscript">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br />&lt;mx:Application xmlns:mx=&quot;<a href="http://www.adobe.com/2006/mxml&quot;" target="_blank"><a href="http://www.adobe.com/2006/mxml&quot;" target="_blank">http://www.adobe.com/2006/mxml&quot;</a></a><br />        layout=&quot;vertical&quot;<br />        verticalAlign=&quot;middle&quot;<br />        backgroundColor=&quot;white&quot;&gt;<br /> <br />    &lt;mx:Script&gt;<br />        &lt;![CDATA[<br />        	import mx.core.MovieClipLoaderAsset;<br />        	import mx.core.BitmapAsset;<br />            import mx.collections.ArrayCollection;<br />            <br />            [Embed(source=&quot;placeholder.swf&quot;)]<br />			private const ARTWORK_PLACE_HOLDER_SWF:Class;<br />			<br />			[Embed(source=&quot;placeholder.png&quot;)]<br />			private const ARTWORK_PLACE_HOLDER_PNG:Class;<br /> <br />            [Bindable]<br />            private var collection:ArrayCollection = new ArrayCollection();<br /> 			<br /> 			private function handleImage(e:Event):void{<br /> 				<br /> 				if(e.currentTarget.selectedValue == &quot;PNG&quot;){<br /> 					<br /> 					img.source = ARTWORK_PLACE_HOLDER_PNG;<br /> 					<br /> 				}else{<br /> 					<br /> 					img.source = ARTWORK_PLACE_HOLDER_SWF;<br /> 					<br /> 				}<br /> 				<br /> 			}<br /> 			<br />            private function dumpImage(source:Image):void {<br />            	<br />            	var asset:* = source.content;<br />            	var data:BitmapData;<br />            	var bitmap:Bitmap;<br />            	<br />            	try{<br />            		<br />            		data = Bitmap(source.content).bitmapData;<br />                	bitmap = new Bitmap(data);<br />                	<br />                	collection.addItem({image:bitmap, label:&quot;item #&quot; + (collection.length + 1)});<br />            		<br />            	}catch(error:Error){<br />            		<br />            		var loader:Loader = new Loader();<br />            		<br />            		loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onBitmapData); <br />            		           		<br />            		var swf:MovieClipLoaderAsset = asset as MovieClipLoaderAsset;            		<br />            		loader.loadBytes(swf.movieClipData);<br />            		<br />            	}<br />            	<br />            }<br />            <br />            private function onBitmapData(e:Event):void{<br />            			<br />            	e.target.removeEventListener(e.type, arguments.callee);<br />            			<br />            	var content: MovieClip = MovieClip((e.currentTarget as LoaderInfo).content)<br />            	var data:BitmapData = new BitmapData(content.width, content.height);<br />            	data.draw(content, null, null, null, null, true)<br />            	var bitmap:Bitmap = new Bitmap(data)<br />            			<br />            	collection.addItem({image:bitmap, label:&quot;item #&quot; + (collection.length + 1)});<br />            			<br />            }<br />            <br />        ]]&gt;<br />    &lt;/mx:Script&gt;<br /> <br />    &lt;mx:HBox&gt;<br />        &lt;mx:Panel title=&quot;Source image&quot;&gt;<br />            &lt;mx:HBox verticalAlign=&quot;middle&quot; horizontalAlign=&quot;center&quot; width=&quot;100%&quot; height=&quot;100%&quot;&gt;<br />                &lt;mx:Image id=&quot;img&quot; source=&quot;{ARTWORK_PLACE_HOLDER_SWF}&quot; /&gt;<br />            &lt;/mx:HBox&gt;<br />            <br />            &lt;mx:RadioButtonGroup id=&quot;imageSelector&quot; change=&quot;handleImage(event)&quot; /&gt;<br />            &lt;mx:RadioButton label=&quot;SWF&quot; selected=&quot;true&quot; group=&quot;{imageSelector}&quot; /&gt;<br />            &lt;mx:RadioButton label=&quot;PNG&quot; group=&quot;{imageSelector}&quot; /&gt;<br /> <br />            &lt;mx:ControlBar&gt;<br />                &lt;mx:Button label=&quot;Copy image&quot; click=&quot;dumpImage(img)&quot; /&gt;<br />            &lt;/mx:ControlBar&gt;<br />        &lt;/mx:Panel&gt;<br /> <br />        &lt;mx:TileList id=&quot;tileList&quot; dataProvider=&quot;{collection}&quot; width=&quot;450&quot; height=&quot;500&quot; columnCount=&quot;4&quot; verticalScrollPolicy=&quot;on&quot;&gt;<br />            &lt;mx:itemRenderer&gt;<br />                &lt;mx:Component&gt;<br />                    &lt;mx:VBox&gt;<br />                        &lt;mx:Image source=&quot;{data.image}&quot; /&gt;<br />                        &lt;mx:Label text=&quot;{data.label}&quot; /&gt;<br />                    &lt;/mx:VBox&gt;<br />                &lt;/mx:Component&gt;<br />            &lt;/mx:itemRenderer&gt;<br />        &lt;/mx:TileList&gt;<br />    &lt;/mx:HBox&gt;<br /> <br />&lt;/mx:Application&gt;</pre></div><br /><br />]]></description>
      <author>giorgionatili</author>
      <pubDate>Mon, 04 Oct 2010 06:02:28 +0200</pubDate>
      <category>Flex 4.x</category>
      <guid>http://snippet.gnstudio.com/viewtopic/94</guid>
   </item><item>
      <title><![CDATA[Detect paragraphs with the TextLayout framework]]></title>
      <link>http://snippet.gnstudio.com/viewtopic/87</link>
      <description><![CDATA[If you want to detect how many paragarphs are contained into an XML flow you can simpy use the power of E4X and the default namespace directive of ActionScript 3.0.<br />]]><![CDATA[<div class="divcode"><pre lang="actionscript">var data:XML = &lt;TextFlow cffHinting=&quot;horizontalStem&quot; color=&quot;#000000&quot; columnCount=&quot;inherit&quot; columnGap=&quot;inherit&quot; columnWidth=&quot;inherit&quot; <br />                fontFamily=&quot;Verdana&quot; fontLookup=&quot;embeddedCFF&quot; fontSize=&quot;26&quot; lineBreak=&quot;inherit&quot; paddingBottom=&quot;15&quot; paddingLeft=&quot;15&quot; <br />                paddingRight=&quot;15&quot; paddingTop=&quot;15&quot; renderingMode=&quot;cff&quot; verticalAlign=&quot;inherit&quot; <br />                whiteSpaceCollapse=&quot;preserve&quot; xmlns=&quot;<a href="http://ns.adobe.com/textLayout/2008&quot;&gt;" target="_blank"><a href="http://ns.adobe.com/textLayout/2008&quot;&gt;" target="_blank">http://ns.adobe.com/textLayout/2008&quot;&gt;</a></a><br />  &lt;p&gt;<br />    &lt;span&gt;<br />      Enter your text here...<br />    &lt;/span&gt;<br />  &lt;/p&gt;<br />   &lt;p&gt;<br />    &lt;span&gt;<br />      Enter your text here...<br />    &lt;/span&gt;<br />  &lt;/p&gt;<br />&lt;/TextFlow&gt;;<br /><br /><br />var textFlowNamespace:Namespace = new Namespace(&quot;<a href="http://ns.adobe.com/textLayout/2008&quot;);" target="_blank"><a href="http://ns.adobe.com/textLayout/2008&quot;);" target="_blank">http://ns.adobe.com/textLayout/2008&quot;);</a></a><br />default xml namespace = textFlowNamespace;<br /><br />trace(data.p.length())</pre></div><br /><br />]]></description>
      <author>GiorgioNatili</author>
      <pubDate>Wed, 17 Mar 2010 18:24:35 +0100</pubDate>
      <category>Flex 4.x</category>
      <guid>http://snippet.gnstudio.com/viewtopic/87</guid>
   </item><item>
      <title><![CDATA[Use rawChildren to have something always visible and above the content of a Container]]></title>
      <link>http://snippet.gnstudio.com/viewtopic/76</link>
      <description><![CDATA[If you need to put something inside a Container and have it always visible, even when the content gets scrolled, you can add it to the rawChildren of the Container.<br />]]><![CDATA[<div class="divcode"><pre lang="actionscript">var container:Container = new Container();<br />container.width = 100;<br />container.height = 100;<br /><br />var label:Label = new Label();<br />label.width = 200;<br />label.height = 20;<br />label.text = &quot;I&#39;ll be alvais above the container&#39;s content&quot;;<br /><br />container.rawChildren.addChild(label);</pre></div><br /><br />]]></description>
      <author>cyberpunk</author>
      <pubDate>Sat, 16 Jan 2010 19:31:33 +0100</pubDate>
      <category>Flex 3.x</category>
      <guid>http://snippet.gnstudio.com/viewtopic/76</guid>
   </item><item>
      <title><![CDATA[Copying objects]]></title>
      <link>http://snippet.gnstudio.com/viewtopic/47</link>
      <description><![CDATA[<span style="font-size: 8pt">If you want to create a copy of an object, you can&#39;t simply use the assignment operator (=), because it will only perform the copy of the references. </span><br /><br /><span style="font-size: 8pt"><br /><span style="font-weight:bold"><span style="text-decoration:underline">Example</span></span> <br />var obj1:Object = {firstName:&quot;John&quot;, lastName:&quot;Doe&quot;, age:35}; <br />var obj2:Object = obj1; <br />At the end of an assignment operation you will have two references that point to the same memory location. <br />Any modification on the first object will be reflected on the other. <br />The Flex framework contains the ObjectUtil class, which has a copy static method. That method allows you to create deep copies of an object. <br /><br /><span style="font-weight:bold"><span style="text-decoration:underline">Example</span></span> <br />var obj1:Object = {firstName:&quot;John&quot;, lastName:&quot;Doe&quot;, age:35}; <br />var obj3:Object = ObjectUtil.copy(obj1); <br />Obj1 and obj3 are different references that point to different memory locations. Any modification on obj1 won&#39;t be reflected on obj3. <br />The copy method works well with objects of class Object, but it throws an error when you try to copy, for example, custom classes. <br /><br /><span style="font-weight:bold"><span style="text-decoration:underline">Example</span></span> <br />var pers1:Person = new Person(); <br />pers1.firstName = &quot;Lisa&quot;; pers1.lastName = &quot;Redcliff&quot;; pers1.age = 25; <br />var pers2:Person = ObjectUtil.copy(pers1) as Person; <br />trace(&quot;pers1 last name: &quot; + pers1.lastName + &quot; pers2 last name: &quot; + pers2.lastName); <br />The trace statement throws an error. This happens because the copy method internally converts the source object in a ByteArray one, duplicates it and then converts the duplicated ByteArray in the destination object. <br />In other words, a binary AMF serialization/deserialization occurs. If you use custom classes, the Flash Player serializes correctly the source object, but doesn&#39;t know how to deserialize according to the specified cast (Person). <br /><br />For this reason you have to register your custom class in order to give to the player the informations on how to perform the deserialization. <br />This can be done using the <span style="font-weight:bold">registerClassAlias </span>method, which accepts 2 arguments: <br /><br /></span><span style="font-size: 8pt">     - the fully qualified class name of the object to copy, which can be retrieved using <span style="font-weight:bold">flash.utils.getQualifiedClassName(sourceObj)</span> <br /></span><span style="font-size: 8pt">     - the Class definition of the object, which can be retrieved using <span style="font-weight:bold">flash.utils.getDefinitionByName(className)</span>;&lt;/div&gt;<br /></span><br /><span style="font-size: 8pt">After the class registration, the copy method can execute correctly</span>.<br />]]><![CDATA[<div class="divcode"><pre lang="actionscript">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br />&lt;mx:Application xmlns:mx=&quot;<a href="http://www.adobe.com/2006/mxml&quot;" target="_blank"><a href="http://www.adobe.com/2006/mxml&quot;" target="_blank">http://www.adobe.com/2006/mxml&quot;</a></a> layout=&quot;absolute&quot; creationComplete=&quot;onComplete()&quot;&gt;<br />	&lt;mx:Script&gt;<br />		&lt;![CDATA[<br />			import flash.utils.getDefinitionByName;<br />			import flash.net.registerClassAlias;<br />			import flash.utils.getQualifiedClassName;<br />			import com.Person;<br />			import mx.utils.ObjectUtil;<br />			<br />			protected function onComplete():void<br />			{<br />				/*-------------------------------------<br />				Case 1: assigning object 1 to object 2<br />				---------------------------------------*/<br />				var obj1:Object = {firstName:&quot;John&quot;, lastName:&quot;Doe&quot;, age:35};<br />				<br />				// The assignment acts on the references: obj1 and obj2 are<br />				// 2 references that point to the same memory location<br />				var obj2:Object = obj1;<br />				<br />				// Modifying the age attribute of obj1, we affect also obj2<br />				obj1.age = 45;<br />				<br />				// traces &quot;obj1 age: 45 obj2 age: 45&quot;<br />				trace(&quot;obj1 age: &quot; + obj1.age + &quot; obj2 age: &quot; + obj2.age);<br />				<br />				/*-------------------------------------<br />				Case 2: using the copy method<br />				---------------------------------------*/<br />				// With the copy method the object memory location is copied, <br />				// obj1 and obj3 references point to different memory locations <br />				var obj3:Object = ObjectUtil.copy(obj1);<br />				<br />				obj1.firstName = &quot;Ken&quot;;<br />				<br />				// traces &quot;obj1 first name: Ken obj2 first name: John&quot;<br />				trace(&quot;obj1 first name: &quot; + obj1.firstName + &quot; obj3 first name: &quot; + obj3.firstName);<br />				<br />				var pers1:Person = new Person();<br />				pers1.firstName = &quot;Lisa&quot;;<br />				pers1.lastName = &quot;Redcliff&quot;;<br />				pers1.age = 25;<br />				<br />				// 1.<br />				//var pers2:Person = ObjectUtil.copy(pers1) as Person;<br />				// 2.				<br />				var pers2:Person = copyObject(pers1) as Person;<br />				<br />				// Statement 1 <br />				// ------------<br />				// throws an error<br />				//<br />				// Statement 2<br />				// ------------<br />				// traces &quot;pers1 last name:  Redcliff pers2 last name: Redcliff&quot;<br />				trace(&quot;pers1 last name: &quot; + pers1.lastName + &quot; pers2 last name: &quot; + pers2.lastName);<br />			}<br />			<br />			/*<br />				The copyObject method calls the copy function only when<br />				the class is registered, so the ByteArray deserialization<br />				can be done correctly.<br />			*/<br />			public function copyObject(sourceObj:Object):Object<br />			{<br />				var className:String = getQualifiedClassName(sourceObj);<br />				registerClassAlias(className, getDefinitionByName(className) as Class);<br />				<br />				return ObjectUtil.copy(sourceObj);<br />			}<br />			<br />		]]&gt;<br />	&lt;/mx:Script&gt;<br />&lt;/mx:Application&gt;</pre></div><br /><br />]]></description>
      <author>lelibus</author>
      <pubDate>Mon, 02 Nov 2009 00:32:50 +0100</pubDate>
      <category>Flex 3.x</category>
      <guid>http://snippet.gnstudio.com/viewtopic/47</guid>
   </item><item>
      <title><![CDATA[Localizing an application using Resource Modules]]></title>
      <link>http://snippet.gnstudio.com/viewtopic/46</link>
      <description><![CDATA[If you need to localize an application and you have to support a lot of languages, the classic Resource Bundle approach could be very expensive in terms of swf file size, because it is compiled with all the defined languages. <br />With Resource Modules, Flex give you the possibility to create separate resource swf files (one for each language), that you can load programmatically, only when needed. <br />The starting point is the same of the Resource Bundle approach: <br /><ul style="list-style-type:decimal"><li>Create a locale folder inside the project root; </li><br /><li>Create one folder for each language, named with the locale initials (e.g. en_US, it_IT, fr_FR, etc.); </li><br /><li>Create a localization file inside each language folder (e.g. localizedContent.properties); </li><br /><li>Fill each localizedContent file with your localization strings, classes, etc. </li><br /></ul><br /><span style="font-weight:bold"><span style="text-decoration:underline">Example:</span></span> <br /><span style="text-decoration:underline"></span><br /><span style="text-decoration:underline">locale/en_US/localizedContent.properties <br /></span><span style="font-size: 10pt"><span style="font-size: 8pt">comboLabel=Select a language <br /></span></span><span style="font-size: 10pt"><span style="font-size: 8pt">welcome=Welcome to my application <br /></span><span style="font-size: 8pt">helloLabel=Click to hail <br /></span><span style="font-size: 8pt">helloMessage=Hello my friend!</span></span><span style="font-size: 10pt"><span style="font-size: 8pt"> <br /><span style="text-decoration:underline"><br />locale/it_IT/localizedContent.properties <br /></span><span style="font-size: 10pt"><span style="font-size: 8pt"><span style="font-size: 10pt"><span style="font-size: 8pt">comboLabel=Seleziona una lingua <br /></span><span style="font-size: 8pt">welcome=Benvenuto nella mia applicazione <br /></span><span style="font-size: 8pt">helloLabel=Clicca per salutare <br /></span><span style="font-size: 8pt">helloMessage=Ciao amico mio!</span></span></span></span> <br /><span style="text-decoration:underline"><br />locale/fr_FR/localizedContent.properties <br /></span><span style="font-size: 10pt"><span style="font-size: 8pt"><span style="font-size: 10pt"><span style="font-size: 8pt">comboLabel=selectionnez une langue <br /></span><span style="font-size: 8pt">welcome=bienvenue a ma application <br /></span><span style="font-size: 8pt">helloLabel=cliqueter pour saluer <br /></span><span style="font-size: 8pt">helloMessage=bonjour mon ami!</span></span></span></span></span></span> <br /><span style="font-size: 10pt"><span style="font-size: 8pt"><span style="font-size: 10pt"><span style="font-size: 8pt">The Resource Modules have to contain not only your defined resources, but also the resources required by the Flex framework. <br />In order to identify which are the framework resources used by your application, you have to run the following command using the command line:</span></span></span></span> <br /><span style="font-size: 10pt"><span style="font-size: 8pt"><span style="font-size: 10pt"><span style="font-weight:bold"><span style="font-size: 8pt"><br />mxmlc -locale= -resource-bundle-list=resources.txt ResourceModules.mxml</span></span></span></span></span> <br /><span style="font-size: 10pt"><span style="font-size: 8pt"><span style="font-size: 10pt"><span style="font-size: 8pt"><br />The generated resources.txt file shows the list of framework resources that you have to include in the modules.</span></span></span></span> <br /><span style="font-size: 10pt"><span style="font-size: 8pt"><span style="font-size: 10pt"><span style="font-size: 8pt">The file looks like this: <span style="font-style:italic">bundles = collections containers controls core effects skins styles</span></span></span></span></span> <br /><span style="font-size: 10pt"><span style="font-size: 8pt"></span></span><br /><span style="font-size: 10pt"><span style="font-size: 8pt"><span style="font-size: 10pt"><span style="font-size: 8pt">Now you have to create the modules using mxmlc compiler (suppose to have english, italian and french languages):</span></span></span></span> <br /><span style="font-weight:bold"><span style="font-size: 10pt"><span style="font-size: 8pt"><span style="font-size: 10pt"><span style="font-size: 8pt"><br />mxmlc -locale=en_US -source-path=.,locale/{locale} -include-resource-bundles=collections,containers,controls,core,effects,skins,styles,localizedContent -output en_US_resx.swf</span></span></span></span> <br /></span><span style="font-size: 10pt"><span style="font-size: 8pt"><span style="font-size: 10pt"><span style="font-size: 8pt"><span style="font-weight:bold">mxmlc -locale=it_IT -source-path=.,locale/{locale} -include-resource-bundles=collections,containers,controls,core,effects,skins,styles,localizedContent -output it_IT_resx.swf <br /></span></span></span></span></span><span style="font-size: 10pt"><span style="font-size: 8pt"><span style="font-size: 10pt"><span style="font-size: 10pt"><span style="font-size: 8pt"><span style="font-size: 10pt"><span style="font-size: 8pt"><span style="font-weight:bold">mxmlc -locale=fr_FR -source-path=.,locale/{locale} -include-resource-bundles=collections,containers,controls,core,effects,skins,styles,localizedContent -output fr_FR_resx.swf</span></span></span></span></span> <br /><span style="font-size: 10pt"><span style="font-size: 8pt"><span style="font-size: 10pt"><span style="font-size: 8pt"><br />Three files are generated: </span></span></span></span></span></span></span><br /><ul><li><span style="font-size: 10pt"><span style="font-size: 8pt"><span style="font-size: 10pt"><span style="font-size: 8pt">en_US_resx.swf;</span></span></span></span> </li><li><span style="font-size: 10pt"><span style="font-size: 8pt"><span style="font-size: 10pt"><span style="font-size: 8pt">it_IT_resx.swf;</span></span></span></span> </li><li><span style="font-size: 10pt"><span style="font-size: 8pt"><span style="font-size: 10pt"><span style="font-size: 8pt">fr_FR_resx.swf.</span></span></span></span> </li></ul><br /><span style="font-size: 8pt">Those are the Resource Modules that we need to localize our application.</span><br />]]><![CDATA[<div class="divcode"><pre lang="actionscript">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br />&lt;mx:Application xmlns:mx=&quot;<a href="http://www.adobe.com/2006/mxml&quot;" target="_blank"><a href="http://www.adobe.com/2006/mxml&quot;" target="_blank">http://www.adobe.com/2006/mxml&quot;</a></a> layout=&quot;absolute&quot; <br />	creationComplete=&quot;onComplete()&quot;&gt;<br />	&lt;mx:Script&gt;<br />		&lt;![CDATA[<br />			import mx.events.ResourceEvent;<br />			import mx.controls.Alert;<br />			import mx.collections.ArrayCollection;<br />			<br />			// The current locale: the default is en_US<br />			private var _currentLocale:String = &quot;en_US&quot;;<br />			<br />			protected function onComplete():void<br />			{<br />				// On creation complete set the locale with a default (en_US)<br />				setupLocale(true);<br />			} <br />			<br />			private function setupLocale(forceLoad:Boolean=false):void<br />			{<br />				// Check if the resource is already loaded.<br />				// The forceLoad flag is used to force the loading even if the resource has<br />				// already been imported.<br />				// During the initialization, the en_US loading has to be forced, because the<br />				// english language is automatically included by Flex, but does not contain our<br />				// resource definitions. <br />				if(resourceManager.getLocales().indexOf(_currentLocale) == -1 || forceLoad)<br />				{<br />					// If the resource has not been loaded yet, or forceLoad=true, load the resource module<br />					var dispatcher:IEventDispatcher = resourceManager.loadResourceModule(_currentLocale + &quot;_resx.swf&quot;);<br />					// Attach an event listener which has to be called when the module is completely loaded<br />					dispatcher.addEventListener(ResourceEvent.COMPLETE, onResourceLoaded);<br />				}<br />				else<br />				{<br />					// If the resource has already been loaded, simply localize<br />					onResourceLoaded(null);<br />				}<br />			}<br />			<br />			/*<br />				The following variables represent the parameters that have to be localized.<br />			*/<br />			[Bindable]<br />			private var _comboLabelText:String;<br />			<br />			[Bindable]<br />			private var _welcomeText:String;<br />			<br />			[Bindable]<br />			private var _helloLabelText:String;<br />			<br />			[Bindable]<br />			private var _helloMessage:String;<br />			<br />			private function onResourceLoaded(e:ResourceEvent):void<br />			{<br />				// Set the locale chain <br />				resourceManager.localeChain = [_currentLocale];<br />				<br />				// Modify the localization parameters<br />				_comboLabelText = resourceManager.getString(&quot;localizedContent&quot;,&quot;comboLabel&quot;);<br />				_welcomeText = resourceManager.getString(&quot;localizedContent&quot;,&quot;welcome&quot;);<br />				_helloLabelText = resourceManager.getString(&quot;localizedContent&quot;,&quot;helloLabel&quot;);<br />				_helloMessage = resourceManager.getString(&quot;localizedContent&quot;,&quot;helloMessage&quot;);<br />				<br />				<br />			}<br />			<br />			[Bindable]<br />			private var _langs:ArrayCollection = new ArrayCollection(<br />									[{name:&quot;English&quot;, value:&quot;en_US&quot;}, <br />									 {name:&quot;Italiano&quot;, value:&quot;it_IT&quot;},<br />									 {name:&quot;Francaise&quot;, value:&quot;fr_FR&quot;}]);<br />			<br />			private function onHelloClick():void<br />			{<br />				// The message displayed depends on the selected language<br />				Alert.show(_helloMessage);<br />			}<br />			<br />			private function onLangChange():void<br />			{<br />				// When the selected language of the combo box changes,<br />				// the corresponding module is loaded<br />				_currentLocale = langsCombo.selectedItem.value;<br />				setupLocale();<br />			}<br />		]]&gt;<br />	&lt;/mx:Script&gt;<br />	&lt;mx:VBox&gt;<br />		&lt;mx:HBox&gt;<br />			&lt;mx:Label text=&quot;{_comboLabelText}&quot; /&gt;<br />			&lt;mx:ComboBox id=&quot;langsCombo&quot; dataProvider=&quot;{_langs}&quot; labelField=&quot;name&quot; change=&quot;onLangChange()&quot; /&gt;<br />		&lt;/mx:HBox&gt;<br />		&lt;mx:Label text=&quot;{_welcomeText}&quot; /&gt;<br />		&lt;mx:Button id=&quot;helloBtn&quot; label=&quot;{_helloLabelText}&quot; click=&quot;onHelloClick()&quot; /&gt;<br />	&lt;/mx:VBox&gt;<br />&lt;/mx:Application&gt;</pre></div><br /><br />]]></description>
      <author>lelibus</author>
      <pubDate>Sun, 01 Nov 2009 21:37:19 +0100</pubDate>
      <category>Flex 3.x</category>
      <guid>http://snippet.gnstudio.com/viewtopic/46</guid>
   </item><item>
      <title><![CDATA[load binary data via xml message]]></title>
      <link>http://snippet.gnstudio.com/viewtopic/36</link>
      <description><![CDATA[say you are dealing with a backend via xml messages, for some instance you need to load binary data. Flash player can load images, sounds, videos and other movies, but these are operations that go separated from the data exchange context. You can join xml messages and binary content using base64 classes.<br />The advantages are:<br />- concurrent messages with content<br />- you can build up your own distributed objects<br />- more opportunities to hardening your movies, e.g content protection, cryptography, progressive and conditioned loading<br />and the cons:<br />- messages are greater, almost 20/30%<br />- if you plan to getting touch with real data, some ByteArray skills needed<br />- some people prefers amf, faster and data driven<br />]]><![CDATA[<div class="divcode"><pre lang="actionscript">// these two code files show how to load a sample image using xml message generated from php<br /><br /><br />// as3, TryB64php.as<br /><br />/**<br /> * @author jaco<br /> *<br /> * created on 16/10/2009 16.56.51<br /> */<br />package {<br /><br />	import flash.display.*;<br />	import flash.events.*;<br />	import flash.text.*;<br />	import flash.net.*;<br />	import flash.geom.*;<br />	import flash.utils.*;<br /><br />	// as3, got from <a href="http://dynamicflash.com/goodies/base64/" target="_blank"><a href="http://dynamicflash.com/goodies/base64/" target="_blank">http://dynamicflash.com/goodies/base64/</a></a><br />	// if you&#39;re in flex/air, there are mx.utils.Base64* classes<br />	import com.dynamicflash.util.Base64;<br /><br /><br />	/**<br />	 *<br />	 */<br />	public class TryB64php extends MovieClip {<br /><br />		private static const PHP_URL:String = &quot;get_xml_b64response.php&quot;;<br /><br />		private var ul:URLLoader;<br />		private var ld:Loader;<br /><br />		/**<br />		 * the constructor<br />		 */<br />		function TryB64php(){<br /><br />			var ur:URLRequest = new URLRequest(PHP_URL);<br />			ld = new Loader();<br />			ul = new URLLoader();<br /><br />			addChild(ld);<br /><br />			ul.addEventListener(Event.COMPLETE, onULComplete);<br />			ul.load(ur);<br />		}<br /><br />		private function onULComplete(evt:Event):void {<br /><br />			var xml:XML = XML(ul.data);<br /><br />			var ba:ByteArray = Base64.decodeToByteArray(xml);<br />			ld.loadBytes(ba);<br />		}<br />	}<br />}<br /><br /><br />// php, get_xml_b64response.php<br /><br />&lt;?php<br />/*<br /> * Created on 16/ott/2009<br /> *<br /> * jaco_at_pixeldump<br /> */<br /><br />define(&quot;XML_HEADER&quot;, &quot;&lt;?xml version=\&quot;1.0\&quot;?&gt;&quot;);<br />define(&quot;NL&quot;, &quot;\r\n&quot;);<br /><br />define(&quot;RESPONSE_INFO&quot;, &quot;info&quot;);<br />define(&quot;RESPONSE_VALUE_BASE64&quot;, &quot;base64&quot;);<br /><br />/**<br /> * read resource from path<br /> * @param file name<br /> * @param directory<br /> *<br /> * @return xml instance with base64 encoded data<br /> */<br />function get_resource($resFN, $resDir = &quot;./&quot;) {<br /><br />	$filePath = $resDir .$resFN;<br />	$fRes = file_get_contents($filePath, FILE_BINARY);<br /><br />	return create_simpleXmlMessage(base64_encode($fRes), RESPONSE_VALUE_BASE64);<br />}<br /><br />/**<br /> * create an xml message<br /> * @param message string<br /> * @param response type<br /> *<br /> * @return formatted xml instance with given data<br /> */<br />function create_simpleXmlMessage($str, $type = RESPONSE_INFO) {<br /><br />	$xmlStr = XML_HEADER .NL;<br />	$xmlStr .= create_xmlNode(&quot;response&quot;, $str, array(&quot;type&quot; =&gt; $type, &quot;timeStamp&quot; =&gt; mktime()));<br /><br />	return $xmlStr;<br />}<br /><br />/**<br /> * create a simple xml node with some data population<br /> * @param node name<br /> * @param node content<br /> * @param attributes<br /> * @param CDATA flag<br /> *<br /> * @return formatted xml node with given data<br /> */<br />function create_xmlNode($nodeName, $nodeContent = &quot;&quot;, $attrs = array(), $cDataFlag = true){<br /><br />	$xmlStr = &quot;&lt;&quot; .$nodeName .&quot; &quot;;<br />	$sfx1 = $cDataFlag ? &quot;&lt;![CDATA[&quot; : &quot;&quot;;<br />	$sfx2 = $cDataFlag ? &quot;]]&gt;&quot; : &quot;&quot;;<br /><br />	if(count($attrs))<br />		foreach($attrs as $k =&gt; $v) $xmlStr .= $k .&quot;=\&quot;&quot; .$v .&quot;\&quot; &quot; ;<br /><br />	if(strlen($nodeContent)){<br />		$xmlStr .= &quot;&gt;&quot; .$sfx1 .$nodeContent .$sfx2;<br />		$xmlStr .= &quot;&lt;/&quot; .$nodeName .&quot;&gt;&quot;;<br />	}<br />	else $xmlStr .= &quot;/&gt;&quot;;<br /><br />	return $xmlStr;<br />}<br /><br />// the app<br /><br />header(&quot;Content-type: text/xml&quot;);<br />echo get_resource(&quot;sample_avatar.png&quot;); // sample image<br />?&gt;<br /><br /></pre></div><br /><br />]]></description>
      <author>jaco</author>
      <pubDate>Fri, 16 Oct 2009 16:56:34 +0200</pubDate>
      <category>ActionScript</category>
      <guid>http://snippet.gnstudio.com/viewtopic/36</guid>
   </item><item>
      <title><![CDATA[Center image content]]></title>
      <link>http://snippet.gnstudio.com/viewtopic/20</link>
      <description><![CDATA[If you get a bitmap data as source of an image component and you want to center it you have to create a new bitmap, create a new matrix, apply a transformation (in the snippet the translation is done accordingly to the component with) and then use again the BitmapData class to draw the new data accordingly to the transoformation<br />]]><![CDATA[<div class="divcode"><pre lang="actionscript">var imageData:BitmapData = BitmapData(someRawBitmapData);<br />					<br />var bmp:Bitmap =  new Bitmap(imageData);<br />					<br />var matrix:Matrix = new Matrix();<br />matrix.translate(-((imageData.width - this.width) / 2), -((imageData.height - this.height) / 2));<br /><br />var matriximage:BitmapData = new BitmapData(bmp.height, bmp.width, false, 0x00000000);<br />matriximage.draw(bmp, matrix);<br />					<br />// Suppose imgThumbnail	is the ID of your component			<br />imgThumbnail.source = new Bitmap(matriximage);<br />					</pre></div><br /><br />]]></description>
      <author>Giorgio Natili</author>
      <pubDate>Tue, 29 Sep 2009 11:27:25 +0200</pubDate>
      <category>Flex 3.x</category>
      <guid>http://snippet.gnstudio.com/viewtopic/20</guid>
   </item><item>
      <title><![CDATA[Edit multiple items in sorted ArrayCollection]]></title>
      <link>http://snippet.gnstudio.com/viewtopic/15</link>
      <description><![CDATA[<span style="font-family:arial"><span style="font-size: 10pt">Do following if you want to traverse through sorted ArrayCollection, update multiple items and trigger only one collection change event to optimize performance of components that use the collection.</span></span><br />&lt;!--<br />		@page { margin: 2cm }<br />		P { margin-bottom: 0.21cm }<br />	--&gt;<br />]]><![CDATA[<div class="divcode"><pre lang="actionscript">var collection:ArrayCollection = new ArrayCollection();<br /><br />collection.addItem({bar:&quot;bar1&quot;, foo:1});<br />collection.addItem({bar:&quot;bar2&quot;, foo:2});<br />collection.addItem({bar:&quot;bar3&quot;, foo:3});<br />collection.addItem({bar:&quot;bar4&quot;, foo:4});<br /><br />var sort:Sort = new Sort();<br />sort.fields = [new SortField(&quot;foo&quot;)];<br /><br />collection.sort = sort;<br />collection.refresh();<br /><br />collection.addEventListener(CollectionEvent.COLLECTION_CHANGE, function(e:CollectionEvent):void {<br />	<br />	trace(e.type);<br />	<br />});<br /><br />collection.disableAutoUpdate();<br />			<br />var cursor:IViewCursor = collection.createCursor();<br /><br />while (!cursor.afterLast) {<br />	<br />	cursor.current.foo++;<br />	<br />	cursor.view.itemUpdated(cursor.current);<br />	<br />	cursor.moveNext();<br />	<br />}<br /><br />collection.enableAutoUpdate();</pre></div><br /><br />]]></description>
      <author>ivan.varga</author>
      <pubDate>Fri, 04 Sep 2009 00:05:34 +0200</pubDate>
      <category>ActionScript</category>
      <guid>http://snippet.gnstudio.com/viewtopic/15</guid>
   </item><item>
      <title><![CDATA[HSLIDER and VSLIDER CUSTOM SKINS (FX3)]]></title>
      <link>http://snippet.gnstudio.com/viewtopic/5</link>
      <description><![CDATA[<span style="font-weight:bold">Problem:</span> customize the HSlider / VSlider skin and add the handcursor to the track icon<br /><span style="font-weight:bold">Solution:</span> create two skin actionscript classes to customize the trackSkin and a thumbSkin styles <br /><img alt="" src="http://www.fabiobiondi.com/blog/wp-content/uploads/2009/08/hsliderskin.jpg" border="0" /><br />Main MXML File:<br />]]><![CDATA[<div class="divcode"><pre lang="actionscript">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;<br />&lt;mx:Application xmlns:mx=&quot;<a href="http://www.adobe.com/2006/mxml&quot;" target="_blank"><a href="http://www.adobe.com/2006/mxml&quot;" target="_blank">http://www.adobe.com/2006/mxml&quot;</a></a> layout=&quot;vertical&quot;<br />	backgroundColor=&quot;#999999&quot;&gt;<br /><br />	&lt;mx:Script&gt;<br />		&lt;![CDATA[<br />			<br />			// The Custom Image for the Slider Thumb <br />			[Embed(source=&quot;assets/slider/slider_arrow.png&quot;)]<br />	    		public static const SLIDER_ARROW:Class;<br />	    <br />		]]&gt;<br />	&lt;/mx:Script&gt;<br />	<br />	<br />	<br />	&lt;!--  STANDARD SLIDER  --&gt; <br />	&lt;mx:HSlider width=&quot;100&quot; height=&quot;1&quot;<br />	 			 liveDragging=&quot;true&quot;<br />	 			 /&gt;			<br />	 			 <br />	&lt;mx:Spacer height=&quot;70&quot; /&gt;<br />	<br />	<br />	&lt;!--  SLIDER  WITH CUSTOM SKINS  --&gt; <br />	&lt;mx:HSlider width=&quot;100&quot; height=&quot;1&quot;<br />	 			 trackSkin=&quot;skins.IconSliderTrack&quot;<br />	 			 thumbSkin=&quot;{SLIDER_ARROW}&quot;<br />	 			 sliderThumbClass=&quot;skins.IconSliderThumb&quot;<br />	 			 liveDragging=&quot;true&quot;<br />	 			 /&gt;<br />	<br />	<br />&lt;/mx:Application&gt;<br /><br /><br /><br />//==============================================================================<br />//skins/IconSliderTrack.as<br />//==============================================================================<br />package skins<br />{   <br />    import mx.core.UIComponent;   <br />  <br />    public class IconSliderTrack extends UIComponent   <br />    {   <br />           <br />        /**<br />        * Modify the default track layout<br />        * <br />        */<br />        override protected function updateDisplayList(unscaledWidth:Number,<br />unscaledHeight:Number):void{   <br />            super.updateDisplayList(unscaledWidth, unscaledHeight);   <br />  			this.graphics.moveTo(0,0);   <br />            this.graphics.lineStyle(5,0x656565);   <br />	        <br />	        // Draw a curve instead of the classic line <br />	      	this.graphics.curveTo(unscaledWidth, 40, unscaledWidth, 0)<br />	        <br />	        // Draw a Bold Line <br />	        // NOTE: if you want to use this comment the previous line <br />	        //this.graphics.lineTo(unscaledWidth,0);<br />	        <br />        }   <br />    }   <br />} <br /><br /><br />//==============================================================================<br />//skins/IconSliderThumb.as<br />//==============================================================================<br />package skins {<br />	<br />    import mx.controls.sliderClasses.SliderThumb;<br /><br />    public class IconSliderThumb extends SliderThumb {<br />        <br />        public function IconSliderThumb() {<br />            super();<br />            <br />            /**<br />            *  You need to manually update the thumb width <br />            *  and height to the Thumg image dimensions,<br />            *  otherwise its displayed size won&#39;t be right.<br />            *  NOTE: try to comment following line to see the result <br />            */             <br />            this.width = 36;<br />            this.height = 35;<br />            this.buttonMode = true;<br />        }<br />    }<br />}<br /><br /><br /><br /><br /><br /></pre></div><br /><br />]]></description>
      <author>flagers</author>
      <pubDate>Mon, 31 Aug 2009 23:01:40 +0200</pubDate>
      <category>Flex 3.x</category>
      <guid>http://snippet.gnstudio.com/viewtopic/5</guid>
   </item><item>
      <title><![CDATA[Build a STORE LOCATOR using FLEX GOOGLE MAP]]></title>
      <link>http://snippet.gnstudio.com/viewtopic/4</link>
      <description><![CDATA[I was playing with the Flex Google Map API and I think one of the coolest stuff is the Direction feature.<br /><br />In few words, you can do a query like this: &#39;from Milano to Torino&#39; and you&#39;ll get:<br />1) Distance<br />2) Trip duration<br />3) The complete travel displayed on Google Map<br />4) Many other usefull info (check GoogleMap website to get the API reference and other samples)<br /><br />In this script I simulate a Store Locator, where user digits its city in a TextInput and at the same time he can selects a store from a List.<br />Each time user will change selection we&#39;ll show the trip information (Distance + trip duration) displaying visual directions on the map too. <br /><br /><img alt="" src="http://www.fabiobiondi.com/blog/wp-content/uploads/2009/08/gmapsample.jpg" border="0" /><br /><span style="font-weight:bold"><span style="font-size: 10pt"><a href="http://www.fabiobiondi.com/blog/wp-content/uploads/2009/08/storelocator.swf" target="_blank"></a></span></span><br /><span style="font-weight:bold"><span style="font-size: 10pt"><a href="http://www.fabiobiondi.com/blog/wp-content/uploads/2009/08/storelocator.swf" target="_blank">See a live demo</a></span></span><br /><br />But you can do more... check the <a href="http://code.google.com/intl/it/apis/maps/documentation/flash/" target="_blank">Google Map Api web site</a> for more info<br />and remember to <a href="http://code.google.com/intl/it/apis/maps/signup.html" target="_blank">sign up for a key</a> or you won&#39;t be able to use GMAP on your web site<br /><span style="font-weight:bold"></span><br /><span style="font-weight:bold">FLEX CODE:</span><br />Create a new Flex Project and copy all the following code inside your main mxml file.<br />Remember to download the <a href="http://code.google.com/intl/it/apis/maps/documentation/flash/" target="_blank">GMap Flex SWC</a> component and to copy it on your <span style="font-style:italic">libs </span>folder<br />]]><![CDATA[<div class="divcode"><pre lang="actionscript">&lt;?xml version=&quot;1.0&quot;?&gt;<br />&lt;mx:Application xmlns:mx=&quot;<a href="http://www.adobe.com/2006/mxml&quot;" target="_blank"><a href="http://www.adobe.com/2006/mxml&quot;" target="_blank">http://www.adobe.com/2006/mxml&quot;</a></a> xmlns:maps=&quot;com.google.maps.*&quot; <br />	layout=&quot;absolute&quot; <br />	width=&quot;100%&quot; height=&quot;100%&quot; &gt;<br />  <br /><br />   &lt;mx:Script&gt;<br />       &lt;![CDATA[<br />       	import mx.events.ListEvent;<br />        import com.google.maps.interfaces.IPolyline;<br />        import com.google.maps.Map;<br />        import com.google.maps.MapEvent;<br />        import com.google.maps.LatLng;<br />        import com.google.maps.LatLngBounds;<br />        import com.google.maps.overlays.Marker;<br />        import com.google.maps.overlays.MarkerOptions;<br />        import com.google.maps.controls.ControlPosition;<br />        import com.google.maps.controls.MapTypeControl;<br />        import com.google.maps.services.*;<br />        import com.google.maps.MapAction;<br />        <br />        import mx.controls.Alert;<br />        import mx.collections.ArrayCollection;<br />            <br />        private var dir:Directions;<br />        <br />        <br />        /**<br />        * This method is called when the default Map is loaded <br />        * <br />        */<br />        private function onMapReady(event:Event):void {<br />            setupDirections();<br />            controlPanel.enabled = true;<br />        }<br />        <br />        /**<br />        * Define Direction class and its listeners <br />        * <br />        */<br />        private function setupDirections():void {    <br />        	<br />            dir = new Directions();<br />            dir.addEventListener(DirectionsEvent.DIRECTIONS_SUCCESS, onDirLoad);<br />            dir.addEventListener(DirectionsEvent.DIRECTIONS_FAILURE, onDirFail);<br />        }<br />        <br />        <br />        /**<br />        * Start a GMap Call to get distance between the selected store city and the user city <br />        * <br />        */<br />        private function processForm(event:ListEvent=null):void {<br />        	<br />        	// Set Directions Options (see GMAP API doc for properties details)<br />            var opts:DirectionsOptions = new DirectionsOptions({locale: &quot;English&quot;, travelMode: &quot;driving&quot;, avoidHighways: false})<br />            dir.setOptions(opts);<br />            <br />            // GMAP Query: From ... To ... <br />            dir.load(&quot;from: &quot; + from.text + &quot; to: &quot; + storeCities.selectedItem.data);<br />            <br />            // Disable query panel<br />            controlPanel.enabled = false;<br />        }<br />            <br />        /**<br />        * Direction Wrong Query (i.e. a city wasn&#39;t found in the db)  <br />        * <br />        */<br />        private function onDirFail(event:DirectionsEvent):void {<br />              Alert.show(&quot;Status: &quot; + event.directions.status);<br />              controlPanel.enabled = true;<br />        }<br />        <br />        /**<br />        * Direction Query SUCCESSFULLY   <br />        * <br />        */<br />        private function onDirLoad(event:DirectionsEvent):void {<br />        	<br />        	// Enable Query Panel<br />        	controlPanel.enabled = true;<br />        	<br />        	// Get Direction object<br />            var dir:Directions = event.directions;<br />            <br />            // Clear previous displayed directions <br />            map.clearOverlays(); <br />            <br />            // Display Directions on Map<br />            var directionsPolyline:IPolyline = dir.createPolyline();<br />            map.addOverlay(directionsPolyline);<br />            var directionsBounds:LatLngBounds = directionsPolyline.getLatLngBounds();<br />            <br />            // Fix map position<br />            map.setCenter(directionsBounds.getCenter());<br />            map.setZoom(map.getBoundsZoomLevel(directionsBounds));<br />       <br />       		// Display Markers (start and destination) <br />            var numRoutes:Number = dir.numRoutes;<br />            var startLatLng:LatLng = dir.getRoute(0).getStep(0).latLng;<br />            var endLatLng:LatLng = dir.getRoute(numRoutes-1).endLatLng;<br />            map.addOverlay(new Marker(startLatLng));<br />            map.addOverlay(new Marker(endLatLng));<br />            <br />            // Display trip info<br />            infoTripTxt.htmlText = dir.summaryHtml;<br />        }<br />            <br />        <br /><br />       ]]&gt;<br />   &lt;/mx:Script&gt;<br />   <br />   <br />   &lt;!--DEBUG KEY: you need to sign up for your own key--&gt;<br />   &lt;maps:Map <br />    id=&quot;map&quot; <br />    key=&quot;ABQIAAAA7QUChpcnvnmXxsjC7s1fCxQGj0PqsCtxKvarsoS-iqLdqZSKfxTd7Xf-2rEc_PC9o8IsJde80Wnj4g&quot; <br />    mapevent_mapready=&quot;onMapReady(event)&quot;<br />    width=&quot;100%&quot; height=&quot;100%&quot;/&gt;<br /><br />    <br /> <br />   &lt;mx:VBox width=&quot;395&quot; height=&quot;200&quot; id=&quot;controlPanel&quot; enabled=&quot;false&quot;<br /> 		backgroundAlpha=&quot;0.8&quot; backgroundColor=&quot;#FFFFFF&quot;&gt;<br /> 		<br />	  &lt;mx:HBox width=&quot;100%&quot;&gt;<br />		   &lt;mx:Label text=&quot;From (write your city):&quot; fontWeight=&quot;bold&quot;/&gt;<br />		   &lt;mx:TextInput<br />		     id=&quot;from&quot;<br />		     text=&quot;Firenze&quot;<br />		     width=&quot;100%&quot; /&gt;<br />	  &lt;/mx:HBox&gt;<br />	  <br />	  &lt;mx:HRule width=&quot;100%&quot; /&gt;<br />	  <br />	  &lt;mx:Label fontWeight=&quot;bold&quot;<br />		  text=&quot;To (select below the store and check the distance):&quot;/&gt;<br />			<br />	  	&lt;mx:HBox width=&quot;100%&quot; height=&quot;100%&quot; verticalAlign=&quot;middle&quot;&gt;<br />		    &lt;mx:List id=&quot;storeCities&quot; width=&quot;150&quot;<br />		    	change=&quot;processForm(event)&quot; height=&quot;121&quot;&gt; <br />		        &lt;mx:Object label=&quot;Milan - Outlet&quot; data=&quot;Milan&quot; /&gt;<br />		        &lt;mx:Object label=&quot;Rome - Boutique&quot; data=&quot;Rome&quot; /&gt;<br />		        &lt;mx:Object label=&quot;Napoli - Outlet&quot; data=&quot;Napoli&quot; /&gt;<br />		        &lt;mx:Object label=&quot;Venezia - Shop&quot; data=&quot;Venezia&quot; /&gt;<br />		        &lt;mx:Object label=&quot;Torino - Outlet&quot; data=&quot;Torino&quot; /&gt;<br />		    &lt;/mx:List&gt;<br />		    <br />		    &lt;mx:TextArea width=&quot;220&quot; height=&quot;60&quot; fontSize=&quot;14&quot; id=&quot;infoTripTxt&quot; <br />		    	backgroundAlpha=&quot;0&quot; borderStyle=&quot;none&quot;/&gt;	<br />		    <br />		&lt;/mx:HBox&gt;<br /><br />  &lt;/mx:VBox&gt;<br /><br />   <br />&lt;/mx:Application&gt;<br /></pre></div><br /><br />]]></description>
      <author>flagers</author>
      <pubDate>Mon, 31 Aug 2009 22:52:20 +0200</pubDate>
      <category>Flex 3.x</category>
      <guid>http://snippet.gnstudio.com/viewtopic/4</guid>
   </item>
  </channel>
</rss>
