Dress Up Tutorial 3 - adding code
Channel: Lady Game Developer
Date: 2014-07-10

We finally add some code and make things happen!
Here I demonstrate some very simple button functions which tell a dress to go to different frames. This tutorial uses Flash CC and Actionscript 3.0 (AS3).
Check out my work at: http://www.dolldivine.com

Code from the tutorial:

button1.addEventListener(MouseEvent.CLICK, button1Click);
function button1Click(e:MouseEvent):void{
 dress.gotoAndStop(1);
}

button2.addEventListener(MouseEvent.CLICK, button2Click);
function button2Click(e:MouseEvent):void{
 dress.gotoAndStop(1);
}

button3.addEventListener(MouseEvent.CLICK, button3Click);
function button3Click(e:MouseEvent):void{
 dress.gotoAndStop(1);
}