Jump to content
Search Community

Search the Community

Showing results for tags 'tween to movieclip'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager
  • Supercharge

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Personal Website


Twitter


CodePen


Company Website


Location


Interests

Found 1 result

  1. Hi, I have a script I wrote where there are going to be multiple soldiers fighting, (represented by rectangles). In this example, one rectangle runs away, another one follows it. Is this the most efficient way to write this? Can I use TweenLite for the follow part? -------------- import com.greensock.TweenLite; import com.greensock.easing.*; //rect 1 runs away TweenLite.to(object1, 4, {x:84, y:-160}); addEventListener(Event.ENTER_FRAME, loop); //rect 2 follows rect 1 function loop(e:Event):void{ if(object1.x<object2.x){ object2.x-=10; }else{ object2.x=object1.x; } if(object1.y<object2.y){ object2.y-=10; }else{ object2.y=object1.y-32; } }
×
×
  • Create New...