Code Preloader gratuit

  • bballfan49
  • Born
  • Born
  • No Avatar
  • Inscription: Avr 06, 2010
  • Messages: 1
  • Status: Offline

Message Avril 6th, 2010, 5:28 pm

Il s'agit du code preloader que j'ai utilisé sur playbball. com.

J'ai utilisé deux bars et son genre d'un coup de chance, mais quelle que soit ordonné. motion Ones est lissée et l'autre non:

ACTIONSCRIPT Code: [ Select ]
private function progress(erogressEvent):void // update preloader
{
var temp:int;
temp = (e.bytesLoaded / e.bytesTotal) * 100;
m_textfield.text = temp + " / 100";
 
mysquare.width = 700 - (700 * (e.bytesLoaded / e.bytesTotal));
mysquare.x = mysquarex + (700 * (e.bytesLoaded / e.bytesTotal));
 
progressWidth2 = 700 - (7 * (temp));
 
triangleShape.x = mysquarex + (680 * (e.bytesLoaded / e.bytesTotal));
 
if (e.bytesLoaded / e.bytesTotal == 1) {
//removeEventListener(Event.ENTER_FRAME, checkFrame);
boolLoaded = true;
}
}
 
private function doFrame(e:Event):void
{
var time2:int = getTimer();
var timeDelta:int = time2 - time;
time = time2;
 
triangleShape.rotation = triangleShape.rotation + (timeDelta >> 3);
 
var tempMovement:int; var distanceMultiplier:int;
distanceMultiplier = (mysquare2.width - progressWidth2) / 5
tempMovement = (timeDelta >> 5) * distanceMultiplier;
 
if(mysquare2.width - tempMovement < progressWidth2)
{
mysquare2.width = progressWidth2;
}
else
{
mysquare2.width -= tempMovement;
}
 
}
  1. private function progress(erogressEvent):void // update preloader
  2. {
  3. var temp:int;
  4. temp = (e.bytesLoaded / e.bytesTotal) * 100;
  5. m_textfield.text = temp + " / 100";
  6.  
  7. mysquare.width = 700 - (700 * (e.bytesLoaded / e.bytesTotal));
  8. mysquare.x = mysquarex + (700 * (e.bytesLoaded / e.bytesTotal));
  9.  
  10. progressWidth2 = 700 - (7 * (temp));
  11.  
  12. triangleShape.x = mysquarex + (680 * (e.bytesLoaded / e.bytesTotal));
  13.  
  14. if (e.bytesLoaded / e.bytesTotal == 1) {
  15. //removeEventListener(Event.ENTER_FRAME, checkFrame);
  16. boolLoaded = true;
  17. }
  18. }
  19.  
  20. private function doFrame(e:Event):void
  21. {
  22. var time2:int = getTimer();
  23. var timeDelta:int = time2 - time;
  24. time = time2;
  25.  
  26. triangleShape.rotation = triangleShape.rotation + (timeDelta >> 3);
  27.  
  28. var tempMovement:int; var distanceMultiplier:int;
  29. distanceMultiplier = (mysquare2.width - progressWidth2) / 5
  30. tempMovement = (timeDelta >> 5) * distanceMultiplier;
  31.  
  32. if(mysquare2.width - tempMovement < progressWidth2)
  33. {
  34. mysquare2.width = progressWidth2;
  35. }
  36. else
  37. {
  38. mysquare2.width -= tempMovement;
  39. }
  40.  
  41. }
  • Anonymous
  • Bot
  • No Avatar
  • Inscription: 25 Feb 2008
  • Messages: ?
  • Loc: Ozzuland
  • Status: Online

Message Avril 6th, 2010, 5:28 pm

Afficher de l'information

  • Total des messages de ce sujet: 1 message
  • Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 27 invités
  • Vous ne pouvez pas poster de nouveaux sujets
  • Vous ne pouvez pas répondre aux sujets
  • Vous ne pouvez pas éditer vos messages
  • Vous ne pouvez pas supprimer vos messages
  • Vous ne pouvez pas joindre des fichiers
 
 

© 2011 Unmelted, LLC. Ozzu® est une marque déposée de Unmelted, LLC