Ultrashock Tutorials > Flash MX > Creating professional Flash components in seven easy steps  
 
by Aral Balkan, BitsAndPixels.co.uk
 Download PDF file of this tutorial 
Download Source Files 
 
Creating professional Flash components in seven easy steps - Step 5
 
 Introduction: What Makes a Professional Flash Component? 
 Step 1: Creating the component 
 Step 2: Building the Custom UI 
 Step 3: Adding Live Preview 
 Step 4: Creating Reference Panel Documentation 
 Step 5: Adding Code Hints 
 Step 6: Implementing Syntax Highlighting 
 Step 7: Packaging it up 

Flash MX Most Wanted Components

Aral Balkan is
co-author of
 Flash MX 
 Most Wanted 
 Components 

 Check it out 
 at Amazon! 

Step 5: Adding Code Hints

I love Code Hints! You know that magic context-sensitive menu of available methods that pops up the moment you type the name of a movie clip using the standard suffix (e.g. myClip_mc) and hit the period key to access its methods or properties? Those are Code Hints. They list the methods of objects and components so you can access them quickly while typing in code (and are great if you happen to forget what a certain method or property was called.) All professional components use Code Hints and they are very easy to implement. To our rapidly growing XML file, then, add the following:

<!--
        *** Code Hints ***
-->        

<codehints>
        <typeinfo pattern="*_vsb" object="VerySimpleButton"/>
</codehints>

Umm... yes, that's all there is to it. Now, whenever someone names their Very Simple Button with the correct suffix (we chose _vsb), its methods should pop up in the Code Hints box. Simple, isn't it?

 
©2003 Ultrashock.com - All rights reserved