- //créer un clip conteneur
- var mc:MovieClip = _root.createEmptyMovieClip("conteneur", 100);
- mc._x = 250;
- mc._y = 200;
- // y attacher le logo, les ptites étincelles et la planete
- mc.attachMovie("logo", "logo_inst", 5000);
- mc.attachMovie("etincelle", "etincelle", 500,{_x:-500,_y:-500});
- mc.attachMovie("planete","planete_inst",200,{_x:40});
-
- i = 1;
- mc.onEnterFrame = function() {
- if (i == 50) {
- i = 0;
- }
- //dupliquer les étincelles pour l'effet "trainée"
- var star:MovieClip = _root.conteneur.attachMovie("etincelle", "etincelle"+i, _root.NSD+i);
- //les faires suivre le logo
- star._x = _root.conteneur.logo_inst._x;
- star._y = _root.conteneur.logo_inst._y;
-
- star._xvitesse = Math.random()*15;
- star._yvitesse = Math.random()*4-3;
- star._alpha = 100;
- star.onEnterFrame = function() {
- this._yvitesse += 0.05;
- this._xvitesse = _xvitesse/1.5;
- this._x +=this._xvitesse;
- this._y += this._yvitesse;
- this._alpha -= 1;
- if (this._alpha<=50) {
- removeMovieClip(this);
- }
- };
- i++;
- };
- // fonction pour créer la trajectoire du logo
- var coef = 0;
- luneQuiTourne = function () {
- coef += 0.05;
- this._x = 40+Math.cos(coef)*230;
- this._y = 0+Math.sin(coef)*80;
- this._xscale =Math.sin(coef)*100;
- this._yscale =Math.sin(coef)*25+75;
- // là on change les profondeur du logo et des étincelles pour qu'ils aient
- //l'air de passer derrière la planète
- if (this._y<0) {
- conteneur.planete_inst.swapDepths(6000);
- conteneur.logo_inst.swapDepths(5000);
- _root.NSD=1;
- } else {
- conteneur.planete_inst.swapDepths(400);
- conteneur.logo_inst.swapDepths(5000);
- _root.NSD=7000;
-
-
- }
- };
- conteneur.logo_inst.onEnterFrame = luneQuiTourne;
//créer un clip conteneur
var mc:MovieClip = _root.createEmptyMovieClip("conteneur", 100);
mc._x = 250;
mc._y = 200;
// y attacher le logo, les ptites étincelles et la planete
mc.attachMovie("logo", "logo_inst", 5000);
mc.attachMovie("etincelle", "etincelle", 500,{_x:-500,_y:-500});
mc.attachMovie("planete","planete_inst",200,{_x:40});
i = 1;
mc.onEnterFrame = function() {
if (i == 50) {
i = 0;
}
//dupliquer les étincelles pour l'effet "trainée"
var star:MovieClip = _root.conteneur.attachMovie("etincelle", "etincelle"+i, _root.NSD+i);
//les faires suivre le logo
star._x = _root.conteneur.logo_inst._x;
star._y = _root.conteneur.logo_inst._y;
star._xvitesse = Math.random()*15;
star._yvitesse = Math.random()*4-3;
star._alpha = 100;
star.onEnterFrame = function() {
this._yvitesse += 0.05;
this._xvitesse = _xvitesse/1.5;
this._x +=this._xvitesse;
this._y += this._yvitesse;
this._alpha -= 1;
if (this._alpha<=50) {
removeMovieClip(this);
}
};
i++;
};
// fonction pour créer la trajectoire du logo
var coef = 0;
luneQuiTourne = function () {
coef += 0.05;
this._x = 40+Math.cos(coef)*230;
this._y = 0+Math.sin(coef)*80;
this._xscale =Math.sin(coef)*100;
this._yscale =Math.sin(coef)*25+75;
// là on change les profondeur du logo et des étincelles pour qu'ils aient
//l'air de passer derrière la planète
if (this._y<0) {
conteneur.planete_inst.swapDepths(6000);
conteneur.logo_inst.swapDepths(5000);
_root.NSD=1;
} else {
conteneur.planete_inst.swapDepths(400);
conteneur.logo_inst.swapDepths(5000);
_root.NSD=7000;
}
};
conteneur.logo_inst.onEnterFrame = luneQuiTourne;