Unity3D with C# for ActionScript Developers

I’ve been doing ActionScript 3.0 development for over 10 years, making games and applications for mobile devices and Mac/Win desktops. I’ve recently been expanding my skills and learning Unity3D with C#. This post lists some of my discoveries and the resources that I’ve encountered along the way. These notes may be especially interesting to other ActionScript developers as they also begin to dabble in Unity3D and look for areas of similarity and difference between these 2 great development platforms. [Read More…]

Google as your DNS Server

Recently I was unable to access Facebook while travelling in another country. I got an error message that DNS lookup failed. A friend using the same wireless router could access it. I rebooted and tried multiple browsers. My friend pinged facebook to detect their IP address and I tried entering it manually. Still no luck.

Finally, the solution was to change the DNS server to use Google’s DNS server. Who knew Google offered that service? Package Cannot Be Imported

Using Flash Builder 4.6, Flex 4.6.0, AIR 3.5. If you get errors where the package cannot be imported, it suggests you have not included the AIR files in your project. In Flash Builder, when configuring your project when you create it, you must check the extra checkbox in the area near your Flex API selection for *Include Adobe AIR libraries*, or alternatively, after setting up your project, you can edit the project > Flex Library Compiler pane, at the top in the Flex SDK version configuration area you can check the *Include Adobe AIR libraries*.

Also, you may need to include the defaults.css file in the library manually:
Properties >> Flex Library Build Path >> Assets tab >> unfurl the src folder and check the box next to defaults.css.

Open Office Writer Table Calculations

Over-The-Shoulder Quick Tip
When working with Open Office Writer documents that have calculations in table cells, save the file in native Open Office format (SXW), not DOC format, otherwise your table cell formulas will be lost! I was saving my invoice template including a table with cell calculations as a DOC file, but I found that after saving, closing and re-opening the document the formulas were gone and the cell entries were just flattened string values (number formatting as currency sign $ was also gone). Frustrating problem solved!

ASC 2.0 Font SWF Embedding (MinimalComps Use Case)

ActionScriptCompiler 2.0 (ASC 2.0) from Adobe no longer allows font embedding. Instead you must embed font SWFs.

From the release notes: “Font transcoding has been removed from [Embed] syntax. Fonts should be pre-transcoded and embedded as a SWF, which can be performed using a tool like fontswf or Flash Professional CS6.”

This change caused problems with a project that uses MinimalComps from Keith Peters ( because the package uses an embedded pixel font. Solution below. [Read More…]

Links to Adobe Native Extensions

Adobe Native Extension logoLinks to Adobe Native Extensions (ANEs) for AIR:

Adobe maintains a list here: DevNet
Post additional links in the comments and I’ll update the list.

AIR Overlay Instructions

Using different versions of AIR with Flash/Flex publishing can be a hassle and requires odd code-monkey wrenching. When I need to overlay a different version of the AIR SDK over my Flex SDK I usually do a quick Google search to find the instructions. The Adobe Knowledge Base article dedicated to this usually pops right up, but my most recent search didn’t turn up any results. I discovered that the post has been renamed (seemingly to address the most common error that would lead someone to want to overlay a new AIR SDK).

Here’s the link to Adobe’s AIR overlay instructions: LINK

Here’s a quick reference to the Mac Terminal command that uncompresses the SDK package and overwrites all files: sudo tar jxvf AIR15_mac_sdk_XXXXXX.tbz2

Update: The article is now more helpfully titled again: “Overlay the AIR SDK with Flex SDK”

Device GPU Introspection Tools

While we wait for Adobe’s Monocle to give us a better ability to analyze the operation of our CPUs/GPUs, here’s a few tools I heard about that will give you low-level information about what’s going on under the hood. Each of these tools will give you a visual display of what is drawn and uploaded each frame.


  • Pix LINK (Windows)
  • gDEBugger LINK, Win, Linux, Mac OS 10.6 only)
  • Adreno Profiler LINK, Android with Qualcomm GPUs)

Mixing Stage3D with Display List — Performance Test

A demo was recently released by Adobe (Thibault Imbert, Blog Post). It features an optimized use of Stage3D. By grouping assets that use the same texture, the number of drawTriangles calls is minimized. Adobe wrapped up this principle in a little framework (called GPUSprite) based on a metaphor of a stage with layers of content containing sprites.

The framework is clever and is a great starting point for understanding Stage3D optimization. I was surprised to see that a framerate measurement layer was placed over the top of the Stage3D content in a traditional Display List layer. It was my understanding that any Display List content over Stage3D would have a significant performance impact. To test this, I modified the sample to display the framerate in a new Stage3D layer and ditched the Display List (actually, you can toggle between the 2 views). [Read More…]

Populating Vectors When They’re Created

Ever wonder how to populate a Vector when you create it?

Here’s a way: Instead of using the *new* operator to create the Vector use global conversion to convert an Array into a Vector (note that the *new* operator is not used in the sample): [Read More…]