----------------------------------------------------

主要利用了rotationY属性来进行处理,Pseudocode:

1: import com.greensock.*;
   2: import com.greensock.easing.*;
   3:  
//startValues for the card back
   5: flipper.back.rotationY = -90;
   6: flipper.back.alpha=0;
   7:  
//speed of 90 degrees of flip
var flipSpeed:Number = .5; 
  10:  
//create TimelineMax instance
true});
  13:  
//flip the front 90 degrees
false, ease:Linear.easeNone}))
  16:  
//set the back to alpha of 0 as soon as front finishes
false}))
  19:  
//flip the back 90 degrees
  21: tl.append(TweenMax.to(flipper.back, flipSpeed, {rotationY:0, ease:Linear.easeNone}))
  22:  
//basic button code
  24: flip1_mc.addEventListener(MouseEvent.CLICK, flip1);
  25:  
function flip1(e:MouseEvent){
// play to the beginning of the timeline
  28:     tl.tweenTo(0);
  29: }
  30:  
  31: flip2_mc.addEventListener(MouseEvent.CLICK, flip2);
function flip2(e:MouseEvent){
// play to the end of the timeline
  34:     tl.tweenTo(tl.duration);
  35: }

相关文章:

  • 2021-08-16
  • 2022-03-01
  • 2022-12-23
  • 2022-12-23
  • 2021-12-28
  • 2021-05-09
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-06-25
  • 2021-05-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案