Properties Setter Function Object Way


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

Properties Setter Function Object Way


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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.