A Flash Developer Resource Site














Internet Commerce

Partners & Affiliates














Developer Channel

internet.com


Featured Flash FLA
Gallery Downloads 11337 Flash Movies | 1 New Flash Movies Added
What's New | Top 100

Featured FLA

» Author: Bugra Ozden
» Title: Skatalog v9 - product catalog
» Description: Create your product catalog easly and publish on your website or Create your image gallery, documents list, portfolio. Fully XML Driven
» More by Bugra Ozden


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

Featured Site

» Posted in the Flash Kit Links section
» Title: Creative DW Image Show PRO
» Description: Creative DW Image Show PRO is a Dreamweaver extension which enables the user to create multimedia presentations. It combines the features of the popular Creative DW Image Show with the ability to add professional text effects to slides (similar to After Effects). The product is very customizable: the user can choose the duration of the transition effects, the slide motion start and end position, zoom and panning type for both images and texts.


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

» Make a Flash Slide Show Screen Saver
» Simple flash making tutorial for thanksgiving
» Create flash banner for website
» Create xml slideshow with free template
» How to Insert a Multilingual Subtitle Into Your Flash Video Studio
» How to Create Cool Halloween Slideshow
» Debugging flash using the Firebug console
» Create Flash Slideshow on Blogger
» FLASH TRICKS IN WEB ADVERTISING: FLASH BANNERS
» Unknown Tag: Title10
Random Tutorial | Add Site

Trading Customer Accounting (IL)
Next Step Systems
US-IL-Chicago

Justtechjobs.com Post A Job | Post A Resume


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.42 Votes: 54
Hits: 903
» 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
 
   
 

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs