Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 19-02-2004, 12:53   #1 (permalink)
Kreativer Kopf
 
Benutzerbild von FlasherTyp
 
Registriert seit: Mar 2002
Ort: Darmstadt / Hessen
Beiträge: 1.120
Bitte mal drüber kucken ob alles OK? -> Dynamischer Bildpreloader

So kuckt mal bitte ob da alles Ok ist oder ob es wo zu Probleme kommen kann, ich hab das Gefühl es funktioniert.
Kann man es optimieren? Wo?
Ausserdem bekomm ich irgendwie net hin das der mir das Bild einfadet, daher noch das statsiche alpha=100, wie bekomm ich das hin?
ActionScript:
  1. button._visible=false;
  2. MovieClip.prototype.image = function (file,handler,hObj) {
  3.         pic = this.createEmptyMovieClip("img",1)
  4.         crt = this.createEmptyMovieClip("controll",2)
  5.         pic.loadMovie ("test.jpg")
  6.         crt.onEnterFrame = function () {
  7.                 pic._visible = false
  8.                 if (pic.getBytesLoaded() > 0 && pic.getBytesTotal() > 0) ready = int(pic.getBytesLoaded()*100/pic.getBytesTotal())
  9.                 else ready = 0
  10.                 createTextField("prozent",3,237,183,100,100)
  11.                 prozent.autoSize = "left"
  12.                 balken.removeMovieClip()
  13.                 balken = createEmptyMovieClip("balken",10)
  14.                 prozent.text = "Load_pic_"+ready+"_%"
  15.                 var faktor = prozent._width/99
  16.                 with (balken) {
  17.                         _x = 237
  18.                         _y = 200
  19.                         lineStyle(2,0x999999,100)
  20.                         moveTo (0,0)
  21.                         lineTo (ready*faktor,0)
  22.                 }
  23.                 if (ready >= 99) {
  24.                         rechteck.wabber(.5,pic._width+10,pic._height+10,.7);
  25.                         if(rechteck._width-10==pic._width){
  26.                         balken.removeMovieClip()
  27.                         prozent.removeTextField();
  28.                         pic._x=275-pic._width/2;
  29.                         pic._y=200-pic._height/2;
  30.                         button._x=275-pic._width/2-5;
  31.                         button._y=200-pic._height/2-5;
  32.                         button._visible=true;
  33.                         pic._alpha=100;
  34.                         pic._visible = true
  35.                         if (index >2){
  36.                                 this.handlerObj = (!hObj) ? this._parent : hObj;
  37.                                 this.toHandel = handler;
  38.                                 this.handlerObj[this.toHandel](this);
  39.                                 delete index
  40.                                 delete crt.onEnterFrame
  41.                                 crt.removeMovieClip()
  42.                         }
  43.                         index++
  44.                         }
  45.                 }
  46.         }
  47. }
  48. MovieClip.prototype.wabber = function(multiplikator,xskal,yskal,ratio){
  49.     sX=Number(sX*multiplikator)+Number((xskal-rechteck._width)*ratio);
  50.     sY=Number(sY*multiplikator)+Number((yskal-rechteck._height)*ratio);
  51.     rechteck._width+=sX;
  52.     rechteck._height+=sY;
  53. };
__________________
Life is Pain
FlasherTyp ist offline   Mit Zitat antworten
Alt 19-02-2004, 13:03   #2 (permalink)
Kreativer Kopf
 
Benutzerbild von FlasherTyp
 
Registriert seit: Mar 2002
Ort: Darmstadt / Hessen
Beiträge: 1.120
hier mal das ganze fla...
Angehängte Dateien
Dateityp: zip rechteck_wabber.zip (5,6 KB, 12x aufgerufen)
__________________
Life is Pain
FlasherTyp ist offline   Mit Zitat antworten
Alt 19-02-2004, 16:47   #3 (permalink)
Kreativer Kopf
 
Benutzerbild von FlasherTyp
 
Registriert seit: Mar 2002
Ort: Darmstadt / Hessen
Beiträge: 1.120
ein Fehler ist auf jeden Fall drinne, ganz am Ende diese Flackern, wie bekomm ich das denn raus?
__________________
Life is Pain
FlasherTyp ist offline   Mit Zitat antworten
Alt 20-02-2004, 10:35   #4 (permalink)
Kreativer Kopf
 
Benutzerbild von FlasherTyp
 
Registriert seit: Mar 2002
Ort: Darmstadt / Hessen
Beiträge: 1.120
keiner ne idee wie ich das gebacken bekomme?
__________________
Life is Pain
FlasherTyp ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 21:16 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele