Tuesday, July 24, 2007

Embedded Asset Paths in ActionScript 3

source:http://www.brooksandrus.com/blog/2007/07/23/embedded-asset-paths-in-actionscript-3/

After banging my head against a brick wall for a bit, I finally realized that when embedding assets in ActionScript3 files the path to the embedded asset is relative to the location of the .as file in which the embed statement is placed and not relative to my MXML or AS application entry point. If you look at the image below you’ll note that the embed statement has to traverse up the package structure (3 levels) before pointing to the required graphical asset.

No comments: