I need a simple preloader for a single picture.

The problem is that I use

[update preloader code]

I need the size of the pic and the number of bytes loaded.

I tried mypic.getbytesloaded and mypic.getbytestotal but they don't seem to work since getbytes.. refer to the main static movie .

Also I do not know if I have to place the update for the preloader in a clipevent(enterframe) on main movie or on the ondata.

I just need to pass name of pic to a swf and I need it to load that pic with a simple preloader progress bar similar to the front pages loads found newseum site.

The preloader is easily implemented when the picture is already in the movie. ie. not dinamically loaded but I need it for dynamically loaded pictures whose name is passed to the .swf via parameters.