Jump to content
GreenSock

sublimynL7

Members
  • Posts

    2
  • Joined

  • Last visited

Reputation

0 Newbie

Profile Information

  • Gender
    Not Telling
  1. Thanks so much Carl! Creating a parent object was the perfect way to do it. Cheers!
  2. Hi, I'll do my best to be as clear as possible In my game, I spawn a powerup, and to attract the player's attention to the powerup, I want to tween a pointing finger to that powerup. So my 2 objects are: 1 - powerup, and 2 - pointer. The tween for the pointer is a "bouncing" tween to give the impression of "pointing" to the powerup. (Imagine a bouncing finger pointing at an object.) The powerup is NOT being tweened, it is being affected by physics/gravity as it falls from the sky. I need the pointer object to follow the powerup as it falls, while performing the bouncing tween. This is my code so far: TweenMax.fromTo( m_pointer, 0.4, { x: m_powerup.x + 100, y: m_powerup.y - 150}, { x: m_powerup.x + 65, y: m_powerup.y - 65, repeat:1, yoyo:true, ease:Linear.easeOut, onComplete:onPointerTweenComplete } ); private function onPointerTweenComplete ():void { TweenMax.to( m_pointer, 0.4, { x: m_powerup.x + 200, y: m_powerup.y - 135, repeat:1, yoyo:true, ease:Linear.easeOut, onComplete:onPointerTweenComplete } ); } This code gets me pretty close, but when onPointerTweenComplete is called each time, I get a really ugly transition. I'm hoping that there is a smoother way to tween my pointer as the powerup moves around on the screen. My apologies if this was difficult to follow. Any example on one object tweening based on another object's position would be useful!
×