Groups | Blog | Home
all groups > flash (macromedia) > april 2004 >

flash (macromedia) : Making a full Web Site in Flash...layout question


Rob Feature
4/28/2004 10:09:05 PM
Hi All...
Just call me Newbie Rob. Another question for you flash wizards!

I'm creating an entire site in flash. What I'm wondering is, how do most
people lay out pages for best loading times? I originally made my entire site
one movie, one scene...Boy, that was a mistake. It took forever to load.
Then I thought I should break my pages up into different movies and load them
each as a different html page. but, if i'm correct, this method would load
common items, such as a menubar, more than once, rather than just using the
same cached item over and over.

Finally, I thought, I could load each "page" into a seperate scene. If I'm
correct, this would load the first page as soon as possible, and load the other
pages in the background while the user was tinkering around on page one. Is
this correct?

I'm wondering what the "right" way is to layout an entire site.

You guys rock! I'm looking forward so much to your answers! Thanks again!
JeffreyGong
4/29/2004 3:02:11 AM
Hi Rob,

You may have a look at [L=the all Flash website]http://megamates.com[/L] I am working.

Shan-Dysigns
4/29/2004 8:06:06 AM
What I do is start out with your main fla that ONLY includes the initial
content (preloader, link buttons, etc) and then when someone clicks on a link,
that would load a separate swf file that you have created from a seprarte fla.
No need to worry about any other html files than the one created from your main
fla/swf. If you are wanting to create an ENTIRE site with flash, you only need
the one html page made. All other swf files would be loaded into the main swf
file. If you aren't clear about any of this, do some search on the code
loadMovie. So if you had 2 links, then you would basically have a total of 3
swf files. One for the main, and two for the swf files that will be loaded.
Rob Feature
4/29/2004 2:24:16 PM
Jeffrey,
First of all, your site is really cool...and VERY fast! A couple of questions:
-Is this all ONE movie?
-Is it broken up into numerous scenes? (if so, what page is in what scene?)
-Did you embed any fonts? (how did you handle your fonts?)

I'm just trying to figure out how to have this much content and be as fast as
yours is!
thanks

Rob Feature
4/29/2004 2:27:28 PM
Hey Shan....

Great suggestions here, but a couple of things I'm wondering.

First, I love the idea of loading something very simple into its own movie
first. HOWEVER, is there a way to load the next, larger movie in the
background while people are viewing the small, fast one? I'm sure there must
be, but this is the key ingredient i'm missing!

Thanks!
phatkow
4/29/2004 2:46:20 PM
sure - it's called "parking" your movies.

all loaded (external) SWFs should have NOTHING in frame 1 (movie should start
on frame 2). The ONLY thing in frame 1 is a STOP action.
From the main (parent) movie, load in external SWFs via loadMovie to a target
or level.
When you do nothing will hapen that is visible - but the movie is in fact
loading but it's stopped on frame 1. It will not play until an action is
triggered targeting this movie and telling it to gotoAndPlay frame 2.

on (release) {
_levelX.gotoAndPlay(2);
}
//where "X" is the level the SWF is "parked".

OR

on (release) {
mc.gotoAndPlay(2);
}
//where "mc" is the instance name of the Movie Clip the SWF is loaded to.


Rob Feature
4/29/2004 3:20:34 PM
Perfect! This is just what I was looking for!

My only questions, being the newbie that I am, is how do i create a new level?
Is there any special treatment a new level needs, or can I just create one,
create my new timeline there, and let it fly?

Thanks for your help and your clairity!

phatkow
4/29/2004 4:12:51 PM
[q][i]Originally posted by: [b][b]Rob Feature[/b][/b][/i]
Perfect! This is just what I was looking for!

My only questions, being the newbie that I am, is how do i create a new level?
Is there any special treatment a new level needs, or can I just create one,
create my new timeline there, and let it fly?

Thanks for your help and your clairity![/q]

you dont need to *create* levels - they already exist - they are like layers
but invisible - they are dynamic in the sense you can load content into them at
runtime - flash supports up to 16,000 levels. the main timeline is level 0. All
other levels (_level1, _level2, _level3, etc....) reside above _level0 (main
timeline).
if you load a movie into a level already containing a movie - it will REPLACE
it - so dont load into _level0 unless you want your parent movie to be replaced.
you should search this site and Google.com for loadMovie - there's a wealth of
info about this very popular/useful flash feature.
check out www.kirupa.com tutorials also.

lemeeno if this helps.


Rob Feature
4/29/2004 9:46:49 PM
Perfect. Thanks.

I'm pretty sure i get it...I havent tried it yet, though.

Rob Feature
5/3/2004 10:35:18 PM
Hey man...
Hope you read this...I tried your suggestion, which made total sense, of
parking the next movie in a layer above so it can begin loading. I tried it
and can't get anything to work....maybe you (or anyone else) could tell me what
i"m doing wrong:

First, I created my main movie, called "home.swf". The first frame is empty
with just a stop() action.

then, i created my preloader movie, called "index.swf". it is simply one
frame that says welcome, and has an "enter" button" (to go to the home.swf
movie) the first frame has the following script (to, hopefully, start loading
home.swf in the background, and to stop it on the first frame):

loadMovie(home.swf, _level1);
stop ();


so, in theory, home.swf should be loading on level1 but invisible...right?

So then, i coded the enter button to say:

on (release) {
_level1.gotoAndPlay(2);}


when i test the movie, simply nothing happens...nothing happens when i push
the enter button.

Your thoughts? thanks for the help, in advance.
rlc5611
5/4/2004 3:12:13 AM
try

phatkow
5/4/2004 3:58:29 AM
[q][i]Originally posted by: [b][b]Rob Feature[/b][/b][/i]
Hey man...
Hope you read this...I tried your suggestion, which made total sense, of
parking the next movie in a layer above so it can begin loading. I tried it
and can't get anything to work....maybe you (or anyone else) could tell me what
i"m doing wrong:

First, I created my main movie, called "home.swf". The first frame is empty
with just a stop() action.

then, i created my preloader movie, called "index.swf". it is simply one
frame that says welcome, and has an "enter" button" (to go to the home.swf
movie) the first frame has the following script (to, hopefully, start loading
home.swf in the background, and to stop it on the first frame):

loadMovie(home.swf, _level1);
stop ();


so, in theory, home.swf should be loading on level1 but invisible...right?

So then, i coded the enter button to say:

on (release) {
_level1.gotoAndPlay(2);}


when i test the movie, simply nothing happens...nothing happens when i push
the enter button.

Your thoughts? thanks for the help, in advance.[/q]

yes -
loadMovieNum("home.swf",1);

should fix it - and make sure home.swf is in the same directory as index.swf.
AddThis Social Bookmark Button