NOTE: From Josh’s comment below you can do this in the Embed metadata. See the end of the post for updated code.
With the latest drops of the Flex SDK, 4 and higher, the compiler mxmlc has changed. One of the changes is that it defaults the Spark components to use Text Layout Framework (TLF) for Text fields. TLF is a Flash Player 10.0 plus feature and is built up on the flash.text.engine classes. The mxmlc compiler has allowed you to embed classes through CSS or actionscript with the use of [Embed] metadata.
With the latest mxmlc changes when you use Embed metadata for embeding fonts it embed by default the font as “embeddedCFF” type. This type of embedding of the font is required for the new TLF framework, thus making this type of embed fonts unusable with the plan old TextField and TextFormat. But there is a compiler option to change the way mxmlc embeds the font as a compiler argument. The compiler argument is:
-managers=flash.fonts.AFEFontManager
View the whole post »
In my previous post I talked about how to use Flash Builder 4 to debug an AIR application running on an Android device. In this post I will show a poor man’s way of getting trace statements. You have to build the application with debug mode and apk-debug target packaging. Then before you run the application on the your device, connected the device to your desktop with USB debugging turned on. With that all setup run this command:
View the whole post »
As the title says I am going to explain how to debug AIR applications in Flash Builder 4 that are running on an Android device.
Note: This is using AIR for Android prerelease off labs.adobe.com and the tooling and procedure to do on device debugging of AIR for Android with Flash Builder 4 will change in the future.
Source code for this post as a Flash Builder 4 project called DebugDemo.fxp.
There is a couple of steps to make this happen but the idea is broken down here:
- Connect Android device to same network as desktop with Flash Builder, and lookup the desktop ip address.
- Compile application for debugging and android permissions of INTERNET (see note below), both mxmlc and adt.
- Put the debug version of the application on the Android device.
- Configure the project in Flash Builder to launch debugger with out launching the Application.
- Launch newly configured project.
- Launch AIR application on the Android device.
- (depends if you use correct value in -connect with adt) Enter IP of Flash Builder machine and click button.
View the whole post »
If you want to start developing against the new runtimes that where released recently in Flash Builder 4 you’ll want to go grab Flex 4.1. Once you have pulled down the Flex 4.1 SDK and unzipped it you can point your Flash Builder projects towards the new location. To see the new API’s show up in code hinting you’ll need to change the target Flash Player version in the project’s compiler properties section to point to 10.1.0. See the picture below:

If you don’t point the project settings to 10.1.0 you will not see the new Flash Player 10.1 API’s, like MultiTouch, Geolocation, and Accelerometer to name a few. This is needed for Flex browser projects but for AIR (or Desktop projects) it will pick up AIR 2.0 by default and pull in the newer API’s. You’ll see a Flash Builder 4 update at some point that updates all the tools with the latest runtimes, for the short term this will get you started in the right direction.
It has been quite some time since I have updated anything on the QTIndexSwapper AIR application. I figured the release of AIR 2.0 and Flex 4 would be a good reason to give it a face lift. I added the ability to point to a specific folder to process a bunch of files at once. Future updates would be to let the user set a watch folder and output folder then it could just swap ATOM’s on any h264 file that shows up in the watch folder.
View the whole post »
During presentations I have been giving the last month or so I have been showing some AIR 2.0 demos. One demo I show uses a touch enabled device running a mobile AIR 2.0 application to send the MultiTouch and Accelerometer data points to a Desktop application. I use mDNS (Bounjour and Zeroconf) to register the AIR 2.0 desktop application as a service and then the mobile AIR 2.0 application can find the service on the network without the user having to input the ip/port of the service. Then I just send over the MultiTouch and Accelerometer event data to the Desktop application to do cool things with.
This is demo code and not meant for production but you should be able to learn a lot from the code. Also this assumes you have access and can compile out AIR for devices but the demo would work on two desktop/laptops as well.
Here is the source in the form of a Flash Builder project.
This is the third part of a series of posts detailing the migration of a Flex 3 AIR 2.0 application to Flex 4. In this post we’ll start converting the custom components that make up the actually Microphone example code. This code comes across more of the same migration issues as well as some new ones. There will be migrating of css styles to skins which in turn then get reused across components. Also I noticed a difference in mx:Label and s:Label causes some tweaking on placement/layout on the converted components.
View the whole post »
This is the second part of a series of posts detailing the migration of a Flex 3 AIR 2.0 application to Flex 4. In this post we’ll start converting old MX components to the new Spark components architecture.
View the whole post »
For AIR 2.0 release on labs.adobe.com I created a Microphone Example application showcasing the new feature that allows access to raw microphone data in Flash Player 10.1 and AIR 2.0. This application is a custom chrome AIR application that uses a lot of CSS and embedding of assets, both fonts and images. I figured it would be a good use case for migrating from Flex 3 mx components to Flex 4’s Spark components. As there is a bit to cover in detail I’ll share the step by step changes needed for the migration over a series of posts.
You can still build applications in Flash Builder 4 with Flex 3 sdk, or even Flex 4 sdk with mx compatibility mode on. The purpose of this exercise is to actually convert/migrate the application to the Spark architecture.
View the whole post »
Flash Builder 4 does have the Ant executable by default, but it doesn’t have the Ant UI (org.eclipse.ant.ui). If you search the web for how to get Ant enabled in Flash Builder 4 you’ll find steps for installing the Eclipse JDT plug-in. The steps also work fine for Flash Builder 4 Beta 2/1 and Flex Builder 3. The quirk is the release build of Flash Builder 4 standalone is based on Eclipse 3.5.1. In Eclipse 3.5+ the “Find and Install” plug-in process seems to have changed quite a bit and I couldn’t find the basic Eclipse update urls.
There is not default Eclipse 3.5.1 update tree to go and find the Eclipse JDT plug-in. Even when I added the “http://download.eclipse.org/eclipse/updates/3.5″ site to the available update sites I couldn’t find how to install the JDT plug-in I was looking for. So I went looking for it manually and here is where I found it:
http://download.eclipse.org/eclipse/downloads/drops/R-3.5.1-200909170800/index.php
Go down to the “JDT Runtime Binary” section and download the appropriate file for your OS. Once downloaded go ahead an unzip the file. There should be a folder called eclipse with three folders in it, binary, features, and plugins. Its the features and plugins folder that we are looking for. First make sure you shutdown Flash Builder 4.
Then copy the files in features/* into your “Adobe Flash Builder 4/features” folder. Do the same for plugins/* -> “Adobe Flash Builder 4/plugins”. Restart Flash Builder 4 and now you should have the Ant UI available.
To verify it worked go to Run -> External Tools -> External Tools Configuration, and you should see “Ant Build” on the left as a external tool.
If someone finds the 3.5.1 update url that can be used within Flash Builder 4 standalone and the normal eclipse update process let me know.