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

Apr 22 2010

uiImage: Loading Resources From Foreign Domains

Published by under Aspire UI,Flash

The uiImage component is used to display an image (JPG/PNG/GIF). The path to the image is specified by the source property. By default, the uiImage object will attempt to load resources from the “assets/images/” folder (path is relative to the application SWF). To load from a different path, for example the folder “resources/images/”, prefix the source with “url:”, example “url:resources/images/garden.jpg”.

In order to load images from a different domain, the Flash Player will need to read a crossdomain.xml file from the foreign domain (and this file must grant permission to your domain to access the required resources). Typically, you would expect to need to specify a checkPolicyFile property somewhere. In the case of the uiImage component, there is no checkPolicyFile property to set because this would be unnecessary.

Continue Reading »

No responses yet

Sep 10 2009

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

Published by 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

Sep 03 2009

[AS3] Domain Locking SWFs

Published by under Flash,Flash AS3,Tips

By domain locking (or site locking), we are restricting the SWF to be run only from a certain domain, ie the SWF should execute normally only if it has been viewed from a certain domain. If it is loaded from other domains, the SWF should execute in an alternative manner – perhaps not run at all, or run with limited features (as the developer deems appropriate). This is usually done to prevent unauthorized re-distributions of SWF files.

Continue Reading »

11 responses so far

Aug 21 2009

[AS3] Hiding Assets And Code By Embedding SWF Within Another SWF

Published by under Flash,Flash AS3,Tips

The technique discussed below is fairly easy to implement and will cost nothing other than a few minutes of your time. You can use this method in conjunction with code obfuscation, encryption or whatever other protection methods – this just adds another layer of protection. While this isn’t going to be a 100% foolproof protection, it is nevertheless better than no protection at all, and should help to deter most if not all casual decompiling.

Continue Reading »

7 responses so far

Aug 18 2009

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

Published by 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 »

10 responses so far