Skip to main content
Participant
July 20, 2009
Question

Need Help with movie clip menu

  • July 20, 2009
  • 2 replies
  • 465 views

I am trying to do a simple flash file.  I have 4 buttons in a movie clip.  I have an actions frame with the following code.

///////////////////// Code

function btn_WhoWeAre(event:MouseEvent):void {
MovieClip(parent).gotoAndPlay(1);
}
function btn_OurPortfolio(event:MouseEvent):void {
MovieClip(parent).gotoAndPlay(2);
}
function btn_OurServices(event:MouseEvent):void {
MovieClip(parent).gotoAndPlay(3);
}
function btn_ContactUs(event:MouseEvent):void {
MovieClip(parent).gotoAndPlay(4);
}

///////////////////

As I am new to flash I can't figure out what I am doing wrong.  I get an error about incompatible override and dupplicate function.  Can anyone please help me.

This topic has been closed for replies.

2 replies

Ned Murphy
Legend
July 20, 2009

That code alone is not going to produce the errors you are getting.  Do you repeat this same code anywhere?  That would account for the duplicate function error.  The override error sometimes means you are redefining some command--what other code do you have in the file?  If you have those functions, what is the code you are using for the event listeners?

July 20, 2009

i think you need to specify the event target and not the movie clip as the movie clip is not the target but the button inside it.

try:

event.currentTarget.gotoAndPlay(1);

sharihaAuthor
Participant
July 20, 2009

Thank you for your post.  Do you mean do the code like this

//////////////////////

function btn_WhoWeAre(event:MouseEvent):void {
event.currentTarget.gotoAndPlay(1);
}
function btn_OurPortfolio(event:MouseEvent):void {
event.currentTarget.gotoAndPlay(2);
}
function btn_OurServices(event:MouseEvent):void {
event.currentTarget.gotoAndPlay(3);
}
function btn_ContactUs(event:MouseEvent):void {
event.currentTarget.gotoAndPlay(4);
}


I could not get this to work.  I got the same errors incompatible override and Duplicate function deffinition.  Thanks for helping I really need it.