PDA

View Full Version : problems with percentage preloader tut


smirnie
09-06-2002, 09:11 AM
Hi,


I ve bee trying to create a preloading movie. I used this
tut:tutorial (http://www.actionscripts.org/tutorials/intermediate/flash5_preloaders/index.shtml)

I,ve been having some trouble though. I made up a new scene and moved it to the front of the movie (by choosing modify>scene and then simply dragging). I' ve made the layers as written in the tut and I also made the movieclip and put a stop in the first frame (by clikking the first frame and selecting actions>basic>stop). I've than created the dynamic text fields. and gave them the names as written in the tut (by enterring the name in the lower text field of the text actions menu).

I think all this is correct (is it?) so the problem has to be within the script. (where else).

this is the script as I put it in the first frame of my scripts layer:

total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);
bar.gotoAndStop(percent_done);
ifFrameLoaded ("Scene 1", 82) {
gotoAndStop ("Scene 1", 1);
}


"scene 1" is the scene that has to be preloaded and frame 82 is the last frame oh that scene.

I think I'll have to make some kind of a reference to the file it has to preload. The movie's name is webflash2.swf end consist oput of to scenes: scene 1 being the actual web and scene 2 being the preloading scene.

I'd apprecaite it very much if somebody could help me out. I've been struggling with it for quite a bit. I don't have lot of experience with Flash u see.

Jesse
09-06-2002, 11:32 AM
The code in the tute works fine... I think your implimentation might have a problem somewhere, but from the way you described it, it sounds OK... What about it doesn't work exactly? Keep in mind you will have to use the 'Show Streaming' option to see the preloader work when running the file locally, as it just loads instantaneously otherwise.

smirnie
09-06-2002, 11:39 AM
show streaming? I can't find that. Is it an MX feature? Maybe that's the problme. I'm working with Flash 5.

The problem is that he doesn't show the status of the downloading. ( percentage, total syze, etc...) and he doesn't load the second scene.

Jesse
09-07-2002, 10:01 AM
In Flash go Control > Test Movie, then View > Show Streaming.

smirnie
09-12-2002, 08:06 AM
I did check and it doesn't work. Everything works fine but he doesn't load the stats. I'm guessing I didn't name the dynamic text fields wright. How do I do this properly?

Sorry, for this simple questions but realy new to the game.
:o

spazmaster
09-12-2002, 10:51 AM
go to Window>Instance

now select the dynamic textfields, and insert a name in the Intsnace panel for the textfield. voila! :)

smirnie
09-12-2002, 11:42 AM
OK you're working with a real dummy over here. :o

When I select one of the dynamic text fields and go to "instance" everything is blocked in the instance-window. I' ve now named them in the box at the bootm of the textoptions-menu.

I can feel with my toes this isn't correct so please help.

:(

tacall
09-23-2002, 09:53 PM
I also have just finished using the percentage preloader tutorial. I have even compared the downloadable package to my own completed version. Everything is exactly the same.

The only problem is, when testing, the loading bar just runs across, not timed with the simulated loading at 56k. I did place the " bar.stop (); " in frame one as instructed.

I double and triple checked the coding in frame 1 of scene 1, even copy/pasted from the tut and the sample, same problem. The dynamic text works fine, as well as completely loading then displaying properly. The only problem is the bar.

Please help?

Todd

spazmaster
09-24-2002, 06:39 AM
you using 100 frames in the bar MC?

tacall
09-24-2002, 04:47 PM
After looking through several other online tutorials on the same subject, I finally saw something that did not look familiar.

After placing the bar MC (yes, 100 frames) on the stage, I forgot to name it 'bar' in the object inspector (i think that's what the instance panel is called).

Should be fine now, except I noticed the first time I tested it, the bar jumped out about 25%, then came back to '0' and tracked with the percentage just fine.

Cheers,
Todd