We make a nice movie to import the progress bar.
First look at the effect.
Prepare a Picture:
Then import to the stage, select the diagram with the mouse, and then open the Alignment panel, set as follows.
Then press F8 to convert to the movie clip symbol, named PICTURE_INSIDE_MC. Then press CTRL+J to modify the document properties.
Then press Ctrl+f8 to create a PICTURE_MC movie clip symbol, start editing the movie clip symbol, and set the alpha value of the picture (PICTURE_INSIDE_MC) to 35%. Then extend the frame to 100 frames. Then create a layer, put the PICTURE_INSIDE_MC on the layer, extend to 100 frames, and then create a layer to make a black rectangular picture element, so that it moves from left to right to cover the PICTURE_INSIDE_MC shape, and then make a mask, Finally, create a layer, make progress bar text display.
The progress bar text is set as follows.
Then set two layers in the home scene, the following layer puts the PICTURE_MC movie clip symbol, and adds an action to the first frame, the top layer, the first frame is a blank keyframe, and frame 2nd adds the same action:
Stop ();
Then select PICTURE_MC Movie clip symbol, open the action panel, and add the following action.
Onclipevent (load) {
Total = _root.getbytestotal ();
} onclipevent (Enterframe) {
loaded = _root.getbytesloaded ();
percent = Int (loaded/total*100);
Percen1 = "" +percent+ "%";
gotoAndStop (percent);
if (loaded = total) {
_root.gotoandplay (2);
}
}
You can test it!