hi
I’m trying to implement a pie preloader using the actionscript below.
But although the preloader functionality is working - the script isn’t moving teh timeline to the 2nd frame and the content. I can’t see anywhere any the script that control this.
Grateful for any ideas
Thanx
Dirk
onClipEvent(load)
{
_root.stop();
dO = 3.6;
r = 10;
function addSlice(O)
{
x1 = rMath.sin(OMath.PI/180);
x2 = r*Math.sin((O+dO)Math.PI/180);
y1 = rMath.cos((O)Math.PI/180);
y2 = rMath.cos((O+dO)*Math.PI/180);
trace(x1 + “:” + y1);
with(_root.mask)
{
moveTo(0,0);
beginFill(0x999999);
lineTo(x1,y1);
lineTo(x2,y2);
endFill();
}
}
_root.createEmptyMovieClip(“mask”,0);
this.setMask(_root.mask);
_root.mask._yscale = -100;
_root.mask._x = this._x;
_root.mask._y = this._y;
oldLoaded = 0;
}
onClipEvent(enterFrame)
{
loaded = Math.ceil(_root.getBytesLoaded()/_root.getBytesTotal()100);
for(i = oldLoaded; i < loaded; i++)
{
addSlice(dOi);
}
oldLoaded = loaded;
}