Monday, 10 March 2008

The building of Top 10 Cars of the Year in Flash PART 1

I am going to build this section in a separate fla. file to the main flash application then either export as an swf. or copy and paste the layers into the main application. I started by importing thumbnail size images of each car which will act as the menu (when the user clicks on the thumbnail, a detailed page will display about that car). I placed the images on the stage in order.I then converted the images to 'buttons', gave them instance names and changed the alpha to 50%. I then added action script so that when the user hovers over the button, the alpha changes back to 100% and the image lights up. The code is displayed below.I then created a new movie clip and give it an instance name. Within this movie clip i added 3 images of the car, each on a different frame with a 'stop():' action attached to each frame. Next, I placed the movie clip (on a new layer) onto the stage as well as two arrows to navigate between images.The next stage was to add the action script to make the arrows move between images in the 'slideshow'. I converted the arrows to graphics, gave them an instance name and entered the script as shown below.
I completed the above for each car, placing each one on a separate layer and a different frame. This allowed me to link the thumbnail buttons to its corresponding car profile. I added action script on to each button. For example:

on (release) {
gotoAndPlay (20);
}

When the user clicks the button the page will display frame 20 as i have placed one of the car movie clips on this frame.

No comments:

Contributors