AS3 Orbiting Polkadots


/ Published in: ActionScript 3
Save to your folder(s)

simple way to make an orbiting effect in flash with as3


Copy this code and paste it in your HTML
  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. }

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.