Apr 17, 2012

How to Make a Button Array Using ActionScript

,

Web buttons can be customized using ActionScript.
How to Make a Button Array Using ActionScript thumbnailCreating different elements within a software program or on a webpage is possible using programming languages such as ActionScript. For instance, it is possible to create a button array through your programming script that can then be tested using Adobe Flash. ActionScript allows you to create buttons that vary in size, shape, its text and its click-through commands.

Instructions

    • 1
      Name each button that you will use for your webpage. The buttons should be named according to the different functions they will perform, or the destinations that they will take the viewer to once they are pressed. For instance, the "home" button will take the user back to the homepage. Each button is named using a similar script format. Type "home_mc" to name the "home" button. Each button is similarly named. For example, the "about_mc" command names the "About" button used to take the viewer to the "About Us" page.
    • 2
      Write the array containing the button names using the necessary script. It should read something to this effect: var clipArray:Array = [home_mc, button2_mc, button3_mc, button4_mc]. Alternatively, you can write the buttons in an array with coordinates instead: var C:Array = [[0, 0], [0, 30], [70, 0].
    • 3
      Define the button characteristics, such as the color, by adding additional coding script. For instance, create a blue button by adding the following script: function drawbutton (blue). Add additional characteristics, such as the button shape, using ActionScript.
    • 4
      Test your script to ensure that it works, using Adobe Flash software. The array of buttons you have create using ActionScript amounts the the same type of script used in the creation of movie clips in Adobe Flash. To test these buttons, use the Adobe Flash software by selecting "Control" from the drop-down menu at the top of the screen. From the menu, select "Test Movie." A new window will open up with your button. The button should appear as you programmed it using the different parameters in ActionScript.
 

HowToYo Copyright © 2011 | Template design by O Pregador | Powered by Blogger Templates