Learn Flash: Links & Hyperlinks

Home Food Mates • Members Tutorials Forum Buy Templates Contact Us 

 


Flash Tutorials

   

Flash Tutorial - Links/Hyperlinks

 

Free Flash Tutorial


Step 3    <<   Previous      Intro   1   2   3   4   5   6     Next   >>       >>   Webwasp Mates

 

Step Three: Adding the ActionScript to the Button

If someone clicks on the button the button needs to have the appropriate ActionScript so that it knows what to do. In this section you will place the ActionScript on to the button including the URL. This will send the user to another web page.

    Definition: The URL is a technical term which means Uniform Resource Locator!! In normal language URL means web address such as: www.webwasp.co.uk

  1. Select your: Button

  2. Open the Actions Panel: Window > Actions (F9)


  3. The Actions Panel


    Flash MX/5: Window > Actions or F9 or Right Click > Actions (Mac: Ctrl Click)

    The Actions Panel has two Modes:

    • Normal Mode: Use of Menus and Options only. Menus give code with full syntax. Syntax errors not possible!
    • Expert Mode:Type, Copy (Ctrl C) & Paste (Ctrl V). Use of Menus gives partial code only.

      Note: In Flash 8 Normal Mode is now called Script Assist On and Expert Mode is Script Assist Off.

    Flash MX 2004: Window > Development Panels > Actions or F9

    Important: The Actions Panel in Flash MX 2004 only has one mode so the information in this tutorial about two modes (Script Assist On and Off) does not apply as it only has an expert typing mode. You will not be able to use the Script Assist method described. The use of the Actions Panel Menus will give partial code only which is different to the code as stated in this tutorial. I recommend that you type or copy (Ctrl C) and paste (Ctrl V) then edit the code that you require.


    CS3 / Flash 8: Window > Actions or F9 or Right Click > Actions (Mac: Ctrl Click)

    In Flash CS3 & Flash 8 Adobe have brought back the old Flash MX Normal/Expert mode to the Actions Panel. Yeah!! (not available in MX 2004). To make it seem like a new feature they have re-named it: Script Assist which is either switched on or off. Look for the new button in the Actions Panel:

    • Script Assist On: Use of Menus and Options only. Menus give code with full syntax. Syntax errors not possible!
    • Script Assist Off: Type, Copy (Ctrl C) & Paste (Ctrl V). Use of Menus gives partial code only.

    Switching Script Assist On & Off: Click the Script Assist button or go to the Side Menu Button:   

    Script Assist is on if ticked :

  4. Go to the Action Panels side Menu button: and tick: Script Assist

  5. Tip: Before you use the Actions Panel make sure the correct object is selected. In the top left corner of the Actions Panel it must say: . If it does not say Actions - Button you have not got your Button selected.


    Actions - Button is displayed in top left corner of the Actions Panel.

  6. Click on: Plus Sign > Global Functions > Browser/Network > getURL


    Click on the blue Plus Sign and follow the menu to: getURL

  7. In the top section of the Actions panel you will see URL. Type the web address in here. I typed: http://www.webwasp.co.uk


    Type the web address in the options area where is says: URL

    Your button should now work !!

    Note: If you want to copy and paste the script it is here:

    on (release) {
        getURL("http://www.webwasp.co.uk/");
    }

    See notes above about pasting into the: Actions Panel

         

Step 3    <<   Previous      Intro   1   2   3   4   5   6     Next   >>       >>   Webwasp Mates


Webwasp Community: Webwasp Mates & Dates

Why not try out webwasp's new community. Meet new people, find friends in your area: Webwasp Mates & Dates

39289 visitors to this page since March 06

 Top of Page Home Food Mates Members Tutorials Forum Buy Templates Contact Us 
 All material on this site is protected under international copyright © law. DO NOT reproduce any material from this site without written permission. Please ask as permission is often granted.