Tag Archives: Adobe Flex

[MAX09 – 01] AIR 2.0, New features

In Adobe MAX I could attend many many conferences and I’d like to share the info.
In this first post I will tell you about the new features that are coming with AIR 2.0

  • Start native processes and applications: In AIR 2.0 you will be able to start a native application installed in the OS from you AIR application. This is very very useful.
  • Native Installers: You’ll also have Native Installers for the OS. You will be able to generate .exe, .dmg, .rpm or .deb when you package the file. Obviously the .air file is also included in the list.
  • New classes. FilePromise, URLFilePromise: You will use these classes when you want to download a file from the server but you don’t have the file reference yet. That’s why you will be telling AIR that you have a promise of a file.
  • Socket servers: This is an extraordinary feature. You will be able to configure and start a socket server from the AIR application. We know that FlashPlayer can connect to socket servers but now you will be able to start one from the AIR app and also secure socket servers with TLS
  • IPv6: Now you’ll have compatibility with IPv6.
  • NetworkInfo class: With this new class we can check detail information about the network in the hosting device. Information like the interfaces that are available in the host.
  • UDP support: We can now connect by UDP.
  • Audio encoding: This is an extraordinary functionality because with this feature we will be able to record the sound captured by the microphone without any server like FMS or any other. Basically we can encode the sound raw info as a sound.
  • Global Error Handling: Have you ever tried to handle the multiple errors that you forgot to catch ? Now we can do it. The global error handling will work as a general try and catch block for any exception that could happen during the app execution.
  • JavaScript Debugging and profiling: The ability to debug and profile javascript code in the AIR app will be integrated into the AIR 2.0 runtime. Profiling will be only available from Aptana.
  • New webkit features: Now the engine has a module that supports CSS3 :-D, custom styles can be applied to scrollbars, we can break up text across columns, and more.
  • Profiles for AIR applications: Defined in the application descriptor, we now have a set of profiles that enable/disable some functionality in the Application. We have a “desktop” profile, a “NativeDesktop” profile (for native installers), “mobile” profile (for mobile AIR applications) and “extenden mobile” profile.
  • AIR Mobile applications: Yes, we can now create AIR applications for mobile devices, including the iPhone and the applications for iPhone will be package as .ipa, a native iPhone Application.
  • Filter an ArrayCollection and don't lose the original data

    Yesterday, one of my students asked me about recovering the original data of an ArrayCollection if this ArrayCollection has a filter applied.In Adobe Flex, the ArrayCollection class has a property called filterFunction. We can assign a function reference directly to this property and then apply a refresh() to the ArrayCollection instance.This is an example.

    // Defining the ArrayCollection instanceprivate var ac:ArrayCollection = new ArrayCollection([{label:"Adobe Flex", data:"Fx"},{label:"Adobe Flash", data:"Fl"},{label:"Adobe After Effects", data:"Ae"},{label:"Adobe Flash Player", data:"fp"}]);//Defining the filter functionprivate function flashFilter(obj:Object):Boolean{return obj.label.toLowerCase().indexOf("flash") != -1;}//Applying the filterac.filterFunction = flashFilter;ac.refresh();

    Once the filter is applied, the ArrayCollection hides all the objects that don’t pass the validation in the function and shows the objects that do.
    An ArrayCollection stores internally an instance of the Array class. You can see that in the previous example where I place an array inside the constructor of the ArrayCollection.
    An ArrayCollection acts as a “wrapper” for the array instance enabling functionality that belongs to collections and lists. This functionality can be, filtering, sorting, add/remove/modify data and more.
    After you filter an ArrayCollection instance the “wrapper” only shows the unhidden objects and it seems like it only has 2 elements (in my example), I mean if you test the “length” property after the filter you will see that it shows the value 2. But we know the truth, the ArrayCollection actually has 4 elements. If you want to get back this 4 elements without clearing the filter you have to deep into the ArrayCollection and find the source. This source, as I said previously, is an Array.
    You will find the source using, in fact, the “source” property of the ArrayCollection. The array that will give you this property is the complete set of data that the ArrayCollection is storing without any filter. Just don’t forget that “source” is giving you an instance of an Array and not an instance of an ArrayCollection.

    //continuing the previous example...//Applying the filterac.filterFunction = flashFilter;ac.refresh();//Test the length property of the ArrayCollectiontrace(ac.length); // 2//Test the source property of the ArrayCollectiontrace(ac.source) // [object Object],[object Object],[object Object],[object Object]//Test the length property of the source propertytrace(ac.source.length) // 4

    Software Guru'08 Conference and Expo day 3

    Today was the 3rd day in Software Guru 08 Conference and Expo. This time there were a lot of conferences related to project management, strategies for building software , technology, process improvements and more.
    I attended to some sessions about, Share Point from Microsoft, Agile Modeling with UML, project management and a Rich Internet Applications conference where there were people from Adobe introducing Adobe Flex, Microsoft presenting Microsoft Silverlight, IBM talking about the web standards and Sun talking about JavaFX.
    That was really good, many people were in the room, in fact, I embed some videos about that conference where you can see the quality and samples that were shown.
    There was also an expo where some companies show their products, solutions and their offer to people that could be looking for business and providers.
    Tomorrow it’ll be the last day of conferences and I hope I could have more pics from there. Here you have some media about the event.