The Ole #1009: Cannot access a property or method of a null object reference ...
To anyone that can help me I say thank you first I also say thank you to anyone else that attempts to help. I am sure this will be an easy one for most of you but I am completely stumped. I am a newbee to AS.
I have a movie that has navigation butttons and they all work find. On a scene in the movie I have an image that grows grows from alpha 0 to 100%. When you Mouse_Over the alpha drops to -.6 and when you Mouse_Out it goes back to 1. I have this in frame 1 and this scene takes place between frames 115 and 166. When I execute a Mouse.Click on the movieClip (contact_us_gel) I am moved to the emailScene. The bad news is when I click the movieClip I get the below. I change the movieClip to be on the stage for entire movie from frame 1 to 166 in hopes to loose this error. As you can tell that didn't work. Below is the AS code that I have written. I use this same code for my navigation buttons and I have no issues. I have officially had my butt kicked by this one.
I have tried removing the eventListner and that just really messes me up until I go to the homeScene (frame 1) and add the event listner back for he contact_us_gel.
The Trace & Error from the outPut.....
Frame on Gel MouseOut 228 <<-- Trace statement when I click the gel / This is also where the email scene stars
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at barnumRealtyGroup_fla::MainTimeline/outCUG()[barnumRealtyGroup_fla.MainTimeline::frame1:131]
The code
//-- ContactUsGel --\\
contact_us_gel.addEventListener(MouseEvent.MOUSE_OVER,rolloverCUG);
contact_us_gel.addEventListener(MouseEvent.MOUSE_OUT,outCUG);
contact_us_gel.addEventListener(MouseEvent.CLICK,playHomeSceneCUG);
function rolloverCUG(event:MouseEvent):void{
contact_us_gel.alpha -= 0.6
}
function outCUG(evnt:MouseEvent):void{
trace("Frame on Gel MouseOut "+this.currentFrame);
contact_us_gel.alpha = 1; //this is where I am dying.... This is frame1:Line131
}
function playHomeSceneCUG(event:MouseEvent):void{
trace("Frame on Gel Going to Email "+this.currentFrame);
gotoAndPlay("emailScene");
}
Thank you in advance...