Next/previous buttons that are moving between different animations.
Gyazo - 0260741e4ce22250745972c4f8122aef.png
here is an image of my interface, I have 5 buttons : left,right,3 buttons with animations in it, my code doesnt show any errors but when i try to run swf file ,nothing happens,here is my code,any suggestions?
package {
import flash.display.MovieClip;
import flash.events.MouseEvent;
public class animationinterface extends MovieClip {
//var interfacewindow:Interfacewindow;
var interface1:Interface1;
//var animation3:Animation3;
var animation2:Animation2;
var animation1:Animation1;
public function animationinterface() {
//interfacewindow = new Interfacewindow();
interface1 = new Interface1();
//animation3 = new Animation3();
animation1 = new Animation1();
animation2 = new Animation2();
addChild(interface1);
//Add event listeners
interface1.buttonleft.addEventListener(MouseEvent.CLICK, left);
interface1.buttonright.addEventListener(MouseEvent.CLICK, right);
//interfacewindow.animation1.addEventListener(MouseEvent.CLICK, an1);
//interfacewindow.animation2.addEventListener(MouseEvent.CLICK, an2);
}
//Event handlers
function left(event:MouseEvent): void {
addChild(animation1);
removeChild(interface1);
}
function right(event:MouseEvent): void {
addChild(animation2);
removeChild(interface1);
}
/* function an1(event:MouseEvent):void
{
addChild(animation1);
removeChild(interfacewindow);
}
function an2(event:MouseEvent):void
{
addChild(animation2);
removeChild(interfacewindow);
}
*/
}
}

