all groups > flash (macromedia) > august 2005 >
You're in the

flash (macromedia)

group:

adding preloader within the index.swf?


Re: adding preloader within the index.swf? mnlopez3 NO[at]SPAM gmail.com
8/25/2005 6:45:06 PM
flash (macromedia):
Maybe you should try to load home.swf and index.swf within another
*.swf.
Make a swf that will contain both files on different layers. Make sure
that index.swf load first and place it on the upper-layer. While
index.swf is playing you can let home.swf load in the background.

try this site
http://www.kirupa.com/
they have a lot of tutorials and a good forum
adding preloader within the index.swf? dcowart
8/25/2005 10:45:07 PM
Hi,
i've made a flash website, with the index page being the intro movie, which
then directs you to the home.swf. My problem is that the home page is taking to
long to load. I'm wanting to add a preloader into the intro (index.swf) movie.
I'd like for this to all happen in the background and don't care to have a
progess bar. I've tried searching for the solution, but most topics seem to
cover the progess bar. In the help box it talks about making a seperate file
without screens--what?! Any help would be greatly appreciated...thanks
Re: adding preloader within the index.swf? urami_
8/26/2005 12:00:00 AM


[quoted text, click to view]

Well, you must open the movie first to start to load it, you can't have it invisible in the
background. Than what kind of preloader you are looking for ?
Something must indicate the loading progress, do you have anything particular in mind ?



--
Regards

Urami

--


<urami>
http://www.Flashfugitive.com
</urami>

<web junk free>
http://www.firefox.com
Re: adding preloader within the index.swf? dcowart
8/26/2005 12:00:00 AM
thanks for the quick response. i was hoping it would be possible to load one
file while the other movie was playing, but from what you said i see this isnt
possible. I really just want something simple, like a bar. So to add the
preloader, i would simply add this to the first frame of the second (home.swf)
file?
Re: adding preloader within the index.swf? urami_
8/26/2005 12:00:00 AM


[quoted text, click to view]

Misunderstanding or I just wasn't to clear, sorry

If you run both movies in same html, you can preloader the second while the first one is running.
You just load the second movie into a level of the first movie while it is running.
Keep it some stop(); action to prevent it from playing, than once you first movie is done
you can call the second one using (assuming you loaded it in level 1)
_level1.play();
or say you want to start the second movie from frame with label name than :

_level1.gotoAndPlay("labelNameHere");


You can't preloader SWF which is on the server and run in different html, like
index.swf is located in index.html and once it's done playing it calls second.swf in second.html.
This can not be preloaded.

[quoted text, click to view]

The easiest bar I could think of would be one small movie clip with shape tween covering 100 frames.
Frame 1 tiny bit of shape and stop(); action, than on frame 100 large bar than in between these
frames shape tween. To simulate the size increase.
Than a little action that would progress that movie clip shape tween as the bytes get loaded.
select the clip and hit F9 to open action editor, than paste :

onClipEvent (load) {
_root.stop();
}
onClipEvent (enterFrame) {
shape = Math.floor((_root.getBytesLoaded()*100)/_root.getBytesTotal());
gotoAndStop(shape);
if (shape == 100) {
_root.play();
}
}

It will stop the timeline and compare bytes loaded versus bytes total
than progress the movie clip accordingly and one the clip reach 100 frames it will
play the timeline.
You can replace the _root.play() with whatever you want it to go to after the loading.


--
Regards

Urami

--


<urami>
http://www.Flashfugitive.com
</urami>

<web junk free>
http://www.firefox.com
Re: adding preloader within the index.swf? dcowart
9/7/2005 12:00:00 AM
worked like a charm!


AddThis Social Bookmark Button