Need ActionScript help for Scenes and buttons

  • cassio24
  • Born
  • Born
  • cassio24
  • Posts: 1

Post 3+ Months Ago

I am working on a school project. I HAVE to use scenes and buttons to get to each different scene.

In my swf I can click to get to contacts. But once it gets to contacts I get the following error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at RoachBGone_fla::MainTimeline/frame307()

And at that point none of the other buttons work. Here is my script for scene 1:

stop();
btnHome.addEventListener(MouseEvent.CL... goHome);
btnContact.addEventListener(MouseEvent... goContact);
btnServices.addEventListener(MouseEven... goServices);
function goHome(event:MouseEvent):void {
gotoAndStop(203, "Scene 1");
}
function goContact(event:MouseEvent):void {
gotoAndPlay(1, "Scene 2");
}
function goServices(event:MouseEvent):void {
gotoAndStop(1, "Scene 3");
}



for scene 2 and 3 I have the following script:

stop();
btnHome.addEventListener(MouseEvent.CL... goHome);
btnContact.addEventListener(MouseEvent... goContact);
btnServices.addEventListener(MouseEven... goServices);


anyone know whats wrong?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 33 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.