all groups > macromedia flash sitedesign > january 2005 >
You're in the

macromedia flash sitedesign

group:

Complex preloaders and background mp3 control


Complex preloaders and background mp3 control Dragnods
1/11/2005 1:36:54 PM
macromedia flash sitedesign:
HI am new here.. :)

I am trying to make a very ambitious flash website that i want to have a
preloader that will display for the loading of the first page (or scene) and
keep loading the other pages while the user is still looking at the first page
(to save time for when they click on the links to the other pages or scenes).

Ideally i would like to make the site so that if they click on one of the
other pages (that has not completed the hidden loading yet) it displays another
preloader with its particular progress....

This may not be that important..

The reason I am thinking about having the full site within one flash file is
because I am trying to make a site that has an in built mp3 player that I can
have on all the pages and have the site keep on playing the selected song while
they go to another page or scene within the site..

If there is simply a way to start a song and have it keep playing in the
background when they leave the page and still be able to stop it with the
player on the next (flash within html) page, this might be an easier solution.
I am interested in both..

I guess you would call it:
hidden loading and/or background mp3 playing/controling...

I am not familiar with components (if they are involved).

I hope this is a clear question.. I apologize if not.

I would appreciate any help on either topic alot.

thanks..







Re: Complex preloaders lowbid
1/11/2005 9:47:09 PM
You will have to do this in steps.
In first preloader you would direct the movie to play when the first page is
loaded. It will display as soon as the specified frame of this particular page
is loaded. (obviously make sure this first page is placed in first place on
your time line) In Flash, the rest of the movie continues on loading. If now,
someone clicks on the navigational button which takes them to another page you
should in the firs/2nd frame of this page create another preloader which
displays the page when the specified frame by you is loaded. If the page is
already loaded, because enough time was spent on the first page, then obviously
flash will by pass the preloader. And so on. Make sure these pages are placed
on the time line in the most logical sequence you would anticipate the user to
move through your site. If you think the page with ?Contacts? will be the last
page visited by the user then make sure this page is last on your time line
since flash loads from first to the last frame.
I hope this makes sense?

Here is a site I made many years ago which uses this type of multiple
preloaders.
I elected to show on the first page which pages are already loaded but it
isn?t necessary.

http://www.pavingmaterials.com/

Re: Complex preloaders Dragnods
1/15/2005 2:10:39 PM
Thanks for the answer...

Could you please go into more detail about how to do this...

I think i have a small idea how to do it, but am finding it challenging to
understand..

I have had a look at your site..

If you have any code that I could use I would be very appreciative (even just
some simple preloader code as mine is not working)...

I have a time limit on this project so again I will be very glad to recieve
any help.

Thanks alot :)
adam


Re: Complex preloaders Dragnods
1/15/2005 9:27:04 PM
never mind...
I have figured some of it out and am going to start a new forum,
Re: Complex preloaders lowbid
1/19/2005 7:28:44 PM
Sorry I haven?t checked this forum in a couple of days but if you still need
help let me know and I can create a simple movie and let you have the fla
format for review.
Just let me know if you still need help.

Re: Complex preloaders Dragnods
1/20/2005 4:43:54 PM
Thanks heaps lowbid..

I posted the same problem with a little more specifics in another forum...
I was'nt sure if you would return to answer any questions as I am new here and
thought it would be the best way to get a quick answer...

I still would like some help and here is the bulk of what i posted :

[
My original post was asking how to create a complex pre loader that would load
the first page wanted (within the flash file),
and while they are browsing the first page, continue to load the other pages
(or scenes) in the background, showing another preloader for when they click on
that page (with its loading progress)..

I still want to know how to do this, however I have realized that if i force
pages to load in a certain order then, they will have probelms if they want to
view the site a different way (different order).

The Site i am making should end up being around 1 meg (with around 5 main,
heavily animated pages), and I want to find the best way to present it and
cater to slow connections as I will also be streaming mp3's while they are
browsing.

Ideally I would like to:
a) have a preloader load the first page and have it displayed.
b) have it then continue to load other pages in an order of my choice, to save
them time...
c) If they click on the page that is still loading, have it display its
loading progress.
and finally
d) If they click another page, stop the other loading and begin loading that
page before the others....


This is beginning to seem not worth the effort, but if anyone does know how to
do something like this
(or close) please let me know...

I am relativley new to some things in flash and very good on the basic
animation/interaction side..
]


I thought about what you said and I get the basic gist of it... I assume the
code would involve the - IfFrameloaded - function right?
I am not familiar with this function or how to use it.

If you can give me code to do something that you described or (if possible)
the specifics i would like, I would be in debt....

Thanks again for helping...

Adam :)


Re: Complex preloaders lowbid
1/20/2005 8:44:36 PM
Ok I can help.
I am at work right now but tonight I will get back to this.

Re: Complex preloaders lowbid
1/20/2005 11:18:25 PM
First, I am not an expert? I played with flash for a couple of months about two
years ago and my knoledge is very limitted
2nd I am still using Flash 4:-( Keep this in mind when you read my instruction
because your version may look slightelly different.
I can answer all but one of your questions but I will do it in steps since it
will take some work. I am not sure about your question ?d? but we will deal
with it later.

Step One : Simple Preloader


I created a simple movie which displays two, very large photographs with a
little tween, to add to the movie size which we need to test the preloader:

http://miko.idy.pl/preloader1.swf

Here is where you can download the fla file


http://miko.idy.pl/preloader1.fla

If for some reason you can?t download it, just drop me an email:
lowbid@optonline.net


Layer 1 and 2 which I named pic#1 and pic#2 displays the pictures and this is
our simple movie which, because of the size of the graphics, will need a
preloader.

My preloader is on a separate layer which I named preloader.

This preloader in the first frame will check if frame # 75 is loaded and if it
is it will send the movie to frame number 10 which is the first frame of the
actual movie. (keep in mind that for simplicity I am checking the loading
status of frame # 75 which is the last frame of my movie. In reality this is
not recommended. You would specify a frame which would give the user something
to do while the rest is loading. For example, in your case, you want to show
the first page while all others are still loading)
If the frame 75 is not loaded the movie instantly moves to frame # 2. In frame
# 2 you write a simple code which sends the movie back to frame # 1 which will
again check the loading status of frame # 75. In effect you are creating a loop
between frame one and two until frame # 75 is loaded.

Here is how its done:

1.Create a key frame in the first frame of the preloader layer.
2. double click on this key frame which will open the Frame Properties window
3. From this window select Action Tab
4. Click on the + tab which will drop down a code/commend window
5. From the commend window select IF Frame IS Loaded commend
6. To the right select Number and enter 75 in the window. This specifies frame
which program will check to see if its loaded.
7. you are still in Frame Properties window. Your code should read:

If Frame Is Loaded (75)
End Frame Loaded

8. Click on the + tab again and from the drop down window select GO TO
9. On the right bottom select GO TO AND PLAY and on the right enter 10 which
specifies the frame you want the program to go to when frame 75 is loaded.

Your code should look like this:

If Frame Is Loaded (75)
Go to and Play (10)
End Frame Loaded

With this in place the program will check for the loading status of frame #
75. If 75 is loaded the preloader will move the movie to frame 10 which is the
beginning of the movie. If frame 75 is not loaded the preloader will do nothing
and the movie will instantly move forward to frame 2 then 3 ,4,/..5?? So what
we have to do is to stop it before it reaches the beginning of the movie.
Here is how:

1. Make the 2nd frame of the preloader layer a Key Frame.
2. double click on this key frame which will open the Frame Properties window
3. From this window select Action Tab
4. Click on the + tab which will drop down a code/commend window
5. Seelect GO TO then GO to and enter frame 1
Your code should look like this:

Go to and Play (1)

This is it!

One problem - if you stopped here the preloader will work but while the movie
is loading there wouldn?t be anything display on the screen.

I added on the layer above, which I called Preloader Graphic, a simple
animation which displays only in frame one and two, which means only during the
time the movie is loading.


Good luck with step #1:-)

Mike

Re: Complex preloaders lowbid
1/24/2005 2:13:32 PM
Re: Complex preloaders frustratedandconfused
1/25/2005 7:34:33 AM
What i would do is this...... VERY very VERY simple. And like most simple
things, it is massively tedious to explain: Each page would be a movie clip
symbol, located in the scene timline on their respective frame. At The
beginning of the main move you put a frames-based preloader. As I understand
it, the _framesloded read-only variable will tell you the number of frames
loaded of the timeline the order to retrieve it resides in. So for example, say
on your scene timeline you have 75 frames. On any given frame of those 75, you
have a movile clip of 25 frames. If you put the code: trace(_framesloaded);
into the actions of a keyframe in the scene, it will return 75 when fully
loaded. If you put the same code into a frame in the movieclip, it will return
25. This is because the scene has 75 frames, and the movieclip has 25. Thats a
fairly simple concept, but I just dont know how to explain it in short terms.
If you already understand that thing about framesloaded then my solution should
be very very clear and simple. Each page has its own frame and its own
movieclip. The scene will have its frame-based preloader; and so will each
movieclip, or page. Thus, once all the frame of the scene are loaded, they will
have the ability to wnader about. If they click on a page that isnt loaded yet,
its preloader will show up. If it already is loaded, it will simply display.
This is much more organized and less confusing than having all the pages be on
the scene instead of having their own movieclips, not to mention how much
horizontal scrolling it will save you in the future! also... in movieclips for
pages... dont forget to put stop(); in wherever you want the main page content
to be.... I know it sounds stupid to forget, but i do it all the time lol : )
regards, -sig
Re: Complex preloaders Dragnods
1/26/2005 4:47:37 AM
Hi. thanks for your answers, I have not responded lowbid because I have been
busy and have flash MX 2004 that i think the code is different for..

frustratedandconfused,
Do you have a higher version with some code with the frameloaded or
Movieclip._framesloaded function that i could look at to get a better
understanding of how to implement it?

Thanks both for your input.
Re: Complex preloaders Dragnods
1/26/2005 5:45:23 AM
hey, the code still works, and I realized the lowbid posted his FLA file with
one of the posts, I understand how to do something like that now.

I am currently using a % preloader with a preloader movie that plays 100
frames. (Loading bar) style.

If either of you know how to mesh this sort of progressive display preloading
with the ifframesloaded functions please let me know...
I am worried about a CPU optimization problem that i have posted below:

Any help still appreciated..
thanks


http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=194&thre
adid=949419
AddThis Social Bookmark Button