Slide Show

2.4.2006, 16:19
Submited in: Flash | Total Views: 181540

See this lesson and learn how to create slide show in flash. To create this tutorial, you have to use Action Script. You will also learn how to import a picture into a flash, how to aligned it, how to create a flash buttons and more.


Before you open the Flash and go to work, Find a five pictures on the internet or somewhere. After you have found that pictures, set their dimensions in photoshop or any other graphic program (could be done in flash also) to 300x225px.

Step 1

Open a new Flash document. Select Modify > Document (shortcut key: Ctrl+J). Set the width of your document to 300 pixels and the height to 225 pixels.

Step 2

Choose File - Import - Import to stage (Ctrl+R) and click on the first picture to insert it. Then, Flash will (I Use Flash MX 2004) ask you: This file appears to be part of a sequance of images. Do you want to import all of the images in the sequance? I click yes And Flash automatically imports all of my five pictures in five frames.When will Flash ask you this quastion? Every time when you save your pictures under same name, and different number (img1, img2...). If you don't save your pictures under the same name, and different number, you'll have to insert one by one picture and that process will take a lot time.

Step 3

go to the Align panel. If it isn't opened already, just select Window > Align or press Ctrl+K to open it. While the image is still selected do the following in the Align panel:

1. Make sure that the Align/Distribute to Stage button is turned on,
2. Click on the Align horizontal center button and
3. Click the Align vertical center button.

Step 4

Repeat step 3 for all other frames (frame2,3...5) to precisely center the all pictures with the background.

Step 5

Create a new layer above layer 1, and name it Buttons. After that, create another layer above Buttons layer, and name it Action.

Step 6

Click on the first frame of layer Action, open the Action Script Panel (F9) and paste this script:

stop ();

Step 7

Now it's time to create two buttons, which we'll  using for pictures listing. Close Action Script Panel  (F9), lock Action layer and layer 1. For this example I will use Flash made buttons (You can also create your own buttons). Click on Window - Other Panels - Common Libraries - Button. See the picture below.

Then from the Library (Ctrl+L), using the "drag and drop technique", insesrt gel Left, and gel Right button, and set them somewhere on the stage. See the picture below.

Step 8

Take the Selection Tool (V), Click once on gel Right button to select it, open the Action Script Panel (F9) and paste this script:

on (release) {
if (this._currentframe == this._totalframes) {
gotoAndStop (1);
} else {
nextFrame ();

Step 9

After that,  click on gel Left button, and in A.S.Panel paste this script:

on (release) {
if (this._currentframe == 1) {
gotoAndStop (this._totalframes);
} else {
prevFrame ();

We're done, Test your movie (Ctrl+Enter).

 Have a nice day!

Download example (252 KB)

Are you a website owner?
Click here to register and submit your tutorials!

Browse by category

Most popular tutorials