Sunday, December 22, 2024

Jumping Scenes With Buttons and Everything In Between!

Share

This tutorial will show you how to Add, Edit, and Delete scenes, make simple buttons, and show you how to make buttons jump from scene to scene – even to specific frames, using simple Action Script.

Making Scenes.

From your top menu click on Window (alt+w) > Panels (p then right arrow for the next drop down menu) > Scene(s). This will open your Scene Panel (by default there will be one scene).

At the bottom of the scene Panes there are three options.
– Duplicate Scene
– Add Scene
– Delete Scene
You can mouse over them to see what they are.

To make new scenes just click on Add Scene and a new scene will be added to your Scene Panel (and to your movie).

To change the name of your scene simply double click the scene that you would like to change. It will then let you change the name.

When you want to edit your scenes, open your Scene Panel if it isn’t open already, and click (just once) on which scene you would like to edit. You will notice that the name of the current scene appears on the top left of your window (right below the File option).

If you want to change the order of your scenes just drag the scene you wish to move either before or after the scenes that are there. (Drag and Drop Type). This will come in handy when you are making your loading scene as well as your ending scene.
Now you should be able to Add, Delete (Click on the scene and then click on the little bitty trash can on the bottom of the scene panel), and Edit your scenes.

How to make simple buttons

In your first frame, draw a square with the rectangle tool (R). Now click on the frame that you drew your Rectangle in to select the rectangle. Now hit F8.

This will pop up your symbol properties window. Within those properties you have Name and Behavior.
The Name option lets you name your clip in case you need to refer to it through actionscript later. Always name your buttons and movie clips to save you trouble later on. Naming also helps you keep organized.

Under Behavior you have 3 options as well
– Movie Clip
– Button
– Graphic
These allow you to change your images to the above options.

Now, name your button (I named mine simplebutton) Under Behavior select Button. This will automatically change your rectangle into a button.

Now you have a simple button. If you would like to edit this button later on, you can either open your library (ctr+l ) Select the button (Actually, you have to double-click the little hand-looking icon beside your symbol) or just double click the button within your movie. To get back to your movie, you can click on the name of the scene on the top left of your window (where you saw the scene change before).

To make sure it is a button, select the button and check the Instance window. If your Instance window is not open, you will find it in the by hitting Ctrl+i and it should say that your button is actually a button
How to access Action Scripts for Frames and Buttons.

This is really quite simple. Just right-click on the frame or button you wish to access the actions of > select Actions and there ya go!

In you Flash Movie, Make 2 Scenes.
(Window > Panel > Scene)

Name each Scene. I named mine Preloader and MainScene.

In the First Scene, (Preloader) make a simple button – you can use the button library if you like. Select the button by clicking on the frame that you placed your button in. While the button is Highlighted, right-click your button. Then click on Actions opening the Actions panel for your button.

In your Actions panel, click on Basic Actions.

Now double click Go-To to add the action to your button.

Now at the bottom of that panel are your options.

You should have three options: Scene, Type and Frame.

Beside Scene is a dropdown option. You may have to make the Action panel bigger to see the dropdown menu.

Click that and you will have several options. Look within those options for your second Scene (MainScene) and select that.

This tells the movie that it’s going to go to a frame within the selected scene.

You will not need to work with the frame type for this tutorial.

In the Frame option, I typed in the number 3. This is going to tell my movie that it needs to go to the third frame of the second scene.

Close your Actions panel

Right click on the first frame, go to Actions > Basic Actions > double click Stop. This tells your movie to stop playing on this scene. Close your Actions panel again.

Now you have your actions done for your first button/scene.

Now open your second scene (MainScene) by clicking on Window > Panels > Scene. This will open your scene menu. Then click on your second scene (MainScene). This will now open your second scene.FlashNewz and FLADownloads, John has become a strong voice in the Flash Community. His reviews and tutorials give great insight and knowledge to readers around the world. He has a keen eye for what’s hot and what’s not in the Flash world. He has also developed and continues to run his own flash portal as a side project to keep his mind on the Flash community

Being a key designer for advertising creative, he’s got style when it comes to grabbing readers attention. With a proven track record, there isn’t much this guy can’t handle.

Table of contents

Read more

Local News