| droopy.ro 2006-02-20, 3:26 am |
| i hope that you have some vague experience in flash(at least).
you first draw a rectangle on the first frame of a movie. you select it and
make it a movieclip(watch it, on the grid which appears when you conver it into
a movie clip, select the upper left corner). ok, in the properties, on left,
name the instance "preload".
now you have to write down the instance's width. then you resize it to 1
pixel(the width). then in the actions of the same frame(you can add another
layer, but this should still be in the first frame) add the next code:
BE CAREFUL: replace "the_width" with the width you wrote down!!!
totalSize = _root.getBytesTotal();
loadedSize = _root.getBytesLoaded();
bara._width = the_width * loadedSize / totalSize;
if (totalSize == loadedSize) {
gotoAndPlay(5);
}
else {
gotoAndPlay(1);
}
when everything will be loaded, the movie will start plaing from the 5th
frame(, you can change that).
|