View and vote on the article here: Building a Basic Site in Flash
Building a Basic Site in Flash| Category | | | Summary | | | Body | <CENTER><H3>Building a Basic Site in Flash</H3></CENTER><HR>
<H4>Getting started. </H4>A flash website is nothing more than a flash movie placed in a "normal" HTML file
- Make a blank *.fla file
- Match resolution to web browser (standard movie has got 550x400 px -it's too small I prefer 1000x550 px)
- Plan our website.(Our plan to build a site)
<H4> Our plan to build a site</H4>
- Make 4 blank layers
- First will describe names of our contents.
- Second will be a actions layer (from there we will control our website).
- Third will display our contents.
- Fourth will be a layer of our buttons.
In first keyframe of "buttons" layer draw 3 oval's. Then convert them to buttons symbols by clicking right mouse button > Convert to symbol. Name them "button1" , "button2" , "button3".They will also be visible in the library (CTR+l). Then make keyframes in 15, 30 frames and normal frames to 45 frame.
Then we must copy this scheme to other layers (keyframes in 1, 15, 30 frames. Blank frames to 45 frame).
Lets take up the other layers.Description layer- we will name our three contents in propeties panel(frame area).
<IMG SRC="http://knowledge-bank.cauniversity.org/image.php?id=44" ALT="(picture1)" ALIGN="bottom]
Content1(1-14 frames), Content2(15-29 frames), Content3(30-45 frames)
<IMG SRC="http://knowledge-bank.cauniversity.org/image.php?id=45" ALT="(picture2)]
It's time for action script. To assign an action to a specified frame click the small button with the arrow in the propeties panel<IMG SRC="http://knowledge-bank.cauniversity.org/image.php?id=46" ALT="(picture3)]
It's important to click on a frame in actions layer first and then add the action here. So, in 1,15,30 frames write a small piece of code:
stop();
<IMG SRC="http://knowledge-bank.cauniversity.org/image.php?id=47 " ALT="(picture4)]
Pretty small huh?... But very useful. It will physically seperate the contents of our flash movie. If you now compile our site (press F12) you'll only see your first content because this script is stopping a playing movie.
Now we give some interaction to our buttons: mark a button by clicking it one time then go to the action panel(F9).Type:
on(press) {
gotoAndPlay(1);
}
This script means: if this button is pressed [
on(press)
] the movie will go to the first frame.
1
- this number means
the first frame of our movie. OK, copy this script to other buttons but we must edit the frame where it move a movie.
The second button:
on(press) {
gotoAndPlay(15)
}
The third button :
on(press) {
gotoAndPlay(30)
}
Remember to add this code to buttons in all keyframes (1, 15, 30)
The final step is to fill our contents in the contents layer. You can place your text, pictures and everything that you want here.
<HR>
Written by by redu (22 July 2005)
redu is a Member of Knowledge Bank Tutorial Writers |
|
This article was imported from the CyberArmy University site. (original author: redu)
There are no replies to this post yet.
|