Ciao a tutti ho la necessità di trasformare una funzione che utilizzo spesso in un prototype, chi mi puo' aiutare?
Vorrei creare un prototype per tutti i clip presenti nella _root, ma non mi è ancora ben chiaro come fare ...codice:_root.barra_mc.fine = Math.round(_root.barra_mc._x); var accellerazione = 1.1; var inerzia = 3; _root.barra_mc.spostamento = 0; function movClip() { this.spostamento = (this.spostamento+(this.fine-this._x)/_root.accellerazione)/_root.inerzia; this._x += this.spostamento; } function barra(quanto) { _root.barra_mc.fine = quanto; } _root.barra_mc.onEnterFrame = movClip;
avevo pensato a qualcosa tipo
sono sulla strada giusta?codice:_root.movieclip.prototype.onEnterFrame = function() ...


Rispondi quotando