var texte = monClip.createEmptyMovieClip("texte"+i, i+1);Là, tu créer tes différents champs de texte dans le même conteneur "monClip".
this.onEnterFrame = function() {A ce niveau là, tu fais la boucle onEnterFrame sur this, qui contient donc "monClip", le mouvement sera effectif sur toute ta scène. Car c'est le conteneur global.
_root.createEmptyMovieClip("monClip",this.getNextHighestDepth()); for (var i = 0; i<numOfItems; i++) { var texte = monClip.createEmptyMovieClip("texte"+i, i+1); texte.angle = i*((Math.PI*2)/(1*numOfItems)); texte._x = Math.cos(texte.angle)*90+cx; texte.createTextField("champDeTexte",this.getNextHighestDepth(),0,00,200,200); texte.champDeTexte.border = false; texte.champDeTexte.selectable = false; //texte.champDeTexte.embedFonts = true; texte.champDeTexte.text = nodes[i].attributes.tag; texte.champDeTexte.setTextFormat(monFormat); texte.anglex = 0; texte.angley = 0; texte.i = i; texte.onEnterFrame = function() { this.anglex += this.i/25; this.angley += this.i/35; this.swapDepths(Math.round(this._xscale)+100); this._x = 70+50*Math.cos(this.anglex/numOfItems); this._y = 20+30*Math.sin(this.angley/numOfItems); var s:Number = (this._y)/(cy+1); this._xscale = this._yscale=s*100; }; }
var angley = 0; var a:Number = 0; monClip["texte"+a].onEnterFrame = function() { anglex += i/100; angley += i/100; this.swapDepths(Math.round(this._xscale)+100); monClip["texte"+a]._x = (80)+(15*a)*Math.cos(a/10*anglex/numOfItems); monClip["texte"+a]._y = (5*a)+(6*a)*Math.sin(a/2*angley/numOfItems); a++; if (a>=numOfItems) { a = 0; } var s:Number = ((monClip["texte"+a]._y))/(20); //trace(s); monClip["texte"+a]._xscale = monClip["texte"+a]._yscale=s*100; };
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question