GhostWire Studios - Flash/Flex UI Components Development And Consulting Services
Quality User Interface Controls For Flash Application DevelopmentAspireUI Components

Nov 13 2009

[AS3] Applying ROT128 Encryption On Embedded/Module SWFs

Published by sunny under Flash,Flash AS3,Tips

This post is a supplement to “Applying ROT128 Encryption On ByteArray”.

Some time back, we posted a simple technique for hiding assets and AS3 code from prying eyes by embedding one SWF within another SWF. In this post, we revisit that topic and look at how ROT128 can be used to provide an additional layer of protection.

Continue Reading »

3 responses so far

Sep 10 2009

[AS3] Difference Between Stage Size, Screen Size And SWF Size

Published by sunny under Flash,Flash AS3,Tips

In this post, we look at three different pairs of width and height properties that are commonly misunderstood – “stage.width/stage.height“, “stage.stageWidth/stage.stageHeight” and “loaderInfo.width/loaderInfo.height“.

Continue Reading »

4 responses so far

Aug 18 2009

[AS3] Avoiding NULL Object Reference Error When Loading Module SWF

Published by sunny under Flash,Flash AS3,Tips

When building modular Flash applications, a common error that may be encountered is that related to accessing a property or method of the stage property when it is still null. If a display object is not yet added to the display list, its stage property returns null.

An ActionScript error has occurred: “Cannot access a property or method of a null object reference.”

Quite a cryptic message, especially if you test the module SWF standalone and nothing seems wrong, but the error is thrown when you load the module SWF into a host SWF.

Continue Reading »

4 responses so far

Jul 24 2009

Compiling Module SWFs Using FlashDevelop

Published by sunny under Aspire UI,Flash,Tips

Breaking a large application down into modules allows the application to be loaded in more manageable chunks. A “module” is simply a term borrowed from Flex to refer to a child SWF that is loaded into a main (host) SWF – in our context, a “module” is just like any other SWF. But, if built correctly, it should be a “stripped down” SWF – it will not contain classes that already exist in the host SWF that it is going to be loaded into. This usually means that modules cannot run standalone (which is the desired outcome in most cases, considering that the modules are intended to be loaded into the main application).

When using FlashDevelop, building a Project (pressing F8 or CTRL-ENTER) compiles a single SWF using the AS class file that has been flagged as “Always Compile”. If you are building an application that consists of a host SWF and multiple module SWFs, FlashDevelop does not automate the job for you.

Continue Reading »

2 responses so far