A Flash Developer Resource Site














Internet Commerce

Partners & Affiliates














Developer Channel

internet.com


Featured Flash FLA
Gallery Downloads 11336 Flash Movies | 2 New Flash Movies Added
What's New | Top 100

Featured FLA

» Author: Surjit Dhami
» Title: Book
» Description: Book
» More by Surjit Dhami


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

Featured Site

» Posted in the Flash Kit Links section
» Title: All-American Rejects
» Description: Get to know this great band by exploring their "practice room".


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

» 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
» HTML Photo Gallery Tutorial
» Create your first flash site – PART 1
» How to Make a Flash Photo Gallery
» Unknown Tag: Title10
Random Tutorial | Add Site

Sr Instructional Designer D2L-Moodle,Clearance
WSI Nationwide, Inc.
US-NJ-Fort Monmouth

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 18
«prev ... 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 next»

Creating the Custom UI

To create the custom UI, you create a new Flash presentation. The swf file will run either within the regular property inspector (dimensions are approximately 406 x 72 pixels) or within the component property panel (used when you need a larger area than what would fit in the property inspector).

You will need to create a means in this movie to retrieve the property values the component user will set, namely tbase, theight, tcolor, and applyTint. To build the fuqu index, you will include an indicator of the fuqu, with a warning when it departs from the ideal setting, and an alert when it violates the fuqu grossly.


The key element you need in your custom UI is a movie clip instance you create called "xch". You pass values to your component by having the custom UI write values to properties of xch, such as xch.tbase = 20;.

The custom UI should allow the user to enter new values. In our case, the interface will also show the fuqu warning, as necessary. When the movie with the triangle component is tested or published, Flash copies the properties and values on xch to the component so that it is ready to initialize itself with the values that the user entered.

Take the following steps to create a custom UI:

1. Create a new movie and change its dimensions to 406 x 72.

2. Create an empty movie clip by using Insert> New Symbol and calling it "exchange". Drag an instance of this clip onto the stage and name the instance "xch".

3. Create Static Text for "base", "height", "Red", "Green", "Blue", "fuqu =", "Rating:", and "0-255", and place them as in the illustration.

4. Now, define the text fields we use to retrieve our tbase and theight property values. Create a base and a height text field (type: Input Text), place them above the corresponding Static Text field, and set the instance names to 'bs' and 'ht', respectively.

5. Next, define input text fields we use to retrieve the tint color. Create three more Input Text fields, naming them 'rc', 'gc', and 'bc', (for red color, green color, and blue color), and place them above the corresponding Static Text field. The user will enter an integer between 0 and 255 to represent the amount of that particular color. Numbers below 0 will be set to 0, and numbers above 255 will be set to 255.

6. So that the user can preview the color, we make a tile that shows the current tint setting. Use the drawing tool to create a square. Convert that square into a movie clip, and name the instance 'tintSq'.

7. We can use a pre-defined Flash component, FCheckBox, to set whether or not the user wants to apply the tint color. Open the Components Panel and drag out a Check Box into its place on the stage. In the Properties window, set the text to "Apply Tint?" and its default value to false. Under the property Change Handler, enter tintApply.

8. Now we create the indicators to help the user make friendly triangles. To make the user aware of the fuqu value for the new triangle, create a Dynamic Text field, name it "fuquTF", and place it alongside the "fuqu =" static text.

9. Next, create the fuqu rating indicator, which tells the user if the fuqu is PERFECT (4.211), ACCEPTABLE (between 2.211 and 6.211, but not 4.211), or FAIL. Create a new movie clip called "fuqu text" with three frames. In frame 1, place Static Text "PERFECT", in frame 2, place Static Text "ACCEPTABLE", and in frame 3, place Static Text "FAIL!". Make sure that these texts are left-aligned with respect to one another. In frame 1 of a new layer (label it "actions"), open the Actions editor for the keyframe and enter the instruction "stop();". Finally, close this movie clip and name the instance 'fuquEval'.

«prev ... 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 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, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs