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!
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.
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
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!
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.
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][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.
Perfect. Thanks. I'm pretty sure i get it...I havent tried it yet, though.
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][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.
Don't see what you're looking for? Try a search.
|