So I would put your script above the script I have in my first post? What else do I need to do to make it work (besides change the “yourimage.jpg” to my file?
your script
this.createEmptyMovieClip(“preloader”, 1000);
this.createEmptyMovieClip(“container”, 1001);
container.loadMovie(“yourImage.jpg”);
container._visible = false;
preloader.onEnterFrame = function() {
var l = container.getBytesLoaded();
var t = container.getBytesTotal();
var getPercent = l/t;
loadText = Math.round(getPercent100)+"%";
loadBar._width = getPercent100;
if (l>0 && l>=t) {
container._visible = 1;
delete this.onEnterFrame;
}
};
Sidenote: If you want to use a button symbol instead of a movieclip symbol remove this code from the above script…
[AS]button.onPress = function() {
container.loadMovie(“zz1.jpg”);
};[/AS]
And on your button symbol add this code…
[AS]on (release) {
container.loadMovie(“zz1.jpg”);
}[/AS]
Creating engaging and entertaining content for designers and developers since 1998.