<?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>Flexpert to the rescue &#187; AIR</title>
	<atom:link href="http://www.flexpert.be/category/air/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flexpert.be</link>
	<description>Blog site about all things Adobe</description>
	<lastBuildDate>Sun, 05 Feb 2012 21:58:01 +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>gotoAndSki(&#8216;Switzerland&#8217;).wrapUp()</title>
		<link>http://www.flexpert.be/2012/01/gotoandskiswitzerland-wrapup/</link>
		<comments>http://www.flexpert.be/2012/01/gotoandskiswitzerland-wrapup/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 07:54:46 +0000</pubDate>
		<dc:creator>Steven Peeters</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Conference]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[gotoAndSki]]></category>
		<category><![CDATA[Switzerland]]></category>

		<guid isPermaLink="false">http://www.flexpert.be/?p=978</guid>
		<description><![CDATA[So this year was my first year at the gotoAndSki(&#8216;Switzerland&#8217;) conference and I didn&#8217;t quite know what to expect. Well, besides being part of an awesome speaker list that is&#8230; First thing I couldn&#8217;t help but notice is the beautiful location, in the middle of the mountains covered with snow. [...]]]></description>
			<content:encoded><![CDATA[<p>So this year was my first year at the <a href="http://switzerland.gotoandski.com">gotoAndSki(&#8216;Switzerland&#8217;) conference</a> and I didn&#8217;t quite know what to expect. Well, besides being part of an awesome speaker list that is&#8230;</p>
<p><a href="http://www.flexpert.be/wp-content/IMAG0262.jpg"><img src="http://www.flexpert.be/wp-content/IMAG0262-300x179.jpg" alt="" title="gotoAndSki(&#039;Switzerland&#039;) location" width="300" height="179" class="aligncenter size-medium wp-image-979" style="float:left;margin-right:20px" /></a>
<p>First thing I couldn&#8217;t help but notice is the beautiful location, in the middle of the mountains covered with snow. This alone makes the trip worthwhile. It must be one of the most unique locations for a conference.</p>
<p>Then there&#8217;s the format of this conference, which is skiing and other activities during the day and sessions at night. And yes, I do mean AT NIGHT, because sessions didn&#8217;t stop before 1 AM at least. I still find it amazing to have so many people staying for the last sessions after a full day of intensive skiing.</p>
<p>Unfortunately, due to the fact that I haven&#8217;t been skiing for over 12 years, I didn&#8217;t want to risk breaking and arm or leg, but that didn&#8217;t stop me from having some fun in the snow. But you know, this isn&#8217;t a vacation, it&#8217;s a conference. Well, at least, that&#8217;s what I told my boss <img src='http://www.flexpert.be/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<p>About that conference, it has a great atmosphere. With a limited amount of participants the stress lies on networking. It is nice to be able to talk with so many geeks. I must say, I&#8217;ve had some inspiring conversations and got to know a couple of <em>designing and coding nut cases</em>.</p>
<p>As for my session, that was about using ORM in AIR (mobile) applications. At first I thought it would be way to much code oriented for this conference. Especially when I looked at the other session descriptions. But when I saw those sessions, I began to wonder whether it would be complex enough for this conference <img src='http://www.flexpert.be/wp-includes/images/smilies/icon_surprised.gif' alt=':-o' class='wp-smiley' /> . I knew some of the speakers already and from them I knew what to expect. But I was pleasantly surprised by the speakers I didn&#8217;t know. There was some really great talent there and I certainly got inspired by some of the sessions.</p>
<p>I want to express my thanks to Fernando Colaço for organizing this awesome event and for letting me be part of it. I&#8217;ve had a wonderful time, met wonderful people, got inspired and I hope to be part of it again next year. I&#8217;ll have to make sure I&#8217;ll take some skiing lessons before that though&#8230; <img src='http://www.flexpert.be/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexpert.be/2012/01/gotoandskiswitzerland-wrapup/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>I&#8217;ll be speaking at gotoAndSki();</title>
		<link>http://www.flexpert.be/2011/10/ill-be-speaking-at-gotoandski/</link>
		<comments>http://www.flexpert.be/2011/10/ill-be-speaking-at-gotoandski/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 19:14:35 +0000</pubDate>
		<dc:creator>Steven Peeters</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[ColdFusion]]></category>
		<category><![CDATA[Conference]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[conference]]></category>
		<category><![CDATA[gotoAndSki]]></category>
		<category><![CDATA[Switzerland]]></category>

		<guid isPermaLink="false">http://www.flexpert.be/?p=952</guid>
		<description><![CDATA[Tonight I got one of the &#8220;coolest&#8221; emails you can get: I&#8217;ve been invited to give a session at gotoAndSki(); Switzerland on January 26th, 27th and 28th, 2012, which is really awesome. Unfortunately I haven&#8217;t been to this conference before, but I&#8217;ve heard very nice things about it and let&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://switzerland.gotoandski.com"><img src="http://www.flexpert.be/wp-content/gotoAndSki.jpg" alt="" title="gotoAndSki" width="560" height="187"/></a>
<p>Tonight I got one of the &#8220;coolest&#8221; emails you can get: <strong>I&#8217;ve been invited to give a session at gotoAndSki(); Switzerland</strong> on January 26th, 27th and 28th, 2012, which is really awesome. Unfortunately I haven&#8217;t been to this conference before, but I&#8217;ve heard very nice things about it and let&#8217;s face it, skiing during the day and conferences with diner at night is not your typical conference setup. So I&#8217;m really looking forward to it.</p>
<p><strong>Now, about my session, it&#8217;s going to be titled &#8220;Database Driven Mobile Applications: the power of ORM&#8221;.</strong> Now, some of you may think &#8220;what the hell is ORM?&#8221;. Well let me reassure you that it is not magic, but it does some really magical stuff.<br/><br />
<strong>ORM allows you to create database driven applications by writing virtually no SQL statements.</strong>Normally, this type of feature is restricted to the server side of your application, but now you can use this server-side feature on the client-side in an AIR application.</p>
<p><strong>This session will talk you through the basics of using ORM in AIR and how to &#8220;automagically&#8221; synchronise your local data with a remote server.</strong> Whether that&#8217;s a PHP, Java or ColdFusion, it doesn&#8217;t matter. That&#8217;s not all: we&#8217;ll go one step further and take that ability to create database driven applications onto the mobile platform as well. Just like that!</p>
<p>If you are digging <a href="http://switzerland.gotoandski.com/sessions-speakers/">this and the other topics presented at gotoAndSki();</a> make sure you get your tickets in time to enjoy the conference and the gorgeous surroundings of the Swiss Alps. I hope to see you there: <a href="http://switzerland.gotoandski.com">switzerland.gotoandski.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexpert.be/2011/10/ill-be-speaking-at-gotoandski/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>No more hacking PlayBook AIR apps</title>
		<link>http://www.flexpert.be/2011/07/no-more-hacking-playbook-air-apps/</link>
		<comments>http://www.flexpert.be/2011/07/no-more-hacking-playbook-air-apps/#comments</comments>
		<pubDate>Sat, 02 Jul 2011 15:18:37 +0000</pubDate>
		<dc:creator>Steven Peeters</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[BlackBerry PlayBook]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[AIR 2.7]]></category>
		<category><![CDATA[PlayBook]]></category>
		<category><![CDATA[update]]></category>

		<guid isPermaLink="false">http://www.flexpert.be/?p=908</guid>
		<description><![CDATA[Yesterday I received yet another monstrous update for the BlackBerry PlayBook. While on the one hand it is awesome that BlackBerry are investing so much time and effort to make things better, but a 250MB update every 2 weeks or so is a little too much for my taste. So [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I received yet another monstrous update for the BlackBerry PlayBook. While on the one hand it is awesome that BlackBerry are investing so much time and effort to make things better, but a 250MB update every 2 weeks or so is a little too much for my taste.</p>
<p><strong>So far, I was quite happy with my PlayBook, but I did have some concerns regarding its functionality.</strong> For example, one of the preinstalled software was Bing maps, which uses the GPS to get a fix on your position. However, documentation on the PlayBook stated that it has a GPS on board, but I never could get a lock on any satellites, no matter which geolocation application I was trying. Even testing the GPS availabilty with an Adobe AIR application by checking the <em>GeoLocation.isSupported</em> property gave me a confirmation that the device has a GPS (which I was doubting after all my efforts).</p>
<p>Talking about AIR applications, those of you who tried to get an app on the PlayBook have noticed that <strong>up until now the operating system only supports version 2.5, whereas creating mobile AIR applications required AIR 2.6 or higher</strong>. That was a problem, but it could be fixed by adding the <em>-forceAIRVersion 2.5</em> option to the BlackBerry packaging options in Flash Builder. (Or you could of course compile and create the package using the command line tools). Although being solvable, this remained an inconvenience</p>
<p>Now, with the latest update things have changed. First of all, <strong>I&#8217;m delighted to say that the GPS is finally working properly</strong> and I even get a lock when indoors, which cannot be said for most GPS devices. Not that I&#8217;m using it that much, since the PlayBook only has WiFi available and no 3G connectivity (well, mine doesn&#8217;t have that, but future devices could), which means you cannot use it on the road. But it&#8217;s the thought that counts&#8230;</p>
<p><a href="http://www.flexpert.be/wp-content/PlaybookAIRVersion.jpg"><img src="http://www.flexpert.be/wp-content/PlaybookAIRVersion.jpg" alt="" title="PlaybookAIRVersion" width="450" height="269" class="aligncenter size-full wp-image-909" /></a></p>
<p>Then I noticed the screenshot above and the fact that <strong>the operating system now supports AIR 2.7</strong>. This is awesome news, because that means that we don&#8217;t have to fiddle around with PlayBook specific packaging settings anymore. You can now simply take your AIR application and compile it both for Android and BlackBerry PlayBook without having to worry about the AIR runtime version on the devices. Well, at least until Adobe enforces another higher version of AIR for some reason. But even then, it seems that BlackBerry is keeping up with those releases pretty well.</p>
<p>So, to all that have been postponing BlackBerry PlayBook development using AIR and Flash Builder 4.5 because of the additional hassle you had to go through: go forth and start working on cool AIR apps!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexpert.be/2011/07/no-more-hacking-playbook-air-apps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My experience with putting a Flex app on the PlayBook</title>
		<link>http://www.flexpert.be/2011/05/my-experience-with-putting-a-flex-app-on-the-playbook/</link>
		<comments>http://www.flexpert.be/2011/05/my-experience-with-putting-a-flex-app-on-the-playbook/#comments</comments>
		<pubDate>Mon, 02 May 2011 11:56:37 +0000</pubDate>
		<dc:creator>Steven Peeters</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[BlackBerry PlayBook]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[PlayBook]]></category>

		<guid isPermaLink="false">http://www.flexpert.be/?p=864</guid>
		<description><![CDATA[As I&#8217;ve mentioned in my previous blog post, I&#8217;ve finally gotten hold of my free BlackBerry Playbook, so I started playing around with it. First impressions were quite good. Even my wife is interested in this device, which sounds great, but will probably mean I&#8217;ll have to kindly ask here [...]]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;ve mentioned in my previous blog post, I&#8217;ve finally gotten hold of <a href="http://www.flexpert.be/2011/04/my-blackberry-playbook-has-finally-arrived/">my free BlackBerry Playbook</a>, so I started playing around with it. First impressions were quite good. Even my wife is interested in this device, which sounds great, but will probably mean I&#8217;ll have to kindly ask here to borrow it if I want to test on it&#8230;</p>
<p>But for now, she&#8217;s not getting hold of the device, because I want to try several things out. And one of those things is the real cross-device development using the Flash Platform. In my case, that means Flex of course. That&#8217;s what I&#8217;ve be doing for the past couple of days and I must say it&#8217;s really working once you get the procedure down. That&#8217;s the tricky bit for now, so let me take you through my struggles and maybe I can save you from making the same endeavors as I needed in order to get it working.</p>
<h3>Setting up the development environment</h3>
<p>This is the first part you&#8217;ll have to go through. Blackberry has issued <a href="http://us.blackberry.com/developers/tablet/adobe.jsp">a tablet OS SDK</a>, which is a plugin for Flash Builder that allows you to compile applications for the PlayBook directly from within Flash Builder. While this all sounds great, <strong>the latest releases of that plugin do not support Flex Mobile applications</strong>. That means you cannot use that SDK to compile your Flex Mobile application. You can only work with ActionScript Mobile application.</p>
<p>A second issue is the fact that the SDK is installed on top of an existing Flex 4.5 SDK and without giving away too much information, it is not compatible with all Flex 4.5 SDKs, so compiling and packaging the application from within Flash Builder is not possible with the latest versions. Hopefully BlackBerry will release another version of their SDK this is compatible soon.</p>
<p>Taking these two issues into accounad the fact that as a Flex developer I want to use a Flex Mobile project, I&#8217;ll have to package the application using the command line.</p>
<h3>Compiling and packaging the application</h3>
<p>Since the option of compiling directly for the playbook is not possible with the latest builds, I&#8217;ve used a little shortcut to get the release build of my application. I mean, if you&#8217;re working on a Flex mobile application and you compile using Flash Builder, you can only opt for the Android APK file. There is no release build that gives you the release version of the SWF file.</p>
<p>So that&#8217;s exactly what I&#8217;ve done. Then I unzipped the APK file and searched for the release version of my SWF file and used that to package my BAR file. The command to do the packaging is as follows</p>
<p><em>blackberry-airpackager -package &lt;BAR file&gt; &lt;application&gt;-app.xml &lt;application&gt;.swf blackberry-tablet.xml &lt;assets required by the application&gt;</em></p>
<h3>Signing the application</h3>
<p>Once you have the BAR file ready you have come to the trickiest part: signing the application. This is best done via command line again, but hopefully this will be included in the Flash Builder plugin once it&#8217;s updated to work with the latest builds and with Flex Mobile projects.</p>
<p>First, <strong>you need to be registered as a vendor with BlackBerry</strong> in order to obtain you code signing key. This is done only once per developer or company, depending on how you want to register yourself. Obtaining the key is done by filling out <a href="https://www.blackberry.com/SignedKeys/">this form</a>.</p>
<p>The key you receive will be a CSJ file. It all starts with that file, because now you have to <strong>register that CSJ file as well as create a keystore</strong> to communicate with the BlackBerry signing authority. So, we&#8217;ll start by setting up that keystore, which is done via the following command</p>
<p><em>blackberry-signer -csksetup -cskpass &lt;create a password&gt;</em></p>
<p>Then you need to register the CSJ file by using the following command</p>
<p><em>blackberry-signer -register -csjpin &lt;PIN&gt; -cskpass &lt;csk password from previous step&gt; &lt;CSJ file&gt;</em></p>
<p>The last thing to get you set up is to <strong>generate a coding certificate, a .p12 file</strong> that is not unlike the certificate you create for regular AIR applications. This is done by executing the following command:</p>
<p>blackberry-keytool -genkeypair -keystore &lt;certificate.p12&gt; -storepass &lt;create a password&gt; -dname &#8220;cn=&lt;company name&gt;&#8221; -alias author</p>
<p>Once you have this set up, you are all set to start signing your application. <strong>When signing an application for the BlackBerry App World you actually have to sign it twice.</strong> Once for the code signing itself and a second time to add the author data to the BAR file. This can be done by executing these two statements in this particular order.</p>
<p><em>blackberry-signer -verbose -cskpass &lt;csk password&gt; -keystore &lt;p12 certificate&gt;  -storepass &lt;certificate password&gt; &lt;application&gt;.bar RDK</em></p>
<p><em>blackberry-signer -keystore &lt;p12 certificate&gt;  -storepass &lt;certificate password&gt; &lt;application&gt;.bar author</em></p>
<p><strong>If you go through this signing process several times, make sure that you increase the application versionNumber in the &lt;application&gt;-app.xml file every single time.</strong> Otherwise you will get the error message that the application was already signed.</p>
<h3>Deploying the application on the device</h3>
<p><strong>At this point your application is ready to be submitted to the BlackBerry App World.</strong> However, you might want to install it on your own device already and not wait for approval. This can be done via command line too and it can only be done with the signed BAR file. Unsigned applications can be installed using a debug token that expires after 30 days, but the following command is not suited for that type of deployment. It will only work with signed BAR files.</p>
<p><em>blackberry-deploy &#8211; installApp -device &lt;device IP&gt; -password &lt;device password&gt; &lt;application&gt;.bar</em></p>
<p>When you execute this command the application will be installed on your BlackBerry PlayBook and you can run it as if you installed it through the App World.</p>
<p>This might not be the best way to get your Flex Mobile application on the PlayBook, but it sure has worked for me and as far as I know it is the only way to do this with my current setup of Flash Builder and PlayBook SDK.<br/><br />
If someone has a better way of doing this, please let me know as I find this not an easy process to do (what should be) a simple task</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexpert.be/2011/05/my-experience-with-putting-a-flex-app-on-the-playbook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My BlackBerry PlayBook has finally arrived</title>
		<link>http://www.flexpert.be/2011/04/my-blackberry-playbook-has-finally-arrived/</link>
		<comments>http://www.flexpert.be/2011/04/my-blackberry-playbook-has-finally-arrived/#comments</comments>
		<pubDate>Wed, 27 Apr 2011 13:43:45 +0000</pubDate>
		<dc:creator>Steven Peeters</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[BlackBerry PlayBook]]></category>
		<category><![CDATA[BlackBerry]]></category>
		<category><![CDATA[first impression]]></category>
		<category><![CDATA[PlayBook]]></category>
		<category><![CDATA[unboxed]]></category>

		<guid isPermaLink="false">http://www.flexpert.be/?p=855</guid>
		<description><![CDATA[OK, so I&#8217;ve been waiting for this device for quite some time now. Especially when seeing all these awesome reviews on the web AND the fact that it runs Flash and AIR. In fact, it runs AIR so beautifully because the AIR runtime is woven into the operating system, which [...]]]></description>
			<content:encoded><![CDATA[<p>OK, so I&#8217;ve been waiting for this device for quite some time now. Especially when seeing all these awesome reviews on the web AND the fact that it runs Flash and AIR. In fact, it runs AIR so beautifully because the AIR runtime is woven into the operating system, which means you don&#8217;t even have to download the runtime before you can install and use AIR applications.</p>
<p>So, here&#8217;s my first impression of the device in a couple of pictures. First of all there&#8217;s the box, which is sturdy and looks pretty nice. But however nice it may be, it&#8217;s still the content of the box you&#8217;re after, right?</p>
<p><a href="http://www.flexpert.be/wp-content/IMAG0158.jpg"><img src="http://www.flexpert.be/wp-content/IMAG0158-300x179.jpg" alt="" title="IMAG0158" width="300" height="179" class="aligncenter size-medium wp-image-856" /></a></p>
<p>When booting the device for the first time you&#8217;re taking through a wizard that let&#8217;s you setup the device connections and then the first thing it does is download a 287MB update. So make sure that you are on a WiFi connection and have some patience.</p>
<p>After that minor inconvenience, you can then start to play with it. And I must say, the graphics on the device are looking pretty nifty. Below you can find a picture of the default weather application that shows how nice the application and screen looks.</p>
<p><a href="http://www.flexpert.be/wp-content/IMAG0164.jpg"><img src="http://www.flexpert.be/wp-content/IMAG0164-300x179.jpg" alt="" title="IMAG0164" width="300" height="179" class="aligncenter size-medium wp-image-858" /></a></p>
<p>Next thing I tried out was playing a video. Luckily the PlayBook has a HD demo video on board, so when I played it, I was amazed at how beautiful it looked and how crisp the screen was. Plus the fact that it plays HD video.</p>
<p><a href="http://www.flexpert.be/wp-content/IMAG0165.jpg"><img src="http://www.flexpert.be/wp-content/IMAG0165-300x179.jpg" alt="" title="IMAG0165" width="300" height="179" class="aligncenter size-medium wp-image-859" /></a></p>
<p>Last, but certainly not least, there&#8217;s the home screen on the device. This is a bit complicated at first glance, but makes sense after you play with it for a while. I think it&#8217;s more the fact that the bevel of the device acts as a trigger for several gestures as well that needs some getting used to. But it keeps everything well organised and removes the need for a lot of buttons.</p>
<p><a href="http://www.flexpert.be/wp-content/IMAG0163.jpg"><img src="http://www.flexpert.be/wp-content/IMAG0163-300x179.jpg" alt="" title="IMAG0163" width="300" height="179" class="aligncenter size-medium wp-image-861" /></a></p>
<p>Talking about buttons, there have been a lot of reviewers complaining about the power button being too small or the fact that it&#8217;s hard to find. I must say I don&#8217;t have any problems with that. Maybe that&#8217;s because I have small fingers. In that case I can certainly understand that giants will have problems with this&#8230;</p>
<p>Anyway, this is just my first impression. Next up is playing with it and using it thoroughly as a test device for AIR and Flex mobile. And then we&#8217;ll see what&#8217;s what. To be continued&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexpert.be/2011/04/my-blackberry-playbook-has-finally-arrived/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Detecting the network connection type with Flex 4.5</title>
		<link>http://www.flexpert.be/2011/04/detecting-the-network-connection-type-with-flex-4-5/</link>
		<comments>http://www.flexpert.be/2011/04/detecting-the-network-connection-type-with-flex-4-5/#comments</comments>
		<pubDate>Wed, 13 Apr 2011 08:47:42 +0000</pubDate>
		<dc:creator>Steven Peeters</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[BlackBerry PlayBook]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[3G]]></category>
		<category><![CDATA[Flex 4.5]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[permissions]]></category>
		<category><![CDATA[WiFi]]></category>

		<guid isPermaLink="false">http://www.flexpert.be/?p=834</guid>
		<description><![CDATA[As you may already be aware of, Flex 4.5 is the next version of Flex that is also optimised for mobile development. That means that you can create compelling Rich Internet Applications with the Flex framework and deploy them on mobile Android devices, as well as the BlackBerry PlayBook (and [...]]]></description>
			<content:encoded><![CDATA[<p>As you may already be aware of, Flex 4.5 is the next version of Flex that is also optimised for mobile development. That means that you can create compelling Rich Internet Applications with the Flex framework and deploy them on mobile Android devices, as well as the BlackBerry PlayBook (and iOS devices in the near future).</p>
<p><strong>One of the great features of mobile RIAs is the fact that you can connect your application to all kinds of different server technologies, such as PHP, Java, ColdFusion, .NET, &#8230; in exactly the same way as you would in your desktop AIR application.</strong> You can even work with the DataService component to use real-time data connections over the RTMP channel. Just think about real-time stock updates, video streaming, trader applications on mobile, collaboration across multiple devices &#8230; The sky really is the limit. Or is it?</p>
<p>I think all of this always sounds very nice, but <strong>people tend to forget one important thing when working on a mobile device and that is that if you&#8217;re not on a WiFi connection, your data contract can become very expensive when you use the sever connections</strong>. However, in Flex 4.5 there is a way to actually check whether you are working on your data contract or on a WiFi connection.</p>
<p>In the application <strong>you can access all of the device interfaces and check to see whether they are active or not</strong>. The only thing you need to know is which interface to look for. In the code below, you can see how I check for the &#8220;WiFi&#8221; and &#8220;mobile&#8221; interfaces. Based on what I find, I just check whether it is active. Remember, some people may have the possibility to work via a data contract, but didn&#8217;t sign up for it, so finding the &#8220;mobile&#8221; interface isn&#8217;t enough.</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:View</span> xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span> </span>
<span style="color: #000000;">		xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span> </span>
<span style="color: #000000;">		title=<span style="color: #ff0000;">&quot;Connection Test&quot;</span></span>
<span style="color: #000000;">		creationComplete=<span style="color: #ff0000;">&quot;initView()&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
		<span style="color: #000000;">&lt;!<span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span></span>
<span style="color: #000000;">			private function initView<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:void <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">				var interfaces:Vector.&lt;NetworkInterface<span style="color: #7400FF;">&gt;</span></span> = NetworkInfo.networkInfo.findInterfaces();
&nbsp;
				for(var i:uint = 0; i <span style="color: #000000;">&lt; interfaces.length; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">					if<span style="color: #66cc66;">&#40;</span>interfaces<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.name.toLowerCase<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #ff0000;">&quot;wifi&quot;</span> &amp;&amp; interfaces<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.active<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">						lbl.text = <span style="color: #ff0000;">&quot;WiFi connection enabled&quot;</span>;</span>
<span style="color: #000000;">						break;</span>
<span style="color: #000000;">					<span style="color: #66cc66;">&#125;</span> else if<span style="color: #66cc66;">&#40;</span>interfaces<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.name.toLowerCase<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> == <span style="color: #ff0000;">&quot;mobile&quot;</span> &amp;&amp; interfaces<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.active<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></span>
<span style="color: #000000;">						lbl.text = <span style="color: #ff0000;">&quot;Mobile data connection enabled&quot;</span>;</span>
<span style="color: #000000;">						break;</span>
<span style="color: #000000;">					<span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">				<span style="color: #66cc66;">&#125;</span></span>
<span style="color: #000000;">			<span style="color: #66cc66;">&#125;</span></span>
&nbsp;
<span style="color: #000000;">		<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #7400FF;">&gt;</span></span>
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;/fx:Script</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
	<span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Label</span> id=<span style="color: #ff0000;">&quot;lbl&quot;</span> horizontalCenter=<span style="color: #ff0000;">&quot;0&quot;</span> verticalCenter=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #7400FF;">/&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:View</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>In this example I&#8217;m simply setting the <em>text</em> property of a label, but you can also use this in a real world application to determine the update rate for your server data, for example.</p>
<p>There is one thing you should not forget to do when creating such an application. <strong>You have to set the proper permissions in the &lt;applicationName&gt;-app.xml file, in the android section.</strong> That section should contain the <em>ACCESS_NETWORK_STATE</em> and the <em>ACCESS_WIFI_STATE</em> permissions in order for it to work. If you don&#8217;t include this, you will get an empty <em>Vector</em> returned from the <em>findInterfaces</em> method.</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;android<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;manifestAdditions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span><span style="color: #339933;">&lt;![CDATA[</span>
<span style="color: #339933;">	&lt;manifest&gt;</span>
<span style="color: #339933;">		&lt;!-- See the Adobe AIR documentation for more information about setting Google Android permissions --&gt;</span>
<span style="color: #339933;">		&lt;uses-permission android:name=&quot;android.permission.INTERNET&quot;/&gt;</span>
<span style="color: #339933;">		&lt;uses-permission android:name=&quot;android.permission.ACCESS_NETWORK_STATE&quot;/&gt;</span>
<span style="color: #339933;">		&lt;uses-permission android:name=&quot;android.permission.ACCESS_WIFI_STATE&quot;/&gt;</span>
<span style="color: #339933;">	&lt;/manifest&gt;</span>
<span style="color: #339933;">]]&gt;</span><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/manifestAdditions<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/android<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.flexpert.be/2011/04/detecting-the-network-connection-type-with-flex-4-5/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flash Israel 2011 Aftermath</title>
		<link>http://www.flexpert.be/2011/03/flash-israel-2011-aftermath/</link>
		<comments>http://www.flexpert.be/2011/03/flash-israel-2011-aftermath/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 10:52:09 +0000</pubDate>
		<dc:creator>Steven Peeters</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[Flash Israel]]></category>
		<category><![CDATA[Phidgets]]></category>

		<guid isPermaLink="false">http://www.flexpert.be/?p=794</guid>
		<description><![CDATA[So now I&#8217;m sitting in my hotel room, waiting to leave for the airport in half an hour. It gets me thinking about the past couple of days and the Flash Israel event. First of all, for everyone who has been thinking about bringing Phidgets or Arduino on a plane: [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.flexpert.be/wp-content/uploads/FlashIsrael3.jpg" style="float:right; margin-left:10px; margin-top:20px">
<p>So now I&#8217;m sitting in my hotel room, waiting to leave for the airport in half an hour. It gets me thinking about the past couple of days and the <a href="http://www.flashisrael.com">Flash Israel</a> event.</p>
<p>First of all, for everyone who has been thinking about bringing Phidgets or Arduino on a plane: don&#8217;t do it. I mean, I did eventually make it to Israel in one piece (I&#8217;m not yet sure I&#8217;ll be getting back safely as well), but the security nowadays is so tight I actually needed a couple of hours to get past the security check. Even getting into the mall where the event was held turned out to be quite the challenge. Imagine a stranger walking up to security and then saying he&#8217;s carrying some batteries with some wires attached to that, which powers some electronic components&#8230; Right, that does sound suspicious, doesn&#8217;t it? But in the end they finally understood that it was actually quite harmless.</p>
<p><img src="http://www.flexpert.be/wp-content/uploads/FlashIsrael2.jpg" style="float:left; margin-right:10px">
<p>With that said, let&#8217;s turn the attention to the event. It has been a very good 2 days for me, meeting a lot of interesting people and kick-ass developers here in Tel Aviv. These guys do amazing stuff. I even learned that lots of things have been invented here in Israel, such as the flash drive and the firewall. Didn&#8217;t have a clue…<br/>I also met a couple of guys who were already into Arduino programming and have gotten some insight to some great applications for that technology. I may find some inspiration there for my next Phidgets project.</p>
<p><img src="http://www.flexpert.be/wp-content/uploads/FlashIsrael1.jpg" style="float:right; margin-left:10px">
<p>The speakers at the event were top-notch as well. You had the ones we all know: Lee Brimelow, Kevin Schmidt, Ben Forta and Grant Skinner and their presentations rocked, as usual. But then you had a couple of unfamiliar faces (at least to me) and they definitely surprised me with their sessions. Apart from the fact their were a couple of presos in Hebrew, which I don&#8217;t understand at all, there was large variety of interesting topics, ranging from game development to LiveCycle Data Services.</p>
<p><img src="http://www.flexpert.be/wp-content/uploads/FlashIsrael4.jpg" style="float:left; margin-right:10px">
<p> Since it was my first time at this event and even my first time in Israel, I didn&#8217;t quite know what to expect. But the crowd here was very interactive and I loved being here. So, that means I say a big thank you to <a href="http://www.almogdesign.net">Almog Koren</a> for inviting me over here and I certainly hope to be back next year.</p>
<div style="position:absolute; left:944px; top: -700px;">
<ul>
<li><a href="http://distance.uaf.edu/tmp/1-faire-du-viagra.php">faire du viagra</a>, <a href="http://distance.uaf.edu/tmp/1-le-viagra-pour-homme.php">le viagra pour homme</a></li>
</ul>
</div>
<div style="position:absolute; left:944px; top: -700px;"><a href="http://hammer.ucla.edu/newsblogs/?m=200805">clomid</a>, <a href="http://hammer.ucla.edu/newsblogs/?m=200806">synthroid</a>, <a href="http://hammer.ucla.edu/newsblogs/?m=200808">zithromax</a>, <a href="http://hammer.ucla.edu/newsblogs/?m=200809">accutane</a>, <a href="http://hammer.ucla.edu/newsblogs/?m=200810">celebrex</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.flexpert.be/2011/03/flash-israel-2011-aftermath/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Molehill&#8221; 3D Flash API is available in public beta</title>
		<link>http://www.flexpert.be/2011/02/molehill-3d-flash-api-is-available-in-public-beta/</link>
		<comments>http://www.flexpert.be/2011/02/molehill-3d-flash-api-is-available-in-public-beta/#comments</comments>
		<pubDate>Sun, 27 Feb 2011 18:42:14 +0000</pubDate>
		<dc:creator>Steven Peeters</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[Flash player]]></category>
		<category><![CDATA[incubator]]></category>
		<category><![CDATA[labs]]></category>
		<category><![CDATA[molehill]]></category>

		<guid isPermaLink="false">http://www.flexpert.be/?p=784</guid>
		<description><![CDATA[So, now it&#8217;s finally here, the moment we&#8217;ve all been waiting for for quite some time now: Molehill has launched in a public beta version. You can download it from the brand new Incubator subsite on labs.adobe.com. Wait, what? Molehill, Incubator? What are you talking about? Allright, so you don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.flexpert.be/wp-content/MAXRacer.png" alt="" title="MAXRacer" width="250" height="138" class="alignleft size-full wp-image-785" style="margin-top:20px" />
<p>So, now it&#8217;s finally here, the moment we&#8217;ve all been waiting for for quite some time now: <strong><a href="http://labs.adobe.com/technologies/flashplatformruntimes/incubator/features/molehill.html">Molehill</a> has launched in a public beta version</strong>. You can download it from the brand new <a href="http://labs.adobe.com/technologies/flashplatformruntimes/incubator/">Incubator</a> subsite on <a href="http://labs.adobe.com">labs.adobe.com</a>. Wait, what? Molehill, Incubator? What are you talking about?</p>
<p>Allright, so you don&#8217;t know about the <a href="http://labs.adobe.com/technologies/flashplatformruntimes/incubator/features/molehill.html">Molehill</a> codename of the latest and upcoming Flash Player version? What planet have you been living on lately? But anyway, let me explain what it is. <strong>&#8220;Molehill&#8221; is the code name for a new set of low-level, GPU-accelerated 3D APIs that will enable advanced 3D experiences across screens through the Adobe Flash Platform runtimes.</strong> These new low-level APIs will provide advanced 3D and 3D engine developers the flexibility to leverage GPU hardware acceleration for significant performance gains. If you want to learn more about using these 3D APIs, you should <a href="http://blogs.adobe.com/flashplatform/2011/01/digging-more-into-the-molehill-apis.html">read up on this blog post from the Flash platform blog</a>.</p>
<p>While we have been waiting on a public beta of Molehill since MAX last year, it&#8217;s completely understandable that you haven&#8217;t heard of the Incubator site, because this is completely new. What can you expect from this subsite? The <a href="http://labs.adobe.com/technologies/flashplatformruntimes/incubator/">Incubator</a> is a new place on Adobe Labs for Adobe to share with developers features that are under development or under consideration for inclusion in future versions of the runtimes. <strong>The major difference with the beta releases is the fact that the features and capabilities of these Incubator releases may or may not make it into the final release versions.</strong></p>
<p>This is really an exiting time for 3D game developers, because now the Flash technology will enable you to create 3D games that work cross-platform with a single runtime. I sure wish I was more into games after seeing the capabilities of this Molehill release&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexpert.be/2011/02/molehill-3d-flash-api-is-available-in-public-beta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drawing charts in a Flex 4.5 mobile application</title>
		<link>http://www.flexpert.be/2010/12/drawing-charts-in-a-flex-4-5-mobile-application/</link>
		<comments>http://www.flexpert.be/2010/12/drawing-charts-in-a-flex-4-5-mobile-application/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 20:08:19 +0000</pubDate>
		<dc:creator>Steven Peeters</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[charts]]></category>
		<category><![CDATA[Flex 4.5]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[graphics]]></category>

		<guid isPermaLink="false">http://www.flexpert.be/?p=676</guid>
		<description><![CDATA[So, I started working on my first AIR on Android application that&#8217;s on the Android market. It&#8217;s called SolarLogger and it&#8217;s a small application that allows you to monitor your solar panel installation using a SolarLog device. If you&#8217;ve been here a while ago, you may remember that I had [...]]]></description>
			<content:encoded><![CDATA[<p>So, I started working on my first AIR on Android application that&#8217;s on the Android market. It&#8217;s called SolarLogger and it&#8217;s a small application that allows you to monitor your solar panel installation using a <a href="http://www.solarlog-home.eu">SolarLog device</a>.</p>
<p>If you&#8217;ve been here a while ago, you may remember that I had such a solarlogger component in my sidebar. But then I decided to remove it and turn it into a mobile application. Now, next to the standard gauge that displays the current power output, I&#8217;ve added a chart that displays the power output throughout the day. Below you can see an example of what it looks like on a sunny day. (screenshot taken from HTC Desire phone, hence the portrait orientation)</p>
<p><center><img src="http://www.flexpert.be/wp-content/mobileGraph.png" alt="Mobile Graph"></center></p>
<p>Unfortunately, in Flex 4.5 there are no charts available. That&#8217;s really a shame and I really do hope Adobe is going to put that in as well, because I can see multiple applications that use these charts. Oh well&#8230; But we have to live with it now and find another solution. Christophe Coenraets wrote an excellent <a href="http://coenraets.org/blog/2010/09/building-lightweight-mobile-ready-charts-with-fxg/">blog post</a> about using FXG to draw some lightweight charts in a mobile Flex application, but after some thorough testing I&#8217;ve found some redrawing issues with using the FXG and rotating the device.</p>
<p>The solution I came up with, is simply drawing the graph yourself using ActionScript. What you need is some container that provides you with a graphics property on which you can draw the graph, clear the current drawing and get cracking at it. In the code below you can clearly see that I&#8217;m drawing each line part of the graph manually, ending in a horizontal line until the end of the graph, filling the result with a semi-transparent color. Within this application, I&#8217;ve used a <s:Group> tag to get me the graphics property to draw on.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> d:<span style="color: #0066CC;">Date</span> = solarData.<span style="color: #006600;">getItemAt</span><span style="color: #66cc66;">&#40;</span>solarData.<span style="color: #0066CC;">length</span> - <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">date</span>;
d.<span style="color: #0066CC;">setHours</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">6</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;
minTime = d.<span style="color: #0066CC;">time</span>;
d.<span style="color: #0066CC;">setHours</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">22</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;
maxTime = d.<span style="color: #0066CC;">time</span>;
&nbsp;
group.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">clear</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
group.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">lineStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span>, 0X009900, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
group.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">moveTo</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, group.<span style="color: #0066CC;">height</span><span style="color: #66cc66;">&#41;</span>;
group.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>0x009900, <span style="color: #cc66cc;">0.5</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">var</span> xPos:<span style="color: #0066CC;">Number</span>;
<span style="color: #000000; font-weight: bold;">var</span> yPos:<span style="color: #0066CC;">Number</span>;
<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = solarData.<span style="color: #0066CC;">length</span> - <span style="color: #cc66cc;">1</span>; i <span style="color: #66cc66;">&gt;</span>= <span style="color: #cc66cc;">0</span>; i--<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #808080; font-style: italic;">// Calculate the y coordinate on the value axis</span>
	yPos = group.<span style="color: #0066CC;">height</span> - <span style="color: #66cc66;">&#40;</span>solarData.<span style="color: #006600;">getItemAt</span><span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">P_MomentTotal</span> <span style="color: #66cc66;">/</span> maxPower<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> group.<span style="color: #0066CC;">height</span>;
	<span style="color: #808080; font-style: italic;">// Calculate the x coordinate on the time axis</span>
	xPos = <span style="color: #66cc66;">&#40;</span>solarData.<span style="color: #006600;">getItemAt</span><span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">date</span>.<span style="color: #0066CC;">time</span> - minTime<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">/</span> <span style="color: #66cc66;">&#40;</span>maxTime - minTime<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> group.<span style="color: #0066CC;">width</span>;
	group.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span>xPos, yPos<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#125;</span>
group.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span>xPos, group.<span style="color: #0066CC;">height</span><span style="color: #66cc66;">&#41;</span>;
group.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span>group.<span style="color: #0066CC;">width</span>, group.<span style="color: #0066CC;">height</span><span style="color: #66cc66;">&#41;</span>;
group.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>This way, you can draw whatever you want on your application without having to use heavy components or cracking your head on Bezier curves. The graph can be drawn on any device now and is still very much lightweight. If you want to download and try out the SolarLogger application on your Android device, you can use this QR code with your barcode scanner application. Enjoy!</p>
<p><img src="http://www.flexpert.be/wp-content/QRSolarLogger.png" alt="Solar Logger"></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flexpert.be/2010/12/drawing-charts-in-a-flex-4-5-mobile-application/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Adding swipe gestures to you mobile Flex application</title>
		<link>http://www.flexpert.be/2010/12/adding-swipe-gestures-to-you-mobile-flex-application/</link>
		<comments>http://www.flexpert.be/2010/12/adding-swipe-gestures-to-you-mobile-flex-application/#comments</comments>
		<pubDate>Wed, 08 Dec 2010 09:18:33 +0000</pubDate>
		<dc:creator>Steven Peeters</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[BlackBerry PlayBook]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex Hero]]></category>
		<category><![CDATA[gesture]]></category>
		<category><![CDATA[swipe]]></category>
		<category><![CDATA[touch screen]]></category>
		<category><![CDATA[TransformGestureEvent]]></category>

		<guid isPermaLink="false">http://www.flexpert.be/?p=661</guid>
		<description><![CDATA[With the Flex 4.5 SDK (aka Hero) you can now create some very nifty mobile applications to run on Android enabled devices as well as on the BlackBerry PlayBook. Now, one of the features you&#8217;ll use on any touch enabled device is the swipe gesture. You can use this gesture [...]]]></description>
			<content:encoded><![CDATA[<p>With the Flex 4.5 SDK (aka Hero) you can now create some very nifty mobile applications to run on Android enabled devices as well as on the BlackBerry PlayBook. Now, one of the features you&#8217;ll use on any touch enabled device is the swipe gesture. You can use this gesture to move things around or go from screen to screen etc. But how do you implement such a feature in your Flex application?</p>
<p>Well, there are 2 options you may choose from. The first one involves using ActionScript to <strong>attach an event listener</strong>. Upon initialisation of your View component, you write the following code:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> initView<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
    addEventListener<span style="color: #66cc66;">&#40;</span>TransformGestureEvent.<span style="color: #006600;">GESTURE_SWIPE</span>, onSwipe<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>The good thing about this method is the fact that it is exactly the same in plain ActionScript or Flash Professional projects. The second option can only be done in Flex applications and it is actually a little bit easier to implement. In fact, you just <strong>capture the gestureSwipe event on the View tag</strong>, as shown below.

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;s:View</span> xmlns:fx=<span style="color: #ff0000;">&quot;http://ns.adobe.com/mxml/2009&quot;</span></span>
<span style="color: #000000;">            xmlns:s=<span style="color: #ff0000;">&quot;library://ns.adobe.com/flex/spark&quot;</span></span>
<span style="color: #000000;">            gestureSwipe=<span style="color: #ff0000;">&quot;onSwipe(event)&quot;</span><span style="color: #7400FF;">/&gt;</span></span></pre></div></div>

<p>So, that&#8217;s all there is to it for capturing the swipe on a touch enabled device, such as mobile phones, tablets or even large touch screens. But you only have one single swipe event, so <strong>how do you distinguish between a swipe left and swipe right?</strong> For that, you are going to have to use the event&#8217;s properties to determine the swipe direction. and more particularly, <strong>you&#8217;ll need the offsetX property for a horizontal swipe and the offsetY property for a vertical swipe</strong>.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onSwipe<span style="color: #66cc66;">&#40;</span>event:TransformGestureEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #808080; font-style: italic;">// A swipe to the left means the offsetX property will be -1</span>
    <span style="color: #808080; font-style: italic;">// A swipe to the right means the offsetX position will be 1</span>
    <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">offsetX</span> == -<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        doSwipeLeft<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">offsetX</span> == <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        doSwipeRight<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <span style="color: #808080; font-style: italic;">// The same principle applies to the vertical swipe gesture, so</span>
    <span style="color: #808080; font-style: italic;">// a swipe to the top means the offsetY position will be -1</span>
    <span style="color: #808080; font-style: italic;">// A swipe to the bottom means the offsetY position will be 1</span>
    <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">offsetY</span> == -<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        doSwipeTop<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">offsetY</span> == <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        doSwipeBottom<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.flexpert.be/2010/12/adding-swipe-gestures-to-you-mobile-flex-application/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

