Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easing is tweens that just scale

Status
Not open for further replies.

FunkyGibber

Technical User
Jun 7, 2007
1
GB
Hi,

I need to get a company logo zooming into shot (by animating the scale of the logo), and to make it look dynamic, I need to alter the tweens by easing-in the sprite. But it seems that 'Size' tweening greys out the ease-in function!! Is there any way I can give the tweens a ease-in?

Cheers in advance,
Ste,
 
Say you want to change the size from 0 x 0 to 200 x 200 in 20 frames with ease-in tween:
Code:
-- Behaviour attached to a Sprite
property pT

on beginSprite me
  pT = 0.0
  sprite(me.spriteNum).width = 0
  sprite(me.spriteNum).height = 0
end beginSprite

on enterFrame me
  if pT < 20 then
    sprite(me.spriteNum).width = 200*power(pT/20, 4)
    sprite(me.spriteNum).height = 200*power(pT/20, 4)
    pT = pT + 1
  end if
end enterFrame

Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top