Internet Commerce

Partners & Affiliates

Developer Channel


Featured Flash FLA
Gallery Downloads 11401 Flash Movies | 5 New Flash Movies Added
What's New | Top 100

Featured FLA

»  Author: Nick Kouvaris
»  Title: Znax
»  Description: Znax is a board game. Click 4 tiles of the same color and form squares as big as you can. You will erase all the tiles inside the square and collect points. Get maximum score if you make a square with game edges.
»  More by: Nick Kouvaris


Random FLAs | Add Flash Movie
Featured Flash Site
Gallery Downloads 4941 Flash Sites | 1 New Flash Links
What's New | Top 100 Flash Site

Featured Site

»  Author Agence WOP Digital Agency
»  Title: Electricdrum
»  Description: French WOP Agency, 3D websites, Flash (Papervision, Away 3D), event or institutional projects. The agency operates on all digital projects: consulting, design, graphic design, development, online communication. The WOP agency follows you on the implementation of original, creative and optimized digital projects.


Random Links | Add your own Flash Related Links
Flash Tutorials 1481 Tutorials 7 New Tutorials Added!
What's New | Top100

» How To Make A Simple Animation Using Christmas Clips
» Simple Step by step flash game tutorial Spot the diffrence
» How To Make A Moving Text Slide
» Create Flash Banner With Text Float Effect
» How To Make Zoo Photos Slideshow
» How To Make A Dolphin Photos Slideshow
» How To Make A Fathers Day Slideshow
» How To Make A Transparent Background of Your Flash File
» Create Flash Banner With Text Disco Light Effect Today we will introduce you a Text Disco Light eff
» Unknown Tag: Title10
Random Tutorial | Add Site


Tutorials Home What's New Top Rated Submit myTutes Random!

Search Tutorials


Tutorials Tutorials » Actionscripting

Categories How to Create a Flash MX Component
Author: Jonathan Kaye | Website: http://www.amethyst-research.com |

 
Page 6
«prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ... next»

Step 4. Defining the Triangle Component Properties

It is now time to define officially the component parameters in the Component Definition window. Open the Library panel and find the Triangle Component movie clip you made (it shouldn't be hard, because it should be the only symbol in the Library). Open the Component Definition window by right-clicking (Windows) or Ctrl-clicking (Mac) on the movie clip and choosing "Component Definition…".

In this window, you enter the parameters for your component. The plus and minus at the top are used to add properties or remove properties, respectively. By default, properties are added of type Default, with a value of defaultValue. These come out as Strings. Flash MX allows you to make properties of the following types: Default, Array, Object, List, String, Number, Boolean, Font Name, and Color. There are four columns in this topmost box. The first column, Name, is the text you would like to be shown in the component property inspector. The name may contain spaces, alphanumeric characters, and punctuation. You would enter a descriptive title for the parameter in this space.

The second column, Variable, is the name of the property name you use in your component scripts. This cannot have spaces or punctuation marks, except for the underline character (which may not be the first character). Having both Name and Variable allows you to use a short property name in your script, but to present a more descriptive phrase to help the component user understand what each value represents.

Note: If you specify a Variable but no Name, Flash puts the name of the variable in the property inspector. If you specify a Name but no Variable, you use that Name in your script to refer to the property.

The third column, Value, is the default starting value for the property. The final column is the type of the parameter, selected by choosing from the drop-down list. For our triangle component, add the following properties:

Name Variable Value Type
Base Length tbase 10 Number
Height theight 10 Number
Tint Color tcolor 0 Color
Apply Tint? applyTint false Boolean

Since we do not yet have a custom User Interface or a Live Preview movie for the component, leave the next two lines, Custom UI and Live Preview, blank. If you want to enter a text description for to help users understand the function of your component, press the Set button on the opposite side (right) of the Description box. In the Description window that appears, select "Description Is Plain Text" and enter the description in the area provided. The other option is to create a formatted description in the Reference panel ("Description is a Reference Panel Item"). See the Flash documentation or Flash MX Developer Site for information on creating a reference panel description for the component.

Choose an icon for the component to accompany its name by pressing and holding the icon located directly beneath the Description label. In the next step, we will show you how to define a custom icon.

Beneath this area are two options: whether or not to lock parameters in instances (meaning that a user can or cannot add parameters when the component has been put on the stage), and whether or not to display the component in the Components panel. Note: If you check the "Display in Components panel", the component will not automatically be added to the Components Panel. We will talk about how to do this when we discuss deploying the component. Choose OK to continue.

«prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ... next»

» Level Intermediate

Added: : 2002-04-16
Rating: 8.45 Votes: 55
Hits: 908
» Author
Jonathan Kaye, PhD, is the President and CTO of Amethyst Research LLC, an award-winning interactive design and engineering firm specializing in the creation of online device simulations. He and David Castillo are the authors of "Flash for Interactive Simulation: How to Construct and Use Device Simulations", to be published by Delmar Thomson Learning in November, 2002 (the accompanying web site will be www.FlashSim.com).
» Download
Download the files used in this tutorial.
Download (0 kb)
Get conversion and unzipping tools for PC and Mac here!

» Forums
More help? Search our boards for quick answers!

Please rate this tutorial, 10 is the top rating, you can also click the comments link to read/write a review.
10 9 8 7 6 5 4 3 2 1
Read or Post Comments