1689 posts Envato Elite Author
  • Affiliate Level 2
  • Author Level 8
  • Collector Level 1
  • Top Monthly Author
+8 more
Tean
says

This works only for one click, after that nada :D

import caurina.transitions.Tweener;

mc.addEventListener(MouseEvent.CLICK, rotate);

function rotate(e:MouseEvent):void {
    Tweener.addTween(e.target,{rotationY:"180",time:1});
}

TweenLite works fine ofcourse :D

1044 posts Freelance Flash and JavaScript Developer
  • Top Monthly Author
  • Trendsetter
  • Weekly Top Seller
  • 8 Years of Membership
+10 more
sike
says

oops… I can’t get the point. :)

3757 posts
  • Elite Author
  • Spain
  • Author Level 8
  • Featured Author
+11 more
pezflash
says

I’m not quite sure about your question, but begin deleting the quote marks in the y reference: rotationY:180

1689 posts Envato Elite Author
  • Affiliate Level 2
  • Author Level 8
  • Collector Level 1
  • Top Monthly Author
+8 more
Tean
says
I’m not quite sure about your question, but begin deleting the quote marks in the y reference: rotationY:180

Passing values as Strings will make the tween relative to the current value.

Thats what I want obviously.

In the end, and i cant believe I am saying this, I decided to use adobe tween class for this flip :D

2309 posts
  • 7 Years of Membership
  • Affiliate Level 2
  • Author Level 2
  • Beta Tester
+5 more
theflyingtinman
says
Passing values as Strings will make the tween relative to the current value.

Are you sure? I don’t recall ever seeing anything about that in the Tweener docs. Are you thinking of mc_tween (which does perform relative tweening when the value is in quotes)

1689 posts Envato Elite Author
  • Affiliate Level 2
  • Author Level 8
  • Collector Level 1
  • Top Monthly Author
+8 more
Tean
says

You are right, I actually never checked, I assumed it had a TweenLite sintax :P

So I actually have to write it like this, and it works:

Tweener.addTween(e.target,{rotationY:e.target.rotationY + 180,time:1});

thank God I dont have to use Adobe Tween Class…

3757 posts
  • Elite Author
  • Spain
  • Author Level 8
  • Featured Author
+11 more
pezflash
says

Uhmmm i was not far away from your solution, finally! :P

by
by
by
by
by
by