- Has been a member for 3-4 years
- Exclusive Author
- Sold between 100 and 1 000 dollars
- Vietnam
- Referred between 10 and 49 users
Lovely, nice for background!
Lovely, nice for background!
Cool! ..Good Valentine effect 
Niiiiiiiiiiiice rain of hearts 
Hello,
Nice emitter engine!
I have a problem though…
I am trying to load it as an external file, but I get this error
TypeError: Error #1009: Cannot access a property or method of a null object reference
var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
loader.load(new URLRequest("Hearts_Popper.swf"));
OK I ’ve fixed it.
The problem was caused by the stage not being initialized yet. I’ve added two private variables
private var sW:Number;
private var sH:Number;
and then in Main()
addEventListener(Event.ADDED_TO_STAGE, init);
and in the init()
private function init(e:Event):void {
sW = stage.stageWidth;
sH = stage.stageHeight;
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
}
Cheers.
COPYRIGHT © 2012 ENVATO| TERMS OF USAGE| SUPPORT/HELP| ICONS BY TANGO + WEFUNCTION + FAMFAMFAM
Adobe®, Flash®, Flex®, Fireworks®, Photoshop®, Illustrator®, InDesign® and After Effects® are registered trademarks of Adobe Systems Incorporated.
23 Purchases
6 Comments