Posted By

burakkirkil on 07/29/12


Tagged


Versions (?)

Properties Setter Function Object Way


 / Published in: ActionScript 3
 

Properties Setter Function Object Way

  1. // set some properties
  2. setProps(s, {x:100, y:100, scaleX:2, scaleY:2, rotation:45});
  3. // set multiple properties of an Object
  4. function setProps(o:*, props:Object):void {
  5. for (var key:String in props) {
  6. o[key] = props[key];
  7. }
  8. }

Report this snippet  

You need to login to post a comment.