Flash Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignFlash Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 2nd, 2012, 10:16 AM
fvnbab fvnbab is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2012
Posts: 1 fvnbab User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 56 sec
Reputation Power: 0
Page 3d Flip

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; } }

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignFlash Help > Page 3d Flip

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap