Our Flash tutorials provide you with step-by-step instructions on how to create beautiful Flash animations and integrate them into your website.  Home Flash & Swish Flash Tutorials Buttons in Flash
Your Ad Here

Buttons in Flash

Browse Pages: << < 1  2  3 

Actions in the buttons

Since the existence of multitude of actions that can be applied to the buttons, as well as to other elements of Flash 8 we are going to comment two of the most common ones:

1. Opening a Web page. With this we'll be able to open any Internet page (or a Flash movie), which will be used to browse through webs which contain more than one page, or to allow the user to download files among other things.

For adding an action to a button is necessary the ActionScript use (in Unit 17 it will be treated deeper).

So the steps to follow are:

  1. Select the button clicking on it. So it's the button where the action is associated to.
  2. Open the Action Panel clicking on its tab or through the menu Window >> Actions.
  3. Click on the Script Assist button.
  4. On the left, select Global Functions >> Browser/Network >> getURL.
  5. When selecting the getURL command (which is the one that opens a link in a window browser), its respective options will be displayed on the right. Fill the URL field with the page you want to open and select in which window you want the link to be opened (_blank will open the link in a new window).
  6. Close the Action Panel and the button will be ready. You have added an action to your button.

Here you have a sample of how to do it.

Click to play video
(Click the picture to play video in new window)

And this is the result:

2. Controlling a movie under way. If we are reproducing a Flash movie and we want to allow the user to stop it, start it, play it, and play it back ....

For example, to stop a movie we must make our button on the stage of the movie, select it, and open the actions panel, then activate the Stop() function.

image 2

After doing this, we would have to change, as we made in the previous animation, the moment at which the function must be executed, selecting the event on Press.

We show above how the panel of the button actions would look like.

Now whenever we press this button the movie will be stopped.

In a similar way we would act doing so but with other control actions.

Adding sound to a button

If our pages are going to have sound, the sound in the buttons is a fundamental part. For example, we can make the sounds to become activated when pressing a button.

For this, we must simply edit our button and select the frame Down. Now we must insert the sound. For example we could import one from our hard disk or take some that we already have in the library.

The result could be something like this:



Author's URL: Teacherclick.com
Thank you for voting.
Rate this Materials:
Bad 
1 2 3 4 5 Excellent
Browse Pages: << < 1  2  3 
print this page subscribe to newsletter subscribe to rss

Internet & computing Flash is a vector-based moving graphics format created by Macromedia for the publication of animations on the World Wide Web. More Flash & Swish: Most Popular Materials | Fresh Materials | More Flash Tutorials at FlashPerfection.com

Add comments to "Buttons in Flash"

Only registered users can write comment

No comments yet...