Quick Tip: What is MY_UNIQUE_32_HEX_NUM?

When working with Adobe Merlose licensing code I hit MY_UNIQUE_32_HEX_NUM variable containing some generated string (XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX). As there was nothing within my emails from melrose that would correspond to that string, investigation got started. Soon after I found Merlose FAQ saying that MY_UNIQUE_32_HEX_NUM is a GUID that you choose and is immutable for the lifetime of the application, followed by Q&A combo:

Q: Do I need to randomly generate the application UID that is passed to the* checkLicense() *call or will Adobe give one to me?
A: You need to generate the UID. We recommend you use a GUID generator tool like: http://www.guidgenerator.com/online-guid-generator.aspx. Generate your own unique number and plug it into your code…

Mistery solved!

Authorizing Facebook Applications in AIR

I was asked to make AIR compatibile version of FacebookOAuthGraph class. It was a nice little challenge for me, where I learn some new things about AIR. E.g. how easy it is to define the JavaScript callback directly from ActionScipt (HTMLLoader.window.methodName)… There are more ways to make authorization process work for you, I have chosen the one with popup window. In order to make FacebookOAuthGraph work for AIR, the short extending is required, instead of creating popup window from JavaScript, popup is created by HTMLLoader.createRootWindow (no ExternalInterface required)…

Read the rest of this entry »

Publish Your AIR Applications To Facebook

Hi folks! Today, while mounting some of my projects into AIR, I realized that it would be great if I could pusblish AIR badges over Facebook. You know what? That is possible! I have created a simple flex application + facebook application that, based on parameters, generates AIR badge for an app. Now its time to share the stuff with you, feel free to publish your AIR badges, and let me know how do you like it.

Read the rest of this entry »

Quick Tip: Checking The Version Of An Installed AIR Application

Here is a quick tip how to check the version of your installed AIR application from an application running in flash player. In order to make your AIR application (system) be able to respond to the requests for installed version correctly you need to define allowBrowserInvocation within your AIR descriptor file (app.xml). If you don’t do this, you won’t be able to query version information on your application:


Now your AIR application will respond correctly with its installed version. With this setting on, the installed AIR application can be launched via the browser invocation feature (by the user clicking a link in a page in a web browser). Be sure to consider security implications.

Now, to get version info from any application running in flash player (or AIR) you simply call getApplicationVersion() method on air.swf file located on adobe domain.

Read the rest of this entry »

The Ultimate Guide To LocalConnection – SWF to SWF to AIR to AIR to SWF

Even if it stands in documentstion (some crucial things mentioned in one line somewhere), it was really tricky thing to figure out how to make LocalConnection-s work between different application runtimes (flash player / air). It got even more tangled with empty flash player error saying “Error #2044: Unhandled StatusEvent:. level=error, code=”. Basically, there is a generic method/form, with underscore prefix for connection name, that you can successfully use in all cases, but if your application requires higher security you should define your connections more exactly.

Based on your applications origin (AIR / flash player) you may define a few types of communication nature:

  • SWF to SWF on a same domain
  • SWF to SWF on different domains
  • AIR to SWF
  • SWF to AIR
  • AIR to AIR

Read the rest of this entry »