<?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>PlanetB &#187; actionscript</title>
	<atom:link href="http://www.planetb.ca/tag/actionscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.planetb.ca</link>
	<description></description>
	<lastBuildDate>Sat, 31 Dec 2011 23:31:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>How to Use Apache Ant to Automate BlackBerry PlayBook Builds</title>
		<link>http://www.planetb.ca/2010/12/how-to-use-apache-ant-to-automate-blackberry-playbook-builds/</link>
		<comments>http://www.planetb.ca/2010/12/how-to-use-apache-ant-to-automate-blackberry-playbook-builds/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 12:23:47 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[PlayBook]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[Apache Ant]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[FLASH]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[playbook]]></category>
		<category><![CDATA[RIM]]></category>

		<guid isPermaLink="false">http://www.planetb.ca/?p=445</guid>
		<description><![CDATA[A couple of nuances that I&#8217;ve come across with using the PlayBook SDK from the command line include both the need to pass a boat-load of parameters and a lack of documentation on just how to use them. Through a bit of trial and error, I managed to get debugging with the command line tools [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.planetb.ca/wp-content/uploads/2010/12/BlackBerry-PlayBook-Apache-Ant2.jpg"><img src="http://www.planetb.ca/wp-content/uploads/2010/12/BlackBerry-PlayBook-Apache-Ant2.jpg" alt="" title="BlackBerry-PlayBook-Apache-Ant2" width="600" height="339" class="aligncenter size-full wp-image-452" /></a></p>
<p>A couple of nuances that I&#8217;ve come across with using the PlayBook SDK from the command line include both the need to pass a boat-load of parameters and a lack of documentation on just how to use them.  Through a bit of trial and error, I managed to get debugging with the command line tools to work and finally decided to automate some of the effort by using Apache Ant.</p>
<p>Apache Ant is a build tool similar to Make that facilitates the automation of the compilation and installation processes involved in building programs.  Ant is also really simple to use.</p>
<p>I&#8217;ve decided to share my Ant build.xml file template for PlayBook application building. It&#8217;s fairly straight forward.  Hopefully the following instructions (and video) will help you use the template.  Note that these instructions do assume that you can already build and package swf and bar files and have already been able to successfully deploy to the PlayBook simulator.<br />
<span id="more-445"></span></p>
<p>You can download <a href="http://www.planetb.ca/projects/PlayBook-Ant/Playbook-build-Ant-template-beta2-22610.zip">the build.xml template here</a>. <i>(updated Jan 12-2011 to work with Beta 2 simulator and to add better automated debug support)</i></p>
<p>Also, note that this build.xml template works only with Windows.  It will not work with Mac or Linux.</p>
<p>To Get Ant Setup:</p>
<ol>
<li> Download the Apache Ant .zip archive from here: <a href="http://ant.apache.org/bindownload.cgi" target="_blank">http://ant.apache.org/bindownload.cgi</a></li>
<li> Extract the zip archive to somewhere on your system</li>
<li> Add the Ant bin directory to your System Path.  (Control Panel -&gt; System -&gt; Advanced tab -&gt; Environment Variables -&gt; Find the Path variable and add the path to the Ant bin directory)</li>
</ol>
<p>To Use the Ant build.xml File:</p>
<ol>
<li>Rename the build-template.xml to build.xml and place it in your src directory.</li>
<li>You will have to modify the first 5 property tags and set the values as necessary.</li>
<li>If your package (bar file) requires files or directories other than the .swf file, you will need to add them at line 34.  Uncomment the last couple of arguments in the package target and modify them or delete them or add more as necessary.</li>
<li>To execute a build target from the command line, type &#8220;ant &#8220;.  So, for example, to build the packagerun target, you type &#8220;ant packagerun&#8221;.</li>
</ol>
<p style="padding-left: 60px;">The following targets are included in the file:</p>
<ul style="padding-left: 60px;">
<li> build-debug</li>
<li> build-release</li>
<li> package</li>
<li> deploy</li>
<li> run</li>
</ul>
<p style="padding-left: 60px;">There should also be a packagerun target that calls, in order, build-debug,package,deploy and then launches the app.</p>
<p style="padding-left: 30px;">4.  If you would like to create a debug session, open another command prompt and type &#8220;fdb&#8221;.  This will start the Flex debugger. Once open, type &#8220;run&#8221; before launching your PlayBook app from the command line.  Once the app is launched, the debugger will break.  Type &#8220;continue&#8221; and the debugger and app will continue.  Trace statements will be output to the debugger session &#8211; as will errors.  Further documentation on using fdb (setting breakpoints and stuff) can be found on the adobe docs website.</p>
<p>Here&#8217;s a video of me using Ant for an app I&#8217;m working on.  Click on it to watch at Vimeo.com and see it in HD.  Otherwise it&#8217;s difficult to see the text.  Cheers!</p>
<p><center><iframe src="http://player.vimeo.com/video/17746988?title=0&amp;byline=0&amp;portrait=0" width="588" height="331" frameborder="0"></iframe></center></p>
]]></content:encoded>
			<wfw:commentRss>http://www.planetb.ca/2010/12/how-to-use-apache-ant-to-automate-blackberry-playbook-builds/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Capturing Keyboard Events in Adobe Flex 3</title>
		<link>http://www.planetb.ca/2008/11/capturing-keyboard-events-in-adobe-flex-3/</link>
		<comments>http://www.planetb.ca/2008/11/capturing-keyboard-events-in-adobe-flex-3/#comments</comments>
		<pubDate>Thu, 27 Nov 2008 03:10:54 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[KeyboardEvent]]></category>

		<guid isPermaLink="false">http://www.planetb.ca/?p=80</guid>
		<description><![CDATA[For anyone else spending an unfortunate length of time unsuccessfully attempting to capture keyboard events in a Flex 3 application (for browser or AIR), here&#8217;s where you&#8217;re probably going wrong. You are likely registering the keyboard listener too early. It&#8217;s likely that you are calling an init() method where you register the keyboard event on [...]]]></description>
			<content:encoded><![CDATA[<p>For anyone else spending an unfortunate length of time unsuccessfully attempting to capture keyboard events in a Flex 3 application (for browser or AIR), here&#8217;s where you&#8217;re probably going wrong.</p>
<p>You are likely registering the keyboard listener too early.  It&#8217;s likely that you are calling an init() method where you register the keyboard event on creationComplete.  Instead, call the init function later on.  Try registering the event in the applicationComplete event handler.</p>
<p>More info here:<br />
<a href="http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&#038;productId=2&#038;postId=304">http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&#038;productId=2&#038;postId=304</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.planetb.ca/2008/11/capturing-keyboard-events-in-adobe-flex-3/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

