Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
is there a timeline or sequencing support for gtween in near future? — Gideros Forum

is there a timeline or sequencing support for gtween in near future?

edited August 2013 in Plugins
Hi guys, sorry if this is already been asked.

Atilim made a great job bringing gtween to gideros. The original Gtween came with additional timeline or sequencing support which is in most cases needed when we want to create complex ordered animation. Will gideros have this timeline support anytime soon? already is it already available. I'm vey new to gideros and LUA.

If not, is there a way to simulate timeline animation? To be more specific, what I want to create is star rating animation at the end of game level just like angrybirds do. Except I have 10 stars to animate, then particle burst effect for each star. So total of 20 animation to sequence.

I know how to use gtween (using delay to mimic sequencing) and particles using TNT-particles, all I need just a simple way to sequence them.

kind regards,


  • @widhi_muttaqien one way to do that is to use MovieClip, where you can manipulate animations by frames, by going to specific frame and play from that, or setting goto actions. Of course you can also tween everything in MovieClip internally (without GTween)

    second approach would be to chain GTweens

  • thank you for your kind and fast response arthur (if this is your real name).

    The gtween chaining looks interesting. I will definetely try it.

    I like to know, is it possible to put script inside movieclip juat like flash fro keyframe script? So for example, the script will be triggered when frame 20 is playyed (something like that). A URL to that discussion will be fine.

    Again, so sorry its a very newbie question.
    thank you
  • @widhi_muttaqien it might be possible but not exactly like that.
    Theoretically with MovieClips you could set stopActions on any frame you want, then when movieclip reaches frame with stop action, it dispatched Event.COMPLETE, and you could put any code inside this event handler.

    Unfortunately, determining which frame actually called the stop action might not be that easy. So it will not work for all cases.
  • thank you arthur. I feel Gideros forum is a warm and cozy place now :)

    I will stick with gtweens chaining for now. See how far I can push it to good use.

    Still hoping Gtween timeline implemented in the near future though :)
    Although my app is a non commercial one, I'll appreciate all the trouble you guys went through to make gtweens timeline available as I would purchase if its in a form of paid plugin. Because I will need it for upcoming scenes with lots of animations. again thanks

    kind regards,
  • Sure, could you point to a resource about timlined tweens, to better understand the concept :)
  • petecpetec Member
    edited August 2013
    @widhi_muttaqien If I want a sequence of tweens to happen one after the other then I put the objects in a table and their end positions also in tables and either do something like:
    for n=1, 10 do
    	GTween.new(star[n],0.2, {x=endX[n], y=endY[n]}, {delay=0.1*n, onComplete=function()  starburst() end})
    where starburst is your particle stuff.

    Or sometimes I use delayed timers, especially if the function has lots of stuff in it:
    for n=1, 10 do
    	Timer.delayedCall(100*n, function() GTween.new(star[n],0.2, {x=endX[n], y=endY[n]}, {onComplete=function() starburst() end}))
    In both cases, multiplying the time for the delay or the delayed timer by n means that the tweens happen at regular intervals and you can adjust the intervals easily (especially if you use a variable for the time). You could instead have a table of tween/delay times and not multiply by n. That way each object could have its own time. I don't know if that gives you anything like you want.

    By the way, all code is just typed without trying it so syntax/spellings could be off!
  • thank you arthur and pete.

    But timeline is more flexible as you can play around with timing and also forward and backward playback. Here are the example url:


    there are other examples but I believe these will do
  • this is another example from snorkl.tv, as we can see the code was very short as it utilize tween with timeline class
  • I can see that the timeline could be useful and do things efficiently (and I would be very happy if it was added to Gideros), but it's always worth seeing what is possible with the current tools. With little effort (but somewhat longer code) I was able to make something reasonably similar to the trees picture. It's not exactly the same and my code is probably very inefficient compared with the stuff that people on here can manage.
  • this is good example. thank you pete
  • Since I think original GTween.lua was ported from gskinner, it should be compatible with it's timeline also. I've added it to the list to check out ;)
  • wow superb!!
    This will allow gideros devs to create more engaging animations
    thank you so much for your support!
    I believe gideros will be better and better platform this way (listening to desperate users like me ha ha ha).
  • The point of my example was twofold - one to give you an example that sequenced tweens and then did something when they were all complete (in my case reverse the tween but in your star case trigger the starburst once your stars had moved in), and secondly to show that there is often a way to achieve what you want, even if it isn't the way that you are used to. I came to Gideros from a reasonable smattering of AS3 (syntax now mostly forgotten!) and then Corona. When I first started with Gideros I kept wanting it to do things in different ways. Now I'm used to it, there are fewer things that I wish for as I find I can actually do them with a bit of divergent thinking.

    There's a learning curve with any new language or implementation of it that can be frustrating :) . Personally, whilst tween timelines might be handy and certainly if they are easily available would be a good addition (although people do create engaging animations without them!), I would much rather be able to trigger events from known frames of movie clips as sometimes movie clips are more flexible than tweens (especially as you can start them at different places if you want to). For now, I use a mix of tweens, movie clips and timers and find that I can do most of what I want.
  • thank you pete, I will try your method while timeline not yet available in gideros
  • That's OK - hope the example helps you.
Sign In or Register to comment.