|
|||||
|
Page 2 of 2 Step 5: Now we will be creating our content for our pages. Because these are just test pages I will be using a random text generator such as this one to create my text. Select frame 1 on the "Pages" layer and then select the text tool (T) Now click where you want your heading to appear and then type "Welcome to my site". Select your text and then change your font settings in the properties window. Now select the text tool again and now paste in your content. Use a smaller font size for this. This is how mine is looking. ![]() Now create the content for the rest of your pages. Step 6: Now its time to add some code to our interface. If you hit Ctrl+Enter to test your flash file you will see your content just rotating through, to fix this and make it so it just stays on the one page we need to add a stop() command on each page. Select frame 1 on the "Pages" layer and then hit F9 to bring up the actions window. In the actions window add the following code: stop() Now test your flash file again, it should now just stay on your "Home" page. Now place the same code on the rest of your pages. ![]() Step 7: Ok now all thats left for us to do is to tell our buttons what page to go when they are clicked. To do this we need to convert our buttons into symbols and then add in some small acounts of code telling it what page to go to when the mouse button is released. Select the 1st frame on the "Menu" layer and then select the shape we placed over our home button. Hit F8 to convert the shape to a symbol and name this new symbol "Home". Do the same for our remaining shapes, use the symbol names stated below. About Me = About Photos = Photos Stuff = Stuff Contact = Contact Hit Ctrl+L to open up your library if you dont already have it open, you should see your 5 movie clips and your background image. Now on the menu layer double click on your "Home" movie clip to take us inside the movie clip. Select the very 1st frame and then hit F9 to bring up the actions window and then paste the following code: (We explain the code below!) this.onRelease = function() { _root.gotoAndStop("Home"); }; Ok so what this code does is it waits for an event, which in our case its the release of our mouse button, when this event is triggered it sets of our function. Our Function is telling our _root timeline to jump to our "Home" Frame labe that we created earlier in the tutorial. Change "Home" in the code to "Contact" and test your flash file. You will notice that when you click on the "Home" button it now sends us to the contact page. Now change it back to "Home". Now place the same code in the rest of our button movie clips, but of course replacing it with the correct frame label for your button. Step 7: If you test your flash file now you will notice that your menu is now working but it only works the 1 time, this is because our menu layer only exists on our "Home" page. To fix this select the 5th frame on our "Menu" layer and insert a keyframe Insert > Timeline > Keyframe. Your flash website should now be working :) Finished result: Click Finished file: Download (Flash 8 file) If you enjoyed this tutorial please show some support for the site by registring. Thank you! Post your result on the forum! We would love to see how you went :) Credit: I have forgotten the link to the stock image used in the design but I will link it here as soon as i find it! For more information on Actionscript code see this site.
Powered by !JoomlaComment 3.26
3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved." |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||