Thursday, 6 December 2012

Multi SWF sites

Open up a new Flash document in 900 x 650 then make a new folder somewhere (maybe on the desktop). Save the document into the new folder as 'background'. CTRL + ENTER to publish it.

 This will make the SWF for the layer in the folder, do this for each layer after making changes, layer 0 is what was last published.

File New - make a new document in 900 by 650 also and save into the same folder as 'nav', then CTRL + ENTER again.

On this new document use the text tool to make page1, page2, page3, page4 and page5.

Change each one to a movie clip and change their instance names to either p1 - p5.

Create a new document and name it page1, save that into the same folder and publish it (CTRL + ENTER). Make sure there is no gaps or capital letters. make 4 more pages doing the same process and name them pages1-5. Save them all to the folder and publish each page.

Go to the 'nav' page and press F9 or if you are on a MAC press FN + ALT + F9 and type into the action frame:

loadMovieNum('nav.swf',5);

On the 'nav' page make a new layer and name it 'as' then type the following code into the nag page action frame:



p1.onPress = function () {
loadMovieNum('page 1.swf',1);
}

p2.onPress = function () {
loadMovieNum('page2.swf',1);

}

p3.onPress = function () {
loadMovieNum('page3.swf',1);

}

p4.onPress = function () {
loadMovieNum('page4.swf',1);

}

p5.onPress = function () {
loadMovieNum('page5.swf',1);

}



Make sure all the pages are spelt correctly and make sure that each page is published and that the background is published last so it is layer 0. Everything else is on layer 1 and will be swapped out when another page is selected.

No comments:

Post a Comment