all groups > flash actionscript > july 2004 >
You're in the

flash actionscript

group:

Page Transition Question


Re: Page Transition Question Rob
7/25/2004 1:35:42 PM
flash actionscript:
Hello,

There is more than one "right" answer on how to build a Flash website.
Here's my 2 cents...

Unless they are small and very simple, I prefer to build my Flash sites by
creating a separate movie for each "page". This helps the site to load
faster and makes my updating and maintenance easier. And that way your
visitors only have to wait for the "pages" to download that they want to
see. If you put all the "pages" in different scenes of the same movie, your
visitors have to download your entire website even if they only want to see
one page.

As for your buttons, we'd need to see your specific code to know what's
causing your problem. However, here is the basic way to assemble a website
using multiple Flash movies.

1. Create a "main" movie which contains all your menu buttons. We'll call
this movie "index.swf"
2. Create your separate "pages" as individual Flash movies. For example:
"homepage.swf" would have the content for your home page. You might have
other movies like "aboutus.swf", "contactus.swf", or "products.swf". Each
containing the content for those pages.
3. In "index.swf" add the following code on frame 1 --
loadMovieNum("homepage.swf", 1) -- so when you launch "index.swf" it
automatically loads "homepage.swf".
4. On each button in the "index.swf" movie, add code to load the related
movie. For example, on the "About Us" button you would add this code:

on (release) {
loadMovieNum("aboutus.swf", 1);
}

Do the same for all your buttons, changing the name of the loaded movie to
whatever movie you want to load when that button is clicked. Make sure you
load all your movies into the same level, so they replace each other.
(There can only be one movie loaded per level.) For example, both code
examples above load the .swf file into level 1. So when "homepage.swf" is
already loaded into level 1 and you click on the "About Us" button, it will
replace "homepage.swf" with "aboutus.swf".

When you're done you can put "index.swf" into the index.html page of your
website. From there, all the navigation will take place within Flash.

This is very simplified, but I hope it helps!
Rob









[quoted text, click to view]

Page Transition Question mbh1219
7/25/2004 5:53:47 PM
I am a beginner in Flash so I am not quite sure how to word my question. I have
made the different pages to my web site. I did have them in separate movies but
read in a Flash from Scratch book I should have put them into scenes on one
movie. Should I have done that? Next I linked the buttons to the other pages.
But when I go to test the movie it loops through all the pages. Why is it doing
that and how can I fix it? Thanks
AddThis Social Bookmark Button