Flash tutorials
Home 3D (2) Actionscripting (65) Animation (100) Audio (4) Drawing (7) Full flash sites (4) Getting Started (15) Navigation (25) Special Effects (52) Text Effects (38)

Symple Gallery

12.9.2006, 13:53    Total views: 56520

This tutorial will show you how to create a simple flash gallery using the Action Script and Loader.

Step 1


First, you'll need to find somewhere a five picture equal dimension. After that set every picture in photoshop or some other graphic program to be 200x150 px, and after that 50x40 px. If you have a problem with picture, just download my picture. Note! Your picture must be saved in the same folder with fla. Just one thing! You have to know what extension is your pictures (.gif, .jpg......).



Step 2


Create a new flash document, press Ctrl+J (Document Properties) and set Width to 320 and Height to 220px.

Step 3

Then, click on Window > Components (Ctrl+F7), to open the Components Window.

Step 4

From Components Window, choose Loader, and using drag and drop technique move it on the stage. Look at the picture below!





Step 5

While your "Loader" is still selected, open tha Align Panel (Ctrl+K) and then click on Align to stage icon, after that on Align horizontal center and Align vertical center icon, to precisely center your "Loader" with background.

Step 6

After that, open the Properties Panel (Ctrl+F3), and under type loader.



Step 7

Choose File > Import > Import to Library, and Import first the large pictures (200x150 px), and after that small pictures (50x40 px). Look at the picture below!



Step 8

Using drag and drop technique, move from Library on the stage all small pictures. Look at the picture below!



Step 9

Select the first picture and press F8 on the keyboard (Convert to Symbol) to convert it into a Button.

Step 10

While your new made Button is sitll selected, open the Action Script Panel (F9) and write this script:

on (release) {
loader.contentPath = "img1.gif";
}

We're done for the first button! Repeat steps 8 and 9 for every other pictures. Only difference in Action Script is that you must instead of img1.gif  type img2.gif, img3.gif......

on (release) {
loader.contentPath = "img2.gif";
}

on (release) {
loader.contentPath = "img3.gif";
}.........

Enjoy!

Have questions about this tutorial?
Visit our friendly Community Forums!
Digg it! Add this tutorial to del.icio.us! Furl it! Add this tutorial to reddit! Spurl it! Add this tutorial to technorati!

Top tutorials

1. Advanced full flash site - Part 1
Total views: 221533

2. Water effect
Total views: 166039

3. Photo slide show
Total views: 153638

4. High-tech city animation
Total views: 151459

5. Special Picture Effect
Total views: 146246

Related links