Hey all,
I'm getting this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Website/frame1()[Website::frame1:19]
But the thing is, if I change the line numbers around in the website document class it still says that it's line number 19?
What's the deal with that? I'm a bit confused here!
Here is line 19
Here is the entire code as well:Code:import flash.display.*;
Code:package { import flash.display.*; import FluidLayout.*; import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; import gs.*; import gs.easing.*; import fl.motion.easing.*; import com.greensock.*; import flash.text.AntiAliasType; import flash.text.TextField; import flash.text.TextFieldAutoSize; //import flash.text.TextFormat; //import greensock.*; import flash.events.MouseEvent; import flash.display.*; import flash.events.*; import flash.net.URLRequest; public class Website extends MovieClip { public function Website() {this.addEventListener("addedToStage", initVar); } /* Set the Scale Mode of the Stage */ private function initVar(e:Event){ ******** this.removeEventListener("addedToStage", initVar); //do your variable initilization, function calls, etc. stage.scaleMode=StageScaleMode.NO_SCALE; stage.align=StageAlign.TOP_LEFT; } private var currentlyShowing:MovieClip=null; public function showModalContent(clip:MovieClip):void { if (currentlyShowing!=null) { removeChild(currentlyShowing); } currentlyShowing=clip; addChild(currentlyShowing); } public function removeModalContent():void { if (currentlyShowing!=null) { removeChild(currentlyShowing); currentlyShowing=null; } } } }




Reply With Quote