This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Flash Site Design > January 2005 > Re: Complex preloaders





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Complex preloaders
lowbid

2005-01-11, 7:17 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/


Dragnods

2005-01-15, 12:17 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



Dragnods

2005-01-15, 7:18 pm

never mind...
I have figured some of it out and am going to start a new forum,
Thanks.
lowbid

2005-01-19, 7:20 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.


Dragnods

2005-01-20, 7:20 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 :)



Dragnods

2005-01-20, 7:20 pm

never mind...
I have figured some of it out and am going to start a new forum,
Thanks.
lowbid

2005-01-20, 11:17 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


lowbid

2005-01-24, 12:24 pm

Did you get this Dragnods?
frustratedandconfused

2005-01-25, 4:19 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

Dragnods

2005-01-26, 4:20 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.

Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews