Ho creato, tramite un funzione, dinamicamente il metodo enterFrame ad alcuni oggetti sullo stage, ora lo vorrei anche fermare, ma non ci riesco. Questo è il codice, qualcuno conosce un'altra soluzione?
codice:function inizio(){ for(var oggetti in _root){ if(typeof(_root[oggetti])=="movieclip"){ _root[oggetti].onEnterFrame=function(){ var oriz=(Math.random())*760; var vert=(Math.random())*500; var ruota=(Math.random())*360; this._x=oriz; this._y=vert; this._rotation=ruota; var prof=int((Math.random())*11); this.setDepthTo(prof); } } } } function ferma(){ for(var ogg in _root){ if(typeof(_root[ogg])=="movieclip"){ delete _root[ogg].enterFrame; } } clearInterval(a); }

Rispondi quotando