Wednesday 28 September 2011

Making a Basic Flash Website

1. Open a new document in ActionScript(2.0)
2. Label the new timeline 'Buttons', then go to the side bar and choose the 'Oval' button in the shape tool.
Click and drag to make a circle on the first frame of your timeline.
To make the process easier choose to have no stroke on your circle, instead making it one bold colour.
3. Right click on the circle and go down to the 'Convert to Symbol' option. This brings up anew set of options. Rename the symbol 'Circle' and change its type from the drop down menu to 'Button'. Once done click 'OK'.
4. Now you need to add an Action onto your button so that when you click it, it goes to the page you want. By adding an action to your first button it saves you having to write out the actions for each button, instead you can just duplicate it and change the page it is going too.
You need to write on(press) {gotoAndstop(1);}
With a bracket you are opening a condition ( and ) closing. The condition tells you what you are doing. To open a event and close and event you use the { and }, these tell you what will happen when you press the button. The second condition '(1)' is telling you which page you want to go to when you press the button. Then you close the conditions with a semi colon ';'.
5. Next you need to duplicate the button 3 more times. To do this you click the circle and whilst holding the 'Alt' button drag and drop the duplicate below the first button. I then right click each button changing the 2nd condition to the different pages I want them to go to when I press them.
6. You next need to enter a frame on frame 4 on the timeline, making the 4 buttons exist on the timeline for 4 frames.
7. We now need to make a new layer. On this new layer you go to the first frame and insert some text using the text tool from the toolbar. On frame 1 insert a '1'. Then carry this on, (2) on frame 2, etc. However for the next 3 frames you need to right click each frame and insert a keyframe before changing the text.

8. Next you have to publish your timeline. To do this it is 'Ctrl' + 'Enter' on a PC and 'cmd' + 'Enter' on a Mac. You'll find that when you first publish it the numbers will flash through really quickly as Flash works on a loop. To stop this happening create a new layer and label this one AS for action script. Left click on the first frame then right click and go to actions. This time make the action stop();
Now when you publish your Flash document the numbers shouldn't loop through and instead only show when you press the buttons.