/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
private var _container:Boolean; private var _objarray:Array = new Array(); private var _cont:Sprite; ///////////////////////////// //Add multiple children. ////////////////////////////// private function addChildren (_objarray, _container = false, _cont = null) { for (var j:int = 0; j < _objarray.length; j++) { if(_container) { _cont.addChild(_objarray[j]); } else { addChild (_objarray[j]); } } } //////////////////////////////