Skip to main content
Participating Frequently
July 14, 2007
Question

"TypeError"

  • July 14, 2007
  • 10 replies
  • 778 views
This keeps popping up in the output:
quote:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at welcomemessage_fla::MainTimeline/welcomemessage_fla::frame1()

as well it comes up when I put the swf file on the internet. How do I fix this? What is it?
This topic has been closed for replies.

10 replies

Participating Frequently
July 30, 2007
Sorry, I forgot about this and my trial ha already expired now so I can't try that code
Participating Frequently
July 17, 2007
I dunno, lol. I just didn't think of changing it I guess
Inspiring
July 18, 2007
Try cleaning up the code and see what happens first. Tell me if this changes anything for you...

Inspiring
July 17, 2007
that's fine. my curiosity is why that second function is inside the other function....
Participating Frequently
July 17, 2007
I figured since I wanted it to start the movie at a different point that I should have chosen a different function, so I did
Inspiring
July 17, 2007
nvm amanda. running on short sleep. why do you have your startClip2 function being declared inside of startClip? It's ok to have the event listener inside the startClip function but the startClip2 function should be defined alone and outside the startClip function.
Inspiring
July 17, 2007
is new_member an existing movieclip on the stage? If not, new_member isn't being declared using the new operator and so it's going to be null whenever you call it.
Participating Frequently
July 17, 2007
import flash.events.EventDispatcher;
import flash.display.MovieClip;
new_member.stop();
invyes_btn.addEventListener(MouseEvent.MOUSE_DOWN,startClip);
function startClip(e:MouseEvent):void {
new_member.play();
new_member.gotoAndStop(12);
invyes_btn.addEventListener(MouseEvent.MOUSE_DOWN,startClip2);
function startClip2(e:MouseEvent) :void {
new_member.gotoAndPlay(12);
}
}
kglad
Community Expert
Community Expert
July 15, 2007
what code are you using?
Participating Frequently
July 14, 2007
ok I got it figured out, thanks. I was also wondering how I could stop a movie. Like I have a movie that proceeds to the next frame when you click it, then it does it again, and then it plays until the end. The thing is is that after it gets to the end, it starts all over again except doesn't respond to the mouse clicks. How can I stop the movie once it's done? I tried using ____.stop(); and that didn't work, as well I tried ____.gotoAndStop(__); and that didn't work either
Participating Frequently
July 17, 2007
quote:

Originally posted by: Amanda Adams
ok I got it figured out, thanks. I was also wondering how I could stop a movie. Like I have a movie that proceeds to the next frame when you click it, then it does it again, and then it plays until the end. The thing is is that after it gets to the end, it starts all over again except doesn't respond to the mouse clicks. How can I stop the movie once it's done? I tried using ____.stop(); and that didn't work, as well I tried ____.gotoAndStop(__); and that didn't work either


Inspiring
July 14, 2007
you are referencing an object in your code that has no value. it should be telling what object it is.....