I have a mc that I’ve made and want to use as the display for my preloader. It is 16 frames long. This is the as I have on that mc:
onClipEvent (load) {
_root.stop();
ft = int(_root.getBytesTotal()/1024);
}
onClipEvent (enterFrame) {
fl = int(_root.getBytesLoaded()/1024);
decimal = fl/ft;
percent = Math.round(decimal*100)
whatframe = Math.round(percent/16)
this.gotoAndStop(whatframe)
_root.loadingtext = percent +"%";
if (fl == ft) {
_root.gotoAndPlay(_currentframe+1);
play();
}
}
It doesn’t seem to be working at this point in time, so I’m wondering what I’m doing wrong. I think the problem lies in this code:
this.gotoAndStop(whatframe)
My guess is that gotoAndStop is looking for a frame name or number, but I don’t know how to make it accept the function as pointing to the frame number. Any tips?
Anyone know what I’m doing wrong?
I’m having this problem too, I decided to use an MP3 as the display for my preloader.
^^ I’m just kidding, but this is what your question sounds like. What is in this mystery clip? a preloader? some animation of a beaver? Is it even capable of representing the percentage? or do you just want it to loop over and over until the page loads?
Yer gonna have to post some more info on just exactly what you want to do.
Basically, rather than having a boring bar scaling to display how much is loaded, I made a mc. It has 16 frames, and on each one a ring scales out from the center and elastically bounces into place. So you end up with 16 rings on the last frame, which coincides with 100%.
The whole point I think pertains to more than just my specific mc, which is why I didn’t post any details of how the mc worked. I just want to be able to display more interesting content than a bar to display how much of the page has loaded. Whether that be my rings bouncing out from the center, a picture being drawn, or whatever else I can dream up, I just want to know the concept behind how to do it, however I have to specifically apply it.
As I said, I think I know where the problem is - gotoAndStop wants a frame number or name, not a function - I just don’t know how to work around this.
So with all that said, can anyone offer any help? Would it help if I posted an fla with an example of what I’m trying to do? As I said, this question to me seems more conceptual in nature, rather than needing the specific application of it. But if I need to post it, I will.
I know this has to be possible… Is there something I need to explain better? Or is this so basic it’s not worth the time to answer? Help please!
I might as well try bumping this one more time… I really need help. 
I still need an answer to this. Am I going about this completely wrong?