I have several scenes and want a scene at the beginning of everything with a preloader that will load every scene. Everything that I seem to find online explains how to load one scene or go to certain frames. How do I make a preloader to load all my scenes right away? I would love any help at all.
Make them all one movie and put your preloader at the beginning
This is probably a dumb question but I’m still really new to flash and not sure how to do that, make all my scenes a movie.
I know I shouldn’t expect an answer right away but trying to figure it out right now, so if you know anything that can help at all I would be so happy.
this can maybe help you:
this.onEnterFrame = function() {
totaal = this.getBytesTotal();
geladen = this.getBytesLoaded();
if (geladen >= totaal) {
delete this.onEnterFrame;
this.nextframe();
play();
}
};
stop();
i hope that this is what you are looking for, let me know, thank you
there are a number of options. the easiest one is the ask flash to wait until the last frame in the last scene is loaded before it should continue…
make a new scene (top of the list). lets say you want to make a little loading loop of 10 frames…
on frame one place the following script:
ifFrameLoaded (“lastScene”, 30) {
//lastScene - replace with your last scene name
//30 - replace with the number of your last frame in your last scene
gotoAndPlay(“firstScene”, 1);
//replace firstScene with your first scene name (not the preloader scene)
//1 - first frame
}
on frame 10 you will create a loop:
gotoAndPlay(1);
//plays frame one of the current scene (the preloader)
on frame on it will check to see if the last frame has been loaded, if not it will continue… on frame 10 it goes back to frame one and checks again… until the last frame has been loaded and then it will play your first scene…
if you test this you will have to press “ctrl enter” (“command return” if you are using a mac), and then “ctrl enter” again to view it in streaming… you can also press “ctrl b” to view the bandwidth profiler…
hope that helps you a bit… for a more acurate preloader you will need to code some more. i have some code to make a percentage bar that will move according to the file side… if you are interested.
markcq
I think I might have it figured out, but how do put an attachment on a post so if any of you feel like checking out what I have you can tell me if I did it right or maybe fix what I did wrong.
So yeah, thanks to everyone that tried to help, but I decided to not put a preloader on my site, after messing with it for 2 days I sort of gave up. Maybe my next site I’lll try again with a preloader.
man preloaders are easy email me your project
dave@graphicsgeeks.com
oh and btw don’t give up !!!
preloaders are the easiest thing… you can mail it to me too. i can even give you 3 variations…
besides, i believe that no matter how small the flash file you MUST have a preloader… at least people know they have to wait… ok great if they have a nice fast computer it might not need it… better safe than sorry…
markcq, tired to send it but says it’s too large to send, 14.2MB. If you still at least want to see it it’s at art.nmu.edu/student_web/dan_trippler
copy this all into your preloader scene…
preloader scene only needs to be one frame, and don’t forget the stop(); function to make it wait…
let the actionscript do the rest…
you can change the bar color, just edit the MC
hope this helps a bit
how do i add an attachment to my post
click the post reply button…
scroll down a little bit till you see “attach file:”
take note there is a 102400 bytes size limit…
well I ended up using this code and it works.
percent = Math.round((_root.getBytesLoaded()/_root.getBytesTotal())*100);
percentage = percent;
setProperty(_root.loadbar, _xscale, (_root.getBytesLoaded()/_root.getBytesTotal())*100);
and
if (_root.getBytesLoaded() != _root.getBytesTotal()) {
gotoAndPlay(1);
} else {
gotoAndPlay(“main page”, 1);
}
art.nmu.edu/student_web/dan_trippler
thank you to everyone that tried to help