Browsing all 2 posts in Problem Solutions.

0

Avoiding Loose Typing Dangers

Sometimes I like terse code. if( state ){} is clear. However this syntax can cause a lot of grief in loose typed languages, and while you can avoid some cases by typing vars, you can still get yourself into trouble (as a note: I find strict mode a pain in ActionScript). if( GetState() ){} may [...]

0

Error #2035: URL Not Found – a fix to the problem

Ok, so the Adobe docs say:
var loader:URLLoader = new URLLoader();
loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
But thanks to the FlashKit forums:
var pictLdr:Loader = new Loader();
pictLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoaded);
I realize these are two different classes, but the docs on this type of thing are just so poor. Nevermind the horror that you can’t catch AN IO ERROR in a try catch block.
Hopefully this [...]