Jump to content
Sign in to follow this  
Peter

AS3 - erro, Cannot access a property or method of a null object reference.

Recommended Posts

Peter

Estou a usar o flash professional cs5, e criei 3 botões como está em baixo, no entanto da me um erro no output quando chega ao frame:

TypeError: Error #1009: Cannot access a property or method of a null object reference.

at Untitled_fla::MainTimeline/frame66()

num frame anterior criei um botão simples exactamente da mesma forma, e nao deu erro. nao sei se é de ter varios no mesmo frame, pode ter a ver. do que já pesquisei fiquei com a sensação que tem a ver com o stage, algum objecto que nao foi "acoplado" ao stage.

stop();



sobre.addEventListener(MouseEvent.CLICK, buttonClick2);
function buttonClick2(event:MouseEvent):void{
gotoAndStop(67);
};Object(this).sobre

extra.addEventListener(MouseEvent.CLICK, buttonClick3);
function buttonClick3(event:MouseEvent):void{
gotoAndStop(81);
};Object(this).extra

como.addEventListener(MouseEvent.CLICK, buttonClick4);
function buttonClick4(event:MouseEvent):void{
gotoAndStop(68);
};Object(this).como

aparecem os botoes mas ao carregar nao faz nada

têm aqui o ficheiro para download.

http://www.2shared.com/file/cldZjBkY/Untitled-1.html

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.