Jump to content

Flash Action Script3


khassl@yahoo.com

Recommended Posts

Hi

 

I need show the page2 when I click the button1 I have the error # 1061,

 

Please advise.

 

 

My function below.

 

function button1_clicked(e:MouseEvent):void{

gotoAndStop("page2");

}

 

button1.addEventListener(MouseEvent.CLICK, button1_clicked);

 

 

1061: Call to a possibly undefined method addEventListener through a reference with static type Class

Link to comment
Share on other sites

I don't know a huge amount about Flash, to be honest. According to:

 

http://www.adobe.com/devnet/actionscript/articles/event_handling_as3_02.html

 

It looks like you're doing the right thing (again though, I'm not completely sure). However, you might want to look at a couple posts in forums with people that have the same error. Perhaps the issue isn't with this specific code, but where the code is placed.

 

http://www.gotoandlearnforum.com/viewtopic.php?f=29&t=15907

http://www.newgrounds.com/bbs/topic/868123

http://www.actionscript.org/forums/showthread.php3?t=190328

 

There aren't a lot of members here that work with flash. You may get better answers by posting on the Adobe Flash forums or similar -- a forum dedicated specifically to Flash.

Link to comment
Share on other sites

  • 2 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...