Error #2109 - help

Hi, I'm trying to drag a movieclip on the stage, with nine of the existing instances of button, cause this clip from movie to jump and run to various labels (which are in the clip of the film itself. I'm not sure what I'm doing wrong, but I get the #2109 error that says (similar error for each button):

ArgumentError: Error #2109: frame label this. FlashLogo.logo1 not found in scene 1 of the scene.
at flash.display::MovieClip/gotoAndPlay()
at flash_fla::MainTimeline/logo1Over()

No idea what I am doing wrong? Here is my script:

function logo1Over(event:MouseEvent):void {}
gotoAndPlay ("this. FlashLogo.logo1");
}
function logo2Over(event:MouseEvent):void {}
gotoAndPlay ("this. FlashLogo.logo2");
}
function logo3Over(event:MouseEvent):void {}
gotoAndPlay ("this. FlashLogo.logo3");
}
function logo4Over(event:MouseEvent):void {}
gotoAndPlay ("this. FlashLogo.logo4");
}
function logo5Over(event:MouseEvent):void {}
gotoAndPlay ("this. FlashLogo.logo5");
}
function logo6Over(event:MouseEvent):void {}
gotoAndPlay ("this. FlashLogo.logo6");
}
function logo7Over(event:MouseEvent):void {}
gotoAndPlay ("this. FlashLogo.logo7");
}
function logo8Over(event:MouseEvent):void {}
gotoAndPlay ("this. FlashLogo.logo8");
}
function logo9Over(event:MouseEvent):void {}
gotoAndPlay ("this. FlashLogo.logo9");
}

For each logo button event listeners
pbutton.addEventListener (MouseEvent.ROLL_OVER, logo1Over);
wfbutton.addEventListener (MouseEvent.ROLL_OVER, logo2Over);
fbutton.addEventListener (MouseEvent.ROLL_OVER, logo3Over);
bafbutton.addEventListener (MouseEvent.ROLL_OVER, logo4Over);
mbutton.addEventListener (MouseEvent.ROLL_OVER, logo5Over);
tbutton.addEventListener (MouseEvent.ROLL_OVER, logo6Over);
wbutton.addEventListener (MouseEvent.ROLL_OVER, logo7Over);
gbutton.addEventListener (MouseEvent.ROLL_OVER, logo8Over);
fbutton.addEventListener (MouseEvent.ROLL_OVER, logo9Over);

FlashLogo is the name of the instance of movieclip that I placed on the stage with the other buttons.

Thank you, Dan Pearce

You want to do a set of headphones for events ROLL_OUT, similar to what you did for the ROLL_OVER events.  But if they all involve the same movieclip, you would only need a function handler for each of them because the result is the same for each one, tell the movie to go to its first image.

As a note, if the buttons are all controlling the movieclip, then you could probably reduce your effort coding substantially by renaming the buttons and using their names in the code.  If you named them as image labels you, then you might have a work of Service Manager event for all who works as...

function btnClicked(evt:MouseEvent):void {}

This. FlashLogo.gotoAndPlay (evt.currentTarget.name);

}

For each logo button event listeners
logo1.addEventListener (MouseEvent.ROLL_OVER, btnClicked);
logo2.addEventListener (MouseEvent.ROLL_OVER, btnClicked);
logo3.addEventListener (MouseEvent.ROLL_OVER, btnClicked);

etc...

Tags: Adobe Animate

Similar Questions

Maybe you are looking for