Animate button
hi guys,
i need to animate a few buttons, but I do not know from where to begin??? any animation goes to me well!! do you have any idea or template??
thanks
i need to animate a few buttons, but I do not know from where to begin??? any animation goes to me well!! do you have any idea or template??
thanks
Comments
Also put change attributes in the Otherwise part of the rule to set the width and height back to normal. I also put a play sound in the rule ... so it now gives a sound response and the user can see something happened when you touch the button. If the button changes to a new scene, or brings up a level or menu or something I usually add a timer in the touch rule to delay that happening by a 0.3 secs or something so the button 'grows' and 'shrinks' before loading a new page.
” i want to animate also when the button is in "stop"."
Place this animation inside the 'otherwise' section of your rule.
self.flash = 0 and the length of the loop is determined by the value after the % so in this case it is 0.5 of a second
(less than than about 0.12 and it fails)
and remember self.Time has to be selected NOT typed in
on button:
2. Rule: when
Attribute: self.Stop = 0
---Rule: when (this is nested in self.Stop rule)
---Event: touch is pressed
----play sound
----do animation
---Rule: when (this is nested in self.Stop rule)
---Attribute: self.Image = (last imageName in animation)
----changeAttribute: self.Stop To: 1
Otherwise:
-do the stopAnimation
@};- MH
edit: this is an example! is that possible to do in GS?? (the movement)
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Constrain width to . . . . 20*cos( self.Time *100)+100
Constrain height to . . . . 20*cos(self.Time*100)+100
AAA*cos(self.Time*BBB)+CCC
AAA = the amount of change . . . so . . . . 50 = 25 pixels bigger - then 25 pixels smaller - then 25 pixels bigger . . . etc etc
BBB = speed of change
CCC = size of object . . . . so if CCC is 100 and AAA is 50 then size = 125 then 75 then 125 then 75 then 125 . . . . etc etc
THANKS
'200' = speed of the flashing.
"i have a rectangle button and the animation transform it to a squared!"
Because CCC is the size of the object . . . take a look at what is happening, it's simple and all explained for you . . . I am not going to give you any more clues, you need the exercise ! Lol.