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: Labeling Loops

Did you know you can label loops in ActionScript 3? Yes, you can! I got inspired by latest tweets referencing source code in image. Lets do some small experiments… Label all of them:

var a:uint, b:uint = 0;
loopA:for(a = 0; a < 10; a++)
    loopB:while(b++ < 100)
        loopC:for each(var c:uint in [0,1,2,3])
            break loopB;

trace(a, b, c); // traces "10 10 0"

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:

<allowBrowserInvocation>true</allowBrowserInvocation>

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 »

Quick Tip: How To Print From Google Wave

Google Wave is an online software application formerly developed by Google. Soon after you get used to this new collaboration tool, you may leave behind old spammy e-mails used for communication. While creating waves is easy and intuitive, there is no button to print the wave :-( . Though, there is a chance. Print tip originally posted in comments on googlewaveinfo.com. In order to make this work, you have to run chrome with custom user-agent (iPhone 3).

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 »

Quick Tip: Standalone Player Default Menu Disappeared

Did you know that setting stage.showDefaultContextMenu = false, makes disappear not only right-click context-menu (ContextMenu), but also standalone player default window menu (File, View, Options, Help)? I came on this one when tried to create projectors (.exe) files from .swf-s files running in standalone player using “File / Create projector…” feature. All tested/opened .swf files were showing player window menu ok, just one .swf made player window menu disappear, after a while I discovered the showDefaultContextMenu was the cause.

stage.showDefaultContextMenu = false

ActionScript Bitwise Calculator

In computer programming, a bitwise operation operates on one or more bit patterns or binary numerals at the level of their individual bits. Bitwise operations are extremely fast and compact. Anytime we can speak to a computer in its native binary tongue, we save room and gain speed (moock.org). Now, lets see how it works. I have created a small flex application, try playing with numbers (input decimals) to understand what is actually happening with bits using different operators (10 and 3 are good inputs).

Read the rest of this entry »

Quick Tip: Multi-Dimensional Vectors

Have you ever thought of creating or using multi-dimensional Vector in ActionScript? Yes, it is possible and the definition syntax comes pretty logical to me now ;-) .

var list:Vector.<Vector.<int>> = new Vector.<Vector.<int>>();

…or shorter declaration:

var list:Vector.<Vector.<int>> = new <Vector.<int>>[];

now your vectors have two dimensions, I mean:

list[0][0]

Pixel Bender Inputs – Vector or ByteArray

Pixel Bender for Flash Player lets you play some more advanced games. Based on your needs you can force your kernels to “eat” not only BitmapData, but also ByteArray-s or Vector-s. With this knowledge, you can simply use Pixel Bender kernels for some fast math or processing like 3D engines (3D to 2D projection) etc. Lets have a look at some simple demos, how to push vector and raw bytes directly into shader via ShaderJob:

Read the rest of this entry »

Get Adobe Flash playerPlugin by wpburn.com wordpress themes