Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
How do I create an animated button — Gideros Forum

How do I create an animated button

ilovdevsilovdevs Member
edited February 2013 in Step by step tutorials
I want to be able to tap a button and have a quick fluid splat animation when i hit it, along with a splat sound(i already have that. After the button is hit it will transition into the main game scene. Or would just using a normal button technique work fine?
Tagged:

Comments

  • BJGBJG Member
    edited February 2013
    I'm not sure how you visualise this...does the button morph and its appearance gradually change to fill the whole screen, or does the click just activate a small animation on the button shape...? I'm wondering if you could use MovieClip...
  • zvardinzvardin Member
    Accepted Answer
    You could use the normal button class included I believe and just add a MovieClip for downState and then add an event listener to the movie clip so you don't transition until the animation is done.
  • talistalis Guru
    Accepted Answer
    You can use Gtween liblary for animations like pulse, shake... onclick of button.
    function pulsenormal(object,scl)
    	if scl ~= nil then
    		object:setScale(scl)
    	else
    		object:setScale(1)
    	end
    	GTween.new(object, 0.2, {scaleX=1,scaleY=1}, {})
    end
    Or you can make animations like in Gidhelix game example by @GregBug
    using onenterframe event.
    http://www.giderosmobile.com/forum/discussion/431/gidhelix-game-made-with-gideros-studio#Item_23
  • Sorry for ultra late reply but thanks guys that was just what I needed!
Sign In or Register to comment.