a loading page with flashMX

With the version Flash 5 :

This code is to be put on a clip (a 'waiting' animation for example)

 
onClipEvent (enterFrame) { 
  num =_root.getBytesLoaded()/_root.getBytesTotal()*100; 
  //definition d'une variable en pourcentage 
  num=math.Round(numero en %(sans mettre le %)); 
  if (num>99) { //ici choix de la frame, si tout est chargé 
     _root.gotoAndPlay("debut de l'animation"); 
  } 
} 


With the version Flash MX :
This code is to be put on the first frame of an animation. (first image)

 
   stop(); 
   this .onEnterFrame = function( ){ 
         var l=this .getBytesLoaded(); 
         var t=this .getBytesTotal(); 
         if (l!=0 && l>=t && l>4 ) 
            this .play(); 
   }