Einzelnen Beitrag anzeigen
Alt 02-12-2003, 19:35   #19 (permalink)
RustyCake
brand new user
 
Benutzerbild von RustyCake
 
Registriert seit: May 2002
Ort: Laimbach 6 1/2
Beiträge: 16.884
und des ganze noch mit einem balken und textfeld für alle mcs!!
ActionScript:
  1. for (i=1; i<=6; i++) {
  2.     _root.createEmptyMovieClip("con"+i, i+20);
  3.     _root["con"+i].loadMovie("test"+i+".swf");
  4.     _root.createTextField("txt1", 10, 420, 24, 130, 20);
  5. }
  6. _root.balken._xscale = 0;
  7. this.loader_funk = function() {
  8.     var c1_t = _root.con1.getBytesTotal();
  9.     var c1_l = _root.con1.getBytesLoaded();
  10.     var c2_t = _root.con2.getBytesTotal();
  11.     var c2_l = _root.con2.getBytesLoaded();
  12.     var c3_t = _root.con3.getBytesTotal();
  13.     var c3_l = _root.con3.getBytesLoaded();
  14.     var c4_t = _root.con4.getBytesTotal();
  15.     var c4_l = _root.con4.getBytesLoaded();
  16.     var c5_t = _root.con5.getBytesTotal();
  17.     var c5_l = _root.con5.getBytesLoaded();
  18.     var c6_t = _root.con6.getBytesTotal();
  19.     var c6_l = _root.con6.getBytesLoaded();
  20.     if (c1_l>=4 || c2_l>=4 || c3_l>=4 || c4_l>=4 || c5_l>=4 || c6_l>=4) {
  21.         pt1 = Math.ceil((c1_l/c1_t)*100);
  22.         pt2 = Math.ceil((c2_l/c2_t)*100);
  23.         pt3 = Math.ceil((c3_l/c3_t)*100);
  24.         pt4 = Math.ceil((c4_l/c4_t)*100);
  25.         pt5 = Math.ceil((c5_l/c5_t)*100);
  26.         pt6 = Math.ceil((c6_l/c6_t)*100);
  27.         prozent = Math.ceil((pt1+pt2+pt3+pt4+pt5+pt6)/6);
  28.         _root.balken._xscale = prozent;
  29.         _root.txt1.text = prozent+" % geladen";
  30.         if (prozent>=100) {
  31.             clearInterval(loadID);
  32.         }
  33.     }
  34. };
  35. loadID = setInterval(loader_funk, 10);
Angehängte Dateien
Dateityp: zip setint_ex_ein_ba_txt.zip (4,6 KB, 53x aufgerufen)
__________________
Bitte keine Fragen, zu Flash per PM. Dazu ist das Forum da. Danke MFG_RustyCake!
"Wer tanzen will, muß erst gehen lernen"
RustyCake ist offline   Mit Zitat antworten