The Flex Team

The Flex Team

Air, Flex and Flash

The Flex Team RSS Feed
 
 
 
 

The iPhone and onAir geotagging

Checking the onair Europe tour website (see you monday next week if you are also attending the Stockholm session, which by the way seems to be at capacity at the moment) I saw this cool app developed on the tour that takes an image from a webcam, geotags it, and uploads it to a flickr account. I found it very interesting, just as the Trippermap (Geotagging Flickr photos with Google Earth) and the “news” on the iPhone geotagging features. Just wanted to throw a couple of links about it on the blog:

Trippermap

iPhone geotagging

AIR snapshot and geotag

onAir Tour is coming to Europe and everyone is welcome to join!

You probably read about the AIRbus tour in the U.S. Well, now is your chance to show what we developers are made of here in Europe =).

The on AIR European tour is a free 12 city train tour through Europe where developers can learn how to bring their web applications to the desktop with Adobe AIR.

The onAir Tour is coming to Europe. Check the links and see you then:

http://onair.adobe.com

The Facebook page for the tour:

http://www.facebook.com/pages/on-AIR-Tour-Europe-2008/8295947366

Flex 3 and AIR now available at adobe.com

Download The Adobe® AIR™ runtime here and Download Flex 3 here

Take a picture of your browser and save it to your desktop

Pick the snapshooter for free at the Adobe Exchange.

Snapshooter

Any questions about it, please send them to my mail.

The Facebook Actionscript API

Jason Crist just published a very useful post for those of you interested in creating/deploying apps on Facebook in the Flash Runtime.

A quick link : http://code.google.com/p/facebook-actionscript-api/

A MediaDisplay component to control actions on Flash Based e-learning content

At Adobes Silke Fleischers blog, I read that The eLearning Guild is planning a new eBook on Tips for Producing and Managing Flash-based e-Learning Content and they are looking for tip submissions.

A good tip, in my humble opionion =), is to use a MediaDisplay component to trigger actions on screen.

What you do is:

1. Place a mediaDisplay component and give it an instance name (e.g. mediaStreamer)

2. Create and organize your movieClips. Remember that your audio file will be responsible for making things move, stop or just visible. So you can for instance create a telephone with a stop(); on the first frame and a label called “ring”. When the timeline reaches this label the telephone starts moving.

3. On a new layer put this ActionScript:

var filesPath:String = “http://yourdomain.com”;
mediaStreamer.setMedia(”YourFile.mp3″,”MP3″);
cuePointListener = new Object();
cuePointListener.cuePoint = function(eventObject) {
doStuff(eventObject.target.name);
};
mediaStreamer.addEventListener(”cuePoint”,cuePointListener);
mediaStreamer.addCuePoint(”none”,0);
mediaStreamer.addCuePoint(”start”,1.5);
mediaStreamer.addCuePoint(”oneAction”,11);

function doStuff(mediaCue) {
switch (mediaCue) {
case “none” :
gotoAndStop(”none”);
break;
case “start” :
gotoAndPlay(”start”);
break;
case “oneAction” :
_root.telephone_mc.gotoAndPlay(”ring”);
break;

default :
}
}
stop();

3. Compile it and that is all.

Codename Pacifica, voip on the flash player…

If you can include your self on the list of developers trying to get the FMS to work for your users on the “low speed connection” territories, Pacifica might sound interesting, ok at least worth to follow, cause if I understood well, it is not clear until now if it is a “developer tool” or a regular user service.

The thing is that Adobe released the Codename Pacifica with this headline “High Quality VoIP and Presence for the Flash Platform“.

The facts are on the Codename Pacifica blog and developers are already manifestating their opinions round here on the Internet.

New beta version of Adobe AIR is now available

Just in case you did not know. More at the Adobe Labs.

Mike Chambers and Lee Brimelow on the Flash Platform this November in Aarhus

This November will Mike Chambers give an overview of the Flash Platform, and talk about some of the latest news and developers around the Flash Player Adobe AIR and open source Flex. Mike will also discuss how Adobe’s technologies fit within the larger Rich Internet Application (RIA) space. Lee Brimelow will talk about how Adobe AIR allows web developers to extend their reach onto the desktop the same day.

More to come about time and place here and at the DFUGs webpage.

E-mail me (cujino) or the guys at the DFUG if you want to know more.

Retrieving XML HTTPservice, exchange rates

This tutorial will get you started in retrieving and binding data from an external XML. The useful thing about it, is that you can “feed” your application with data from external sources or your own XML.

So here is an approach on how to retrieve and display exchange rates provided by a Bank (Danmark Nationalbank) in Flex using a Datagrid and a label component.

1. Create a basic project or an mxml application and add an HTTPservice component, give it an id, and add the url to the XML file on the url property.

<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute”>
 <mx:HTTPService id=”hsRPC” url=”http://www.nationalbanken.dk/dndk/valuta.nsf/valuta.xml”/>
</mx:Application>

2. Then you need to make a service request, usually on the creationComplete event, which will be dispatched after the Application has been initialized. You can also use another event to make the request, like for instance a click event on a button.

<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute” creationComplete=”hsRPC.send();”>
 <mx:HTTPService id=”hsRPC” url=”http://www.nationalbanken.dk/dndk/valuta.nsf/valuta.xml”/>
</mx:Application>

3. Now you need to handle the data coming from the XML, to do that you add a result handler inside the HTTPservice and just decide where to put the data. An ArrayCollection is the recommended class, among other things cause it provides you a lot of tools for data manipulation. So what you do know is, you create a new ArrayCollection (need to import the ArrayCollection class), and create a data handler function, inside a script tag.

<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute” creationComplete=”hsRPC.send();”>
<mx:Script>
 <![CDATA[
 Â
  import mx.collections.ArrayCollection;
  [Bindable]
  private var valuta:ArrayCollection;
   Â
 ]]>
</mx:Script>
 <mx:HTTPService id=”hsRPC” url=”http://www.nationalbanken.dk/dndk/valuta.nsf/valuta.xml”/>
</mx:Application>

4. The HTTPservice has a result event you can use to specify a function to be called when the data is succesfully returned. So you pass the event object as the parameter in the function and import the ResultEvent from the mx.rpc.events package. In our function here we drill our way inside the XML and put the data in the result object:

<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute” creationComplete=”hsRPC.send();”>
<mx:Script>
 <![CDATA[
 Â
  import mx.collections.ArrayCollection;
  import mx.rpc.events.ResultEvent;
  [Bindable]
  private var valuta:ArrayCollection;
 Â
  private function dataHandler(event:ResultEvent):void
 Â
  {
   valuta = event.result.exchangerates.dailyrates.currency;
   Â
  }
  Â
   Â
 ]]>
</mx:Script>
 <mx:HTTPService id=”hsRPC” url=”http://www.nationalbanken.dk/dndk/valuta.nsf/valuta.xml
  result=”dataHandler(event)”/>
</mx:Application>

5. Now you just use a DataGrid component and specify its dataprovider as the ArrayCollection you created, and maybe a label to reference a single value. Hope the tutorial was useful, here is the final mxml:

<?xml version=”1.0″ encoding=”utf-8″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml” layout=”absolute” creationComplete=”hsRPC.send();”>
<mx:Script>
 <![CDATA[
 Â
  import mx.collections.ArrayCollection;
  import mx.rpc.events.ResultEvent;
  [Bindable]
  private var valuta:ArrayCollection;
 Â
  private function dataHandler(event:ResultEvent):void
 Â
  {
   valuta = event.result.exchangerates.dailyrates.currency;
   Â
  }
  Â
   Â
 ]]>
</mx:Script>
 <mx:HTTPService id=”hsRPC” url=”http://www.nationalbanken.dk/dndk/valuta.nsf/valuta.xml
  result=”dataHandler(event)”/>
 <mx:DataGrid id=”dGrid” dataProvider=”{valuta}”/>
</mx:Application>

Categories

  • No categories

Tags

Archives