Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 1 of 1
  1. #1
    Junior Member
    Join Date
    Oct 2005
    Location
    Ohio, U.S
    Posts
    17
    Member #
    11660
    Liked
    1 times
    OK. Here is the basic idea. First off. Let me tell you how I came to think of this tutorial as a need. Look, the basis of all learning is example. Most people will skyrocket with almost anything once they learn the very, very basics. Now for two days I was trying to figure out how to make an interactive button in flash that will take me to A: A web site, or B:another part in the timeline. This was mainly for the idea of a flash based web page. Now this tutorial is a "Flash BUttons for DUmmies" tutorial. It's verbose, and probably redundant, but the point will get across none the less. The whole reason for this tutorial is because all of those days, I knew I needed something called an on handler, yet I wasn't quite sure what that was. I had a hunch, but I didn't know how to define it.

    Now for the tutorial.

    Linking Buttons to Web Pages
    Say you want to make a button in flash link to a site. You know how to make the picture look like what you want, but beyonf that point, you are lost. So I could get fancy and stuff like convert the image to a button symbol and name it button1 and tell you to make the on handler for release and give it a URL. Now, how the hell do you do that? Or maybe you do, but when you put in a certain code, you get a reply with an Actionscript error having something to do with an on handler. Well here is how to get rid of that pesky little thing.

    Step One: Make a simple square. Nothing fancy. Now click the border of this square and delete the border (this is not a requirement but it's nice to do if you don't want to hit shift and select the border.)

    Step Two: Click on your square. It is selected now. With the square selected, look at your top toolbar. See the option of Modify? Click on that and go to the Convert to Symbol option within the Modify toolbar. A pop up menu will appear. You will see an area to name your button and three options below that, these are called behaviors. You can name your button if you'd like. After naming it, click on the Button choice in the Behavior choices, right below the name box.

    OK. Now your button is ready to be modified.

    Step Three: For now, we won't get fancy with our buttons look. Open the actions panel (either at the bottom of the screen, or you can click on the Window (or maybe View) and choose actions.
    With th Actons panel open, select your button if it is not already selected. Now, in the little text box insode the Actions panel, type the following code.

    on(release){
    getURL('http://www.webdesignforums.net')
    }



    Explaining this Code: on(release) means when you click on the button and the release the mouse, a certain action will occur. The action in this particular example is
    {getURL('http://www.webdesignforums.net')
    }


    Step Four: Now hold control+enter and you can test your button. Click on it and you will get a link to this forums home page.

    Extra Step One: Want your web page that you linked to open in a new window? Here is how. All you have to do is add a small code at the end of the link.

    on(release){
    getURL('http://www.webdesignforums.net'_blank)
    }


    Extra Step Two: Want your button to change color or design when you scroll over it? Double clikc on your button. You will see the background unforcuse and the button focus. In your timeline, you will see four choices. The first tow are what we will mess with right now. Click where it says "Over" and press F6 to insert a enw keyframe. Now modify the butto nto like you want. Once done with that, clikc on where it says Scene 1 blow the title of this flash document. Now press control+enter to test your button. Roll over it once. See? Neat huh?




    Linking Buttons to Frames
    Now you know how to link a button to a website, but how can you link it to a certain part of your flash document? This is easy.

    Step One: Follow steps one and two drawm out in Linking Buttons to Web Pages to make a button.

    Step Two: Select frame 2 in the timeline and press F6 to insert a new keyframe. Still with the head on frame 2, erase the button and draw something else, It deosn't matter what.

    Step Three: Now, select frame 1 and select your button. With your button still selected, tyoe the following code within the Actions panel.

    on(release){
    gotoAndStop(2)
    }


    Explaining this Code: gotoAndStop is the action, and 2 is the statement. What does this mean? It means that gotoAndStop is what the button is supposed to do, witch is to go to and stop at a certain place. 2 is where to go. As long there is a frame where you specify, you can direct the gotoAndStop to go where you want.

    Step Four: Now press control+enter and test your button.

    Extra Step one: You can also use gotoAndPlay(x) instead of gotAndStop(x). It will play the movie from wherever you directed it.

    TerriRDexter likes this.

  2.  


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

flash buttons interactive

Click on a term to search for related topics.
All times are GMT -6. The time now is 12:20 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com