How can i make a preloader that says how many percent and how many bytes he has downloaded from the whole ‘movie’

vb…

79 percent

20KB/2000kB?

POlease help me

THNX:-\

How can i make a preloader that says how many percent and how many bytes he has downloaded from the whole ‘movie’

vb…

79 percent

20KB/2000kB?

POlease help me

THNX:-\

Define 2 variables

_root.loaded=_root.getBytesLoaded()

_root.total=_root.getBytesTotal()

then

_root.percentLoaded=(loaded/total)*100

Obviously, that will only perform the calculation once so you’ll need to make a loop use the following code in two subsequent frames of your preLoader

(place on first frame)

_root.loaded=_root.getBytesLoaded()

_root.total=_root.getBytesTotal()

_root.percentLoaded=(_root.loaded/_root.total)*100

(place on second frame)

if (_root.percentLoaded<100) {

gotoAndPlay(_currentFrame-1);

} else {

gotoAndPlay(“start”);

}

where start is the first frame of your movie

The _root means that this snippet of code will work inside a MC that isn’t on the main timeline - if you’re evaluating percentLoaded on the main timeline, then you can dispense with the _root.

To display the variable percentLoaded - define a dynamic text field with the varible name _root.percentLoaded

There’s probably a tutorial that explains this bettter with examples - some one will post the link, I’m sure.

Hey Deev,

Take a look at this I hope it helps, its a working preloader that hopefully covers what you was asking for:bandit:

Whoops, here it is:bandit:

i hope no 1’s asked it, but for the preloader, how do u get the like percentage baR?

" 90%

||||||||||||||||||||||||||||||||||| |" -kinda like thiss…

Hi J0ng,

Is this the sort of thing you was after:bandit:

yep! thx, but hahaa… its been like 15 mins n i’m still figurin it ouT 10x still!

Hey J0ng,

I’m not sure how far you got with the last progress bar I sent so here is a simplified version, I think you’ll find this one much easier to understand:bandit:

thX duDe! such a kinD souL