Posted By

adamcoulombe on 10/08/10


Tagged

rotate flash as3 orbit


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

thastyle
tspitzr


AS3 Orbiting Polkadots


 / Published in: ActionScript 3
 

URL: http://www.adamcoulombe.info/lab/as3/polkadot-orbit.html

simple way to make an orbiting effect in flash with as3

  1. addEventListener(Event.ENTER_FRAME,doOrbit)
  2.  
  3. function doOrbit(e){
  4. orbit.rotation+=1;
  5. for(var i=0; i<orbit.numChildren; i++){
  6. var planet = orbit.getChildAt(i);
  7. planet.rotation -=1;
  8. }
  9. }

Report this snippet  

You need to login to post a comment.