ok, nel primo frame del mc MCPreloader che si trova all'interno del mc prova:
total = _root.prova.getBytesTotal();
r = EmptyMC.createEmptyMovieClip ("m", 1);
r.lineStyle (1, 0x000000, 100);
MovieClip.prototype.drawCircle = function (segs, sw, w, rad)
{
var w = w + sw;
var teilW = (w - sw) / segs;
for (var i = 0; i <= segs; i++)
{
var nextWinkel_x = Math.cos ((teilW * i) * Math.PI / 180) * rad;
var nextWinkel_y = Math.sin ((teilW * i) * Math.PI / 180) * rad;
this.lineTo (nextWinkel_x, nextWinkel_y);
}
this.lineTo (0, 0);
this._rotation = sw;
};
nel secondo frame:
percent = int((_root.prova.getBytesLoaded()/total)*100);
if (percent<10) {cPercent = "00"+percent;}
else if (percent<100) {cPercent = "0"+percent;}
else cPercent=percent;
todo=total-_root.prova.getBytesLoaded();
if (todo<10) todo='';
done=_root.prova.getBytesLoaded();
if (done==total) done='caricato';
r.beginFill(0x000000, 100)
r.drawCircle (100, 0, (percent*2.7), 100);
r.endFill();
nel terzo frame:
if (percent>=100) {
_root.prova.gotoAndPlay(10);
} else {
gotoAndPlay(_currentframe-1);
}
nel quarto frame:
stop();
poi nel mc prova ho al primo frame:
t=60;
t2=100;
secondo:
if (t<>100)
{
t=t+10;
_root.prova.MCPreloader._alpha = t;
}
else if (t2<>40)
{
t2=t2-10;
_root.prova.MCPreloader._alpha = t2;
}
else
{
t=40;
t2=100;
}
terzo frame:
gotoAndPlay(_currentframe-1);

Rispondi quotando