Posted By


wintondeshong on 11/08/07

Statistics


Viewed 1450 times
Favorited by 0 user(s)

copyPropertiesIndexOf


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



Copy this code and paste it in your HTML
  1. // Returns an object with any/all properties of the supplied object that contain searchStr in their name
  2. private function copyPropertiesIndexOf(searchStr:String, obj:Object):Object
  3. {
  4. var tmpObject:Object = new Object();
  5. for (var prop in obj)
  6. if (prop.indexOf( searchStr )!=-1)
  7. tmpObject[prop] = obj[prop];
  8. return tmpObject;
  9. };

Report this snippet


Comments


You need to login to view comments.