1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
   |  
import mx.transitions.Tween;
import mx.transitions.easing.*;
 
var Cnt_menu:MovieClip = this.createEmptyMovieClip("Cnt_menu", this.getNextHighestDepth());
	Cnt_menu._x = 100;
	Cnt_menu._y = 100;	
	Cnt_menu.lineStyle(1, 0xCCCCCC, 100);
	Cnt_menu.moveTo(0, 0);
	Cnt_menu.lineTo(200, 0);
	Cnt_menu.lineTo(200, 250);
	Cnt_menu.lineTo(0, 250);
	Cnt_menu.lineTo(0, 0);
	Cnt_menu.endFill();
 
display();
function display() {
	var Mc_Actif:MovieClip;	
    var i = 0, Nbr = 5;
	var navText:Array = new Array("ACCUEIL", "BIOGRAPHIE", "ACTUALITES", "GALERIES", "LIENS", "CONTACTS");	
 
attach();
    function attach() {
    var  Mc_clip = Cnt_menu.attachMovie("mc", "mc"+i, i);
	Mc_clip._y = 0 + ((i + 1) * 18);
	Mc_clip.my_txt.text = navText[i];
 
    Mc_clip.onRollOver = bt_onRollOver;
	Mc_clip.onRollOut = bt_onRollOut;
	Mc_clip.onPress = bt_onRelease;		
 
//création du champ texte 
 	Mc_clip.createTextField("my_txt", 1, 0, 0, 0, 0);
	Mc_clip.my_txt.embedFonts = true;
	Mc_clip.my_txt.border = true
	Mc_clip.my_txt.background = true;
	Mc_clip.my_txt.autoSize = "right";	
	var my_fmt:TextFormat = new TextFormat ("Kroeger", 10, 0);
	my_fmt.leftMargin = 5
	my_fmt.rightMargin = 5
	my_fmt.color = 0x000000;	
	Mc_clip.my_txt.text =navText[i];
	Mc_clip.my_txt.setTextFormat(my_fmt);
 
//creation du bar
	var bar:MovieClip = Mc_clip.createEmptyMovieClip("bar", this.getNextHighestDepth());
	bar._x = 0;
	bar._y = 7;
	bar.moveTo(0, 0);
	bar.beginFill(0x000000, 100);
	bar.lineTo(5, 0);
	bar.lineTo(5, 1);
	bar.lineTo(0, 1);
	bar.lineTo(0, 0);
	bar.endFill();		
 
	var temp1:Tween = new Tween(Mc_clip.my_txt, "_x", Regular.easeOut, 100, 8, .2, true);
	var temp1:Tween = new Tween(Mc_clip.bar, "_xscale", Regular.easeOut, 1900, 100, .2, true);
        temp1.onMotionStopped = function() {
            i++;
            if (i<=Nbr) {
                attach();
				activBt(false);
	 }else{
			activBt (true);
		} 
    }
};
//enabled btn intro
function activBt(truefalse){
		for(k=0;k<=Nbr;k++){
		Cnt_menu['mc'+k].enabled=truefalse;
		}
	}
}; | 
Partager