• Born
• Posts: 3

3+ Months Ago

can anyone help me.... i'm still new to flash things ....
here my problem
> i having a flash web design project .... and i planning to do a loading bar page.... how i do that and how to load from loading page to intro page than my main page ...?

sry my English abit suck but hope u all can help me please
• Director of Art
• Posts: 776
• Loc: California, Fresno.

3+ Months Ago

Well I dont know how others do it but here's how I do.

Code: [ Select ]
// math formula for converting bytes into kb and finding the percentage between loaded and total

b = getBytesTotal();

// equals percent

c = ((a/1024)*100)/(b/1024);

if (a==b) {
nextScene();
}

// or gotoAndPlay(scene, 1);

//This controls the progress bar

setProperty (progressbar.bar, _x, c)
1. // math formula for converting bytes into kb and finding the percentage between loaded and total
3. b = getBytesTotal();
4. // equals percent
5. c = ((a/1024)*100)/(b/1024);
6. if (a==b) {
7. nextScene();
8. }
9. // or gotoAndPlay(scene, 1);
10. //This controls the progress bar
11. setProperty (progressbar.bar, _x, c)

Thats all there is to it as far as scripting goes. Simple, huh?

- Now creat a movie clip (instance name: progressbar) and inside it make your progress bar with a width of 100px and set the x value position to 0(zero).
- Duplicate the layer.
- Set the top layer to mask by right clicking and selecting mask from the options.
- On the top layer set the x value position of the bar mask to 100.
- Convert the bar to a movie clip and give it an instance name of bar.
- Done.

Basically what is going on is; the variable c is counting from 0-100
so the script is going to make sure that the _x value of the bar stays equal to c thereby causing the position of the bar to move smoothly from 0-100

Please note: I wrote this lil tut without refering to my Flash App so if I left out anything...Just holla, peace.
• Born
• Posts: 3

3+ Months Ago

sry hor sound easy but i hardly understand:P.... got any screen shot or anything
• Guru
• Posts: 1252
• Loc: Ro

3+ Months Ago

i got another suggestion: learn flash first, come ask later.
• Born
• Posts: 3

3+ Months Ago

• Guru
• Posts: 1252
• Loc: Ro

3+ Months Ago

go to actionscript.org or kirupa.com. They have nice samples about preloaders and progress bars. Or simple google for "flash create preloader with progress bar"

## Post Information

• Total Posts in this topic: 6 posts
• Users browsing this forum: No registered users and 6 guests
• You cannot post new topics in this forum
• You cannot reply to topics in this forum
• You cannot edit your posts in this forum
• You cannot delete your posts in this forum
• You cannot post attachments in this forum