-
1099 Error that makes no sense
I've got two buttons on my stage. One with the instance name 'logo' and once with the instance name 'watch'. The AS3 code is very simple and accurate. Or so I thought:
--
logo.addEventListener(MouseEvent.MOUSE_DOWN, homelink);
function homelink(evt:MouseEvent):void {
gotoAndStop("home");
}
watch.addEventListener(MouseEvent.MOUSE_DOWN, watchlink);
function watchlink(evt:MouseEvent):void {
gotoAndStop("watch");
}
--
Really simple, right? Not so fast. I test my movie and get the following error:
--
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at main_fla::MainTimeline/frame2()
at flash.display::MovieClip/gotoAndStop()
at main_fla::MainTimeline/PL_LOADING()
--
Where did that come from? That's where I'm confused. What is PL_LOADING()? The keyframe is setup properly so none of this makes any sense. At least not to me. So where is this 1009 error coming from and how can I correct it?
Adam Bell
dzign@datatv.com
--
Over 90% of all websites
suck......
Join the minority.
-
Did you find a solution
Hi Adam- Did you ever find a solution to this issue. I am suffering from the exact same thing/exact error message.
Thanks
-
 Originally Posted by Lumablue
Hi Adam- Did you ever find a solution to this issue. I am suffering from the exact same thing/exact error message.
Thanks
If I'm not mistaken, the problem in the original post has to do with the lack of an object reference in the event handler. For instance:
Code:
watch.addEventListener(MouseEvent.MOUSE_DOWN, watchlink);
function watchlink(evt:MouseEvent):void {
whichMovieClip.gotoAndStop("watch");
}
instead of
Code:
watch.addEventListener(MouseEvent.MOUSE_DOWN, watchlink);
function watchlink(evt:MouseEvent):void {
gotoAndStop("watch");
}
Last edited by TheDevilRidesIn; 07-24-2010 at 02:32 PM.
"If, he thought to himself, such a machine is a virtual impossibility, then it must logically be a finite improbability."
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|