Hi,
Lade externe .jps in ein array incl. preloader. -> Funktioniert alles
Habe folgendes Problem: Wie schaff ich es, das sich die .jps nacheinander laden,
(zb.: erstes .jpg = 100% gehe dann zum zweiten usw..)
und nicht alle gleichzeitig.
CODE:
MovieClip.prototype.fadeIn = function(end) {
this.onEnterFrame = function() {
if (this._alpha<end) {
this._alpha += 15;
} else {
delete this.onEnterFrame;
}
};
};
MovieClip.prototype.loading = function(fotos) {
this.createEmptyMovieClip("content_mc", 1);
this.content_mc.loadMovie(fotos);
this.createEmptyMovieClip("display_mc", 2);
this.display_mc._x = 0;
this.display_mc._y = 0;
this.display_mc.createTextField("display_txt", 2, 0, 0, 40, 16);
this.display_mc.preFormat = new TextFormat();
this.display_mc.preFormat.bold = false;
this.display_mc.preFormat.font = "Verdana";
this.display_mc.preFormat.size = 9;
this.display_mc.display_txt.selectable = false;
this.display_mc.display_txt.setNewTextFormat(this.display_mc.preFormat);
this.display_mc.onEnterFrame = function() {
if (this._parent.content_mc.getBytesTotal() != undefined && this._parent.content_mc.getBytesTotal()>4) {
this.gesamt = this._parent.content_mc.getBytesTotal();
this.geladen = this._parent.content_mc.getBytesLoaded();
this.prozent = Math.round(this.geladen*100/this.gesamt);
this.display_txt.text = this.prozent+" %";
if (this.prozent == 100) {
var i = 0;
this.onEnterFrame = function() {
if (i<anzahl) {
this._parent._parent._parent["test_"+i].prPicHolder.display_mc.unloadMovie();
this._parent._parent._parent["test_"+i].prPicHolder.fadeIn(100);
delete this.gesamt;
delete this.geladen;
delete this.prozent;
i++;
}
};
}
}
};
};
MovieClip.prototype.createPrPic = function(inHor, inVer) {
var abstandX = 50;
var abstandY = 80;
anzahl = inHor*inVer;
var inX = inY=0;
var i = 0;
this.onEnterFrame = function() {
if (i<anzahl) {
var thPic = this.attachMovie("test", "test_"+i, i);
thPic.prPicHolder.loading("bilder/"+i+".jpg");
thPic.prPicHolder._alpha = 0;
thPic.prPicHolder.content_mc._yscale = 20;
thPic.prPicHolder.content_mc._xscale = 20;
thPic._x = abstandX*inX;
thPic._y = abstandY*inY;
if (inX<inHor-1) {
inX++;
} else {
inX = 0;
inY++;
}
i++;
thPic.nr = (i);
thPic.onPress = function() {
big.loadMovie("bilder/"+this.nr+".jpg");
trace("bilder/"+this.nr+".jpg");
};
}
};
};
a.createPrPic(3, 3);
Hoffe ich hab mich verständlich ausgedrückt,
und würde mich über Tipps freuen.
lg
loup
Lade externe .jps in ein array incl. preloader. -> Funktioniert alles
Habe folgendes Problem: Wie schaff ich es, das sich die .jps nacheinander laden,
(zb.: erstes .jpg = 100% gehe dann zum zweiten usw..)
und nicht alle gleichzeitig.
CODE:
MovieClip.prototype.fadeIn = function(end) {
this.onEnterFrame = function() {
if (this._alpha<end) {
this._alpha += 15;
} else {
delete this.onEnterFrame;
}
};
};
MovieClip.prototype.loading = function(fotos) {
this.createEmptyMovieClip("content_mc", 1);
this.content_mc.loadMovie(fotos);
this.createEmptyMovieClip("display_mc", 2);
this.display_mc._x = 0;
this.display_mc._y = 0;
this.display_mc.createTextField("display_txt", 2, 0, 0, 40, 16);
this.display_mc.preFormat = new TextFormat();
this.display_mc.preFormat.bold = false;
this.display_mc.preFormat.font = "Verdana";
this.display_mc.preFormat.size = 9;
this.display_mc.display_txt.selectable = false;
this.display_mc.display_txt.setNewTextFormat(this.display_mc.preFormat);
this.display_mc.onEnterFrame = function() {
if (this._parent.content_mc.getBytesTotal() != undefined && this._parent.content_mc.getBytesTotal()>4) {
this.gesamt = this._parent.content_mc.getBytesTotal();
this.geladen = this._parent.content_mc.getBytesLoaded();
this.prozent = Math.round(this.geladen*100/this.gesamt);
this.display_txt.text = this.prozent+" %";
if (this.prozent == 100) {
var i = 0;
this.onEnterFrame = function() {
if (i<anzahl) {
this._parent._parent._parent["test_"+i].prPicHolder.display_mc.unloadMovie();
this._parent._parent._parent["test_"+i].prPicHolder.fadeIn(100);
delete this.gesamt;
delete this.geladen;
delete this.prozent;
i++;
}
};
}
}
};
};
MovieClip.prototype.createPrPic = function(inHor, inVer) {
var abstandX = 50;
var abstandY = 80;
anzahl = inHor*inVer;
var inX = inY=0;
var i = 0;
this.onEnterFrame = function() {
if (i<anzahl) {
var thPic = this.attachMovie("test", "test_"+i, i);
thPic.prPicHolder.loading("bilder/"+i+".jpg");
thPic.prPicHolder._alpha = 0;
thPic.prPicHolder.content_mc._yscale = 20;
thPic.prPicHolder.content_mc._xscale = 20;
thPic._x = abstandX*inX;
thPic._y = abstandY*inY;
if (inX<inHor-1) {
inX++;
} else {
inX = 0;
inY++;
}
i++;
thPic.nr = (i);
thPic.onPress = function() {
big.loadMovie("bilder/"+this.nr+".jpg");
trace("bilder/"+this.nr+".jpg");
};
}
};
};
a.createPrPic(3, 3);
Hoffe ich hab mich verständlich ausgedrückt,
und würde mich über Tipps freuen.
lg
loup