[Behavior] LiteTween

Post your completed addons to share with the community

Post » Sun Jun 17, 2012 11:23 pm

i just downloaded the new version and looked at your examples,

maybe im thinking this in the wrong way, but how i tought it could be

is like when you hover a button, i plays it pingpong animation whatever happens and then stops, you probably dont want when leaving a button it abruptly stops animating

but i will recheck the posibilities, i guess you could use two tweens,
i will post examples in future

edit: i think the most dynamic way would be to have a playback mode
"pingpong stop"

so when you hover you have an in and out animation with one tween
its more a feature as you can make it with two tweens... but saves events

vtrix2012-06-17 23:36:13
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Mon Jun 18, 2012 4:45 am

@vtrix

I hope I didn't misunderstand what you mean now..

You want to create a button that's when a mouse is hovering on it, a tween is played, but when that mouse cursor leaves the certain object, the tween is played backward.

One of the main confusion I got when making that is that there are no onMouseLeave and onMouseEnter on scirra -_- (have to code it on your own for every button). Mouse on object will continuously call EaseTween.Start, making the object bigger and bigger as long as the mouse is over it. Trigger once while true could helps, but it's still painful to make that.

So, I modified the plugin and make play and stop, which is basically a version of play once that will not respond to subsequent start call. I cannot modify the original play once action since some people would use that to make dash, etc. It will be terrible if they can't dash after dashing once.

I also make reverse action which will rewind a tween.

That thing aside, this is the new behavior and looping button. I hope this is the one you need.

Looping Button

EaseTween 1.3.3lunarray2012-06-18 04:46:33
B
33
S
6
G
1
Posts: 179
Reputation: 3,628

Post » Mon Jun 18, 2012 5:32 am

reverse action definatly cool,

about the pingpong stop action, its almost right, except it keeps looping while your over it, it should play pingpong once and stop even if youre still over the button

or maybe i need an combination to do this?
if its not possible dont mind it, already very nicevtrix2012-06-18 05:32:58
ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Mon Jun 18, 2012 7:09 am

I see. Have you tried using "Trigger once while true" condition? I could make it respond to Start action only once, but then, it will not be very flexible. For example, you make it ping pong everytime a mouse click, but it will only respond once...
B
33
S
6
G
1
Posts: 179
Reputation: 3,628

Post » Mon Jun 18, 2012 7:39 am

@vtrix I forgot to answer about opacity fade to 0, don't forget that target is relative. Therefore to fade an object from 100 opacity to 0 you have to use -100 as target...
B
33
S
6
G
1
Posts: 179
Reputation: 3,628

Post » Mon Jun 18, 2012 7:02 pm

@lunarray

yes with trigger once it works perfect, and with tweenprogress i can check when pingpong is done, thank you! :)

ImageImage
B
61
S
19
G
6
Posts: 809
Reputation: 9,028

Post » Wed Jun 20, 2012 9:44 pm

It may just be how Im using it but progress for value keeps returning a few decimals low. 0.009, rather than 0.9.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Thu Jun 21, 2012 11:08 am

@newt

Ah yes sorry, silly typo on my side. It should be 'this.initiating' instead of 'this.initial'. It should be fixed now. Thanks for pointing it out.
B
33
S
6
G
1
Posts: 179
Reputation: 3,628

Post » Wed Jul 18, 2012 11:58 pm

Definitively a cool behavior, but there's seem to be a bug: if you set target coordinates as variables like Target "varX,varY" or "MouseX,MouseY" - it doesn't work.
B
42
S
11
G
4
Posts: 505
Reputation: 7,267

Post » Thu Jul 19, 2012 5:07 pm

[QUOTE=xoros] Definitively a cool behavior, but there's seem to be a bug: if you set target coordinates as variables like Target "varX,varY" or "MouseX,MouseY" - it doesn't work. [/QUOTE]
this would be a useful functionality ;]
B
38
S
8
G
3
Posts: 438
Reputation: 6,869

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: DragoMej and 2 guests