hi
Just a question on how to flip 3d pages heres my code so far but wen i click on alarm btn it goes to side c instead of going side b any help??
Code:
import fl.transitions.Tween; import fl.transitions.easing.Strong; import fl.transitions.TweenEvent; var isStill:Boolean = true; var isStill2:Boolean = true; var isStill3:Boolean = true; var isStill4:Boolean = true; var arraytween:Array=new Array(); var arraytween2:Array=new Array(); var arraytween3:Array=new Array(); var arraytween4:Array=new Array(); function onalarm_clicked(e:MouseEvent):void{ gotoAndStop ("sideb"); } function calender_clicked(e:MouseEvent):void{ gotoAndStop ("sidec"); } /*function stopwatch_clicked(e:MouseEvent):void{ gotoAndStop ("con.sidec"); } function analog_clicked(e:MouseEvent):void{ gotoAndStop ("con.sided"); } function digital_clicked(e:MouseEvent):void{ gotoAndStop ("con.sidee"); }*/ con.sidea.alarm.addEventListener(MouseEvent.CLICK,onalarm); con.sidea.calender.addEventListener(MouseEvent.CLICK,oncalender); //con.sidea.stopwatch.addEventListener(MouseEvent.CLICK,onstopwatch); //con.sidea.analog.addEventListener(MouseEvent.CLICK,onanalog); //con.sidea.digital.addEventListener(MouseEvent.CLICK,ondigital); con.sideb.flip.addEventListener(MouseEvent.CLICK,onflip); con.sidec.flip2.addEventListener(MouseEvent.CLICK,onflip2); //con.sided.flip3.addEventListener(MouseEvent.CLICK,onflip3); //con.sidee.flip4.addEventListener(MouseEvent.CLICK,onflip4); addEventListener(Event.ENTER_FRAME,loop); addEventListener(Event.ENTER_FRAME,loop2); addEventListener(Event.ENTER_FRAME,loop3); addEventListener(Event.ENTER_FRAME,loop4); function onalarm(e:Event) { if (isStill) { arraytween.push(new Tween(con,'rotationY',Strong.easeInOut,con.rotationY,con.rotationY+180,1,true)); arraytween[0].addEventListener(TweenEvent.MOTION_FINISH,reset); isStill = false; } } function reset(e:Event) { isStill = true; arraytween = []; } function loop(e:Event) { if (con.rotationY >= 90 && con.rotationY <= 270) { con.addChild(con.sideb); con.scaleX = -1; }else{ con.addChild(con.sidea); con.scaleX = 1; } if (con.rotationY >= 360) { con.rotationY = 0; } } function onflip(e:Event) { if (isStill2) { arraytween2.push(new Tween(con,'rotationY',Strong.easeInOut,con.rotationY,con.rotationY+180,1,true)); arraytween3[0].addEventListener(TweenEvent.MOTION_FINISH,reset2); isStill2 = false; } } function reset2(e:Event) { isStill2 = true; arraytween2 = []; } function loop2(e:Event) { if (con.rotationY >= 90 && con.rotationY <= 270) { con.addChild(con.sideb); con.scaleX = -1; }else{ con.addChild(con.sideb); con.scaleX = 1; } if (con.rotationY >= 360) { con.rotationY = 0; } } function oncalender(e:Event) { if (isStill3) { arraytween3.push(new Tween(con,'rotationY',Strong.easeInOut,con.rotationY,con.rotationY+180,1,true)); arraytween3[0].addEventListener(TweenEvent.MOTION_FINISH,reset3); isStill3 = false; } } function reset3(e:Event) { isStill = true; arraytween3 = []; } function loop3(e:Event) { if (con.rotationY >= 90 && con.rotationY <= 270) { con.addChild(con.sidea); con.scaleX = -1; }else{ con.addChild(con.sidec); con.scaleX = 1; } if (con.rotationY >= 360) { con.rotationY = 0; } } function onflip2(e:Event) { if (isStill4) { arraytween4.push(new Tween(con,'rotationY',Strong.easeInOut,con.rotationY,con.rotationY+180,1,true)); arraytween4[0].addEventListener(TweenEvent.MOTION_FINISH,reset4); isStill4 = false; } } function reset4(e:Event) { isStill4 = true; arraytween4 = []; } function loop4(e:Event) { if (con.rotationY >= 90 && con.rotationY <= 270) { con.addChild(con.sidec); con.scaleX = -1; }else{ con.addChild(con.sidea); con.scaleX = 1; } if (con.rotationY >= 360) { con.rotationY = 0; } }