Something i have really been neglecting in the past is Error checking. I’ve recently bumped into a problem where I had to load in a SWF where could reside in 2 places, normally I would just go manually change the SWF location everytime I needed to, then i thought to myself, there had to be a better way.
With error checking I was able to use a catch / try statement to catch flash player throw when the file wasnt found and check for the files other location, worked perfectly.
[code]
try
{
mLoader.load(new URLRequest(firstlocaton.swf))
} catch (error: IOErrorEvent)
{
mLoader.load(new URLRequest("secondlocation.swf"))
}
[/code]