00:00
00:00
Newgrounds Background Image Theme

joaomfigueiredo just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

On AS3, how go to a specific frame

1,032 Views | 1 Reply
New Topic Respond to this Topic

Hello experienced people, I´m working on a dress up game on AS3. I need to made a button that removes all clothing.

Over the body base, in the main scene, there´s multiple movie clips for each clothing part (ShirtsMC, PantsMC, ShoesMC, etc) inside every MC there´re frames with clothing but there´s always an empty frame to simulate a removed item.

Each MC has a different number of items, and my question is how/if can this be done, when press that "RemoveAllClothing" button it commands the multiple movie clips to go at that empty frame in each one of the multiple MC.

I´m not really sure how archive this, any help will be greatly appreciated

-Freefox-

On AS3, how go to a specific frame

Response to On AS3, how go to a specific frame 2017-08-09 17:20:22


If you know how to set up a button, you can put this in the function

gotoAndStop(4);

if it's a movieclips frame you can use

name_MC.gotoAndStop(4);

or since you have labels

gotoAndStop(labelName);

and if you don't know how to make a button

buttonName.addEventListener(MouseEvent.CLICK, clickHandler); 
function clickHandler(event:MouseEvent):void { 
//above code in here
}