﻿<?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>Ladysign Dev Blog &#187; Flex</title>
	<atom:link href="http://www.ladysign-apps.com/blog/tag/flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ladysign-apps.com/blog</link>
	<description>Girls can code.</description>
	<lastBuildDate>Mon, 01 Feb 2010 09:44:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Flex Cross Domain Policy</title>
		<link>http://www.ladysign-apps.com/blog/code/flex-code/flex-cross-domain-policy/</link>
		<comments>http://www.ladysign-apps.com/blog/code/flex-code/flex-cross-domain-policy/#comments</comments>
		<pubDate>Sat, 18 Apr 2009 17:29:14 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[flex]]></category>
		<category><![CDATA[cross domain]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[policy]]></category>
		<category><![CDATA[swf]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=615</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>Flex won&#8217;t load data from a server that is not in the domain from which the SWF file originated unless there is a c[......]</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>Flex won&#8217;t load data from a server that is not in the domain from which the SWF file originated unless there is a crossdomain.xml in the server&#8217;s root.<br />
If you want to allow Flash to access your localhost data, then create a <strong>crossdomain.xml </strong> file in your public folder, with the following content:</p>
<pre class="brush: xml;">
&lt;?xml version &quot;1.0&quot;?&gt;
&lt;cross-domain-policy&gt;
    &lt;allow-access-from domain=&quot;*&quot; /&gt;
&lt;/cross-domain-policy&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/flex-code/flex-cross-domain-policy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Xbox Live gamerprofile webservice</title>
		<link>http://www.ladysign-apps.com/blog/code/flex-code/xbox-live-gamerprofile-webservice/</link>
		<comments>http://www.ladysign-apps.com/blog/code/flex-code/xbox-live-gamerprofile-webservice/#comments</comments>
		<pubDate>Sat, 28 Feb 2009 19:51:22 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[flex]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[gamercard webservice]]></category>
		<category><![CDATA[webservice xbox live]]></category>
		<category><![CDATA[xbox360 api]]></category>
		<category><![CDATA[xbox360 message]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=442</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 3 out of 5 stars</p>
<p>Yeah I&#8217;m addicted to my Xbox360, and my Xbox Live account.<br />
Developers, check this out:<br />
<a href="http://duncanmackenzie.net/services/XboxInfo.asmx?op=GetXboxInfo"><br />
DunCan Mackenzie</a> created a [......]</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 3 out of 5 stars</p>
<p>Yeah I&#8217;m addicted to my Xbox360, and my Xbox Live account.<br />
Developers, check this out:<br />
<a href="http://duncanmackenzie.net/services/XboxInfo.asmx?op=GetXboxInfo"><br />
DunCan Mackenzie</a> created a webservice to retrieve your XboxProfile.</p>
<p>I&#8217;m working now on a cool Flex app, which reads my Xbox Profile info.</p>
<p><a href="http://profile.mygamercard.net/saveLEE"><br />
<img src="http://card.mygamercard.net/cylinder/saveLEE.png" border=0><br />
</a><br />
<a href="http://duncanmackenzie.net/services/GetXboxInfo.aspx?GamerTag=saveLEE"><br />
See the response XML message.<br />
</></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/flex-code/xbox-live-gamerprofile-webservice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex debugging</title>
		<link>http://www.ladysign-apps.com/blog/code/flex-code/flex-debugging/</link>
		<comments>http://www.ladysign-apps.com/blog/code/flex-code/flex-debugging/#comments</comments>
		<pubDate>Sat, 28 Feb 2009 19:44:33 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[flex]]></category>
		<category><![CDATA[actionscript debugger]]></category>
		<category><![CDATA[actionscript trace flex]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[flex debugger]]></category>
		<category><![CDATA[flex debugging]]></category>
		<category><![CDATA[flex trace]]></category>
		<category><![CDATA[flex tracer]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=448</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>Hey where is the trace window, you might gonna ask if you are an experienced Flash Developer and toke the step to develop[......]</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>Hey where is the trace window, you might gonna ask if you are an experienced Flash Developer and toke the step to develop in Flex. Well with Flex debugging is very powerful, just as how you are used to debug with a normal developers IDE.</p>
<p>As default debugging mode will be started, when testing your swf local. Just hit F11.<br />
(hit SHIFT + F11 for a normal built). To debug open the debug perspective.<br />
For reading the trace info you will have to open the console view.</p>
<p>Not working? Flash content debugger should be installed:<br />
<a href="http://www.adobe.com/support/flashplayer/downloads.html"><br />
http://www.adobe.com/support/flashplayer/downloads.html<br />
</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/flex-code/flex-debugging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex: load extern actionscript</title>
		<link>http://www.ladysign-apps.com/blog/code/flex-code/flex-load-extern-actionscript/</link>
		<comments>http://www.ladysign-apps.com/blog/code/flex-code/flex-load-extern-actionscript/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 11:49:20 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[flex]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[extern actionscript]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[mxml]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=394</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>The cool thing about Adobe Flex is that you can run within your mxml file Actionscript.<br />
I love standards and clean code. [......]</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>The cool thing about Adobe Flex is that you can run within your mxml file Actionscript.<br />
I love standards and clean code. That&#8217;s why I wanted to know how I can run an extern Actionscript.as file.<br />
It&#8217;s pretty easy:</p>
<p>1. Create a new folder in your Flex project. &#8211; I called it: includes<br />
2. In my mxml I define the extern Actionscript:</p>
<p>    <mx:Script><br />
    	<![CDATA[<br />
        include "../includes/scripts.as";<br />
    	]]&gt;<br />
    </mx:Script></p>
<p>3. I&#8217;ll also define the action into mxml, I want it after a button click:</p>
<p><mx:Button label="Next page" click="init();" x="156" y="375"/></p>
<p>4. In my includes folder I create an Actionscript: scripts.as:<br />
For example:</p>
<p>import mx.controls.Alert;</p>
<p>private var alert:Alert;</p>
<p>private function init():void {<br />
    var alertText:String = &#8220;Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse rutrum metus nonummy augue. In hac habitasse platea dictumst. Nulla arcu libero, nonummy non, suscipit a, mollis non, augue. Maecenas porttitor urna vel enim. Nam eget tortor. Mauris facilisis suscipit felis. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Proin nunc turpis, venenatis non, laoreet at, fringilla nec, purus. Sed sodales. Sed turpis. Vestibulum sagittis justo id metus. Sed placerat, nibh lobortis mattis adipiscing, sapien wisi interdum arcu, nec vehicula sem tortor id nibh.&#8221;;<br />
    var alertTitle:String = &#8220;The quick brown fox jumped over the lazy dog.&#8221;;<br />
    alert = Alert.show(alertText, alertTitle);<br />
    alert.status = &#8220;I&#8217;m a status message&#8221;;<br />
}</p>
<p>That made my day!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/flex-code/flex-load-extern-actionscript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Flex: Create a lastfm artist playcount app</title>
		<link>http://www.ladysign-apps.com/blog/code/flex-code/flex-create-a-lastfm-artist-playcount-app/</link>
		<comments>http://www.ladysign-apps.com/blog/code/flex-code/flex-create-a-lastfm-artist-playcount-app/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 15:33:58 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[flex]]></category>
		<category><![CDATA[adobe flex]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[flex xml]]></category>
		<category><![CDATA[last fm]]></category>
		<category><![CDATA[lastfm]]></category>
		<category><![CDATA[lastfm API]]></category>
		<category><![CDATA[playcount]]></category>
		<category><![CDATA[webservices]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=388</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 3 out of 5 stars</p>
<p>I have to say. I love music, so I adore <a href="http://www.last.fm" target="_blank">LastFm</a>. But I&#8217;m also a lover of Adobe and it&#8217;s application Flex. So l[......]</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 3 out of 5 stars</p>
<p>I have to say. I love music, so I adore <a href="http://www.last.fm" target="_blank">LastFm</a>. But I&#8217;m also a lover of Adobe and it&#8217;s application Flex. So let&#8217;s learn something about Flex, XML webservices and the LastFM API. We are gonna create (with Flex Builder 3), a simple but cool application which loads your artist and playcount information from your LastFM account.</p>
<p>First create a LastFM developer account, it will give you the LastFM API_KEY.<br />
It will also grand you access to the big LastFM API, with LastFM methods and webservices:<br />
<a href="http://www.last.fm/api/account">Last FM API Dev account</a>.</p>
<p>When you have a LastFM API account, you can access the following URL with your details ([your_key_here] prefill with your api_key and [last_fm_user] prefill with the lastfm username from who you want to retrieve the artist and playcount info from), to receive the XML of your artist info/playcount.</p>
<pre class="brush: jscript;">
http://ws.audioscrobbler.com/2.0/?method=library.getartists&amp;api_key=[your_key_here]&amp;user=[last_fm_user]
</pre>
<p>Check this XML, and see its structure. (we need this structure in Flex!)</p>
<pre class="brush: xml;">
&lt;lfm&gt;
  &lt;artists&gt;
     &lt;artist&gt;
       &lt;name&gt;Guano Apes&lt;/name&gt;
       &lt;playcount&gt;100&lt;/playcount&gt;
       ...
    &lt;/artist&gt;
     &lt;artist&gt;
       &lt;name&gt;Felix the housecat&lt;/name&gt;
       &lt;playcount&gt;50&lt;/playcount&gt;
       ...
    &lt;/artist&gt;
  &lt;/artists&gt;
&lt;/lfm&gt;
</pre>
<p>Now you have your api_key let&#8217;s run Adobe Flex, and create a Flex Project.<br />
Add the following code into the source tab:</p>
<p>This will start a nice Flex panel, with the title: &#8220;Favourite Artists&#8221;.</p>
<p><?xml version="1.0" ?><br />
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"><br />
   <mx:Panel id="reader" title="Favorite Artists" width="650" height="450" layout="absolute"></p>
<p>   </mx:Panel><br />
</mx:Application></p>
<p>Now add the webservice: HTTPService, with the previous mentioned url to the Lastfm XML, and give it the idname: &#8220;fetchData&#8221;. I added this code above my panel code.<br />
Please note that you have to encode the &#8220;&#038;&#8221; signs, so Flex sees the URL as one line.</p>
<pre class="brush: jscript;">
&amp;#38;
</pre>
<p>	<mx:HTTPService id="fetchData" url="http://ws.audioscrobbler.com/2.0/?method=library.getartists&#38;api_key=[your_key_here]&#38;user=[lastfm_username]" resultFormat="object" /></p>
<p>We can now add a datagrid, for the Artist column (see headerText), we want to prefill this with<br />
the xml node &#8216;name&#8217; (lfm.artists.artist.name), and the playcount column with &#8216;playcount&#8217; (lfm.artists.artist.playcount):</p>
<p>	<mx:DataGrid id="entries" width="630" dataProvider="{fetchData.lastResult.lfm.artists.artist}" x="-0.15" y="7.1054274E-15" height="366.4394"><br />
	  <mx:columns><br />
	    <mx:Array><br />
	      <mx:DataGridColumn dataField="name" headerText="Artist" /><br />
	      <mx:DataGridColumn dataField="playcount" headerText="Playcount" /><br />
	    </mx:Array><br />
	  </mx:columns><br />
	</mx:DataGrid></p>
<p>And the button to fetch the xml data. Use your HTTPService id .send() method:</p>
<p>	<mx:Button label="Get favourite artists" click="{fetchData.send()}" x="9.05" y="375"/></p>
<p>Okay, let&#8217;s build and run it in Flex. Wow!</p>
<p>Here&#8217;s the complete code:</p>
<p><?xml version="1.0" ?><br />
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"></p>
<p>	<mx:HTTPService id="fetchData" url="http://ws.audioscrobbler.com/2.0/?method=library.getartists&#38;api_key=[your_key_here]&#038;&#38;user=[lastfm_username]" resultFormat="object" /></p>
<p>	<mx:Panel id="reader" title="Favorite Artists" width="650" height="450" layout="absolute"></p>
<p>	<mx:DataGrid id="entries" width="630" dataProvider="{fetchData.lastResult.lfm.artists.artist}" x="-0.15" y="7.1054274E-15" height="366.4394"><br />
	  <mx:columns><br />
	    <mx:Array><br />
	      <mx:DataGridColumn dataField="name" headerText="Artist" /><br />
	      <mx:DataGridColumn dataField="playcount" headerText="Playcount" /><br />
	    </mx:Array><br />
	  </mx:columns><br />
	</mx:DataGrid></p>
<p>	<mx:Button label="Get favorite artists" click="{fetchData.send()}" x="9.05" y="375"/></p>
<p>	</mx:Panel><br />
</mx:Application></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/flex-code/flex-create-a-lastfm-artist-playcount-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
