-
preloader starts playing swf before..why?
hi there...
i have made an swf intro for my website and it is synchronised with the music... the swf works perfectly without a preloader and is also synchronised...
then when i put the preloader .. as soon as it reaches 75%, the swf will start playing and whats worse it plays slower hence it will not remain synchronised with the music...
any help?
thanks a lot mates
-
Senior Member
how does your preloader work?
"If I have seen further it is by standing on the shoulders of giants." Isaac Newton
------------------------------------------------------------------------------
-
Hi sry for responding late but u was away for a few days...
So my preloader is a symbol placed on a separate layer starting from frame 1, then at frame 10 the actual flash movie starts.
Double clicking on the symbol will reveal 4 frames and a lot other layers (used for the animation of the preloader - i dont have a problem with that, animation works perfectly) .. now the top four frames (where one can find the action script) is something like this (some of the action script refers to the animation):
Frame 1 :
total = _root.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;
};
Frame 2 :
percent = int((_root.getBytesLoaded()/total)*100);
if (percent<10) {
cPercent = "00"+percent;
} else if (percent<100) {
cPercent = "0"+percent;
} else {
cPercent = percent;
}
todo = total-_root.getBytesLoaded();
if (todo<10) {
todo = "";
}
done = _root.getBytesLoaded();
if (done == total) {
done = "Completely Loaded";
}
r.beginFill(0x000000, 100);
r.drawCircle(100, 0, (percent*2.7), 100);
r.endFill();
Frame 3 :
if (percent>=_root.getBytesTotal()) {
_root.gotoAndPlay(20);
} else {
gotoAndPlay(_currentframe-1);
}
Frame 4 :
stop();
any ideas?
Thanks for your help!
-
preloader starts playing swf before..why? [still no solution!!pls help! :) ]
btw, i dont know if it has something to do with the preloader but the swf pays a little slower but when played without loading the swf is synchronised with the music, but when loaded the swf is slower and hence is not synchronised :\ ...
thanks a lot
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|