Home
Username:
Password:
Macromedia Flash MX Intermediate Developer Tutorials

Foundation Builders / Using Code Hints




Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.


Learn More

Subtitles of the Movie

One of the great new features for the Flash MX environment is bringing over the code hint technology from home site, which is a web editor. The thing that's really nice about code hinting is that it allows you to look at a glance what your available methods, properties and what not are as you are typing along. For instance let's say you have a push button component which we call "push button underscore PB. PB, this portion right here, underscore PB is the portion that triggers, after hitting the period, the code hints for the push button type component. Notice that as I've just hit the period, now I suddenly have a whole list of all the components that are available to the push button itself. Let's say that I want to set the enabled property. All I would have to do is use my down arrow and just like that I've set the enable. Now you can see that the actions panel now has the tool tip showing you that if this is a F push button, which is a Flash push button component, the set "enable syntax" is enabled; meaning that you can either say enable or disable. So in this case I would say enable and just like that my syntax is perfectly formed. Let's say that I want to use a movie clip code hint and my movie clip was my movie underscore MC. Here you go again underscore MC is your code hint, hit the period and now I have all these methods that are available to me as movie clip methods. Let's say that I wanted to use load movie. You can see again "movie clip load movie" shows the various input with the bold for what I'm supposed to put in now which is the URL. And then I want to hit the comma now its telling me that I should put in the method. Ok let's go ahead and erase these and take a look at all the different suffixes for action script's code hinting capabilities. I've created a movie, which reads in all the different code hints up to this point and displays them in a window. As you can see there are different types of objects and components, which all use code hints. The most basic, the Flash MX objects, have code hints associated with movie clips, arrays, string objects, buttons, text format, date and so on. If you are looking for a particular one, let's say we want to know what a movie clip is, we just click here and it shows the description, this is a movie clip. The asterisk means any variable name plus underscore MC will bring up code hints for the movie clip. When we're looking at the different component libraries we have a check box, push button, radio button, list box, scroll bar, combo box and scroll pane in addition to the global style format. Each of these will bring up code hints when you hit the period which you can then scroll through your options and bring them up. A couple of things to keep in mind is CB which is Combo box is similar to CH which is check box and it is important to keep those two apart. Flash MX will bring up the code hints for a Combo box on a check box if you use the wrong suffix. So keep in mind that although this is code hinting, I'll demonstrate that here, my check box underscore and I'll say CB, which is actually the code hint for Combo box, note that it would still bring up the methods for the Combo box and this could get you in trouble. So what I usually do is I keep a printout right next to my desk of all the code hints until I have them so memorized that it's no longer an issue of making a mistake between the two. Through out this tutorial we'll take a look at code hints and I'll point out how each code hint as I show you a new one when we look at different the components. s and I'll point out how each code hint as I show you a new one when we look at different the components.

Tutorial Information

Course: Macromedia Flash MX Intermediate Developer
Author: Eric Hake
SKU: 33424
ISBN: 1932072292
Release Date: 2003-04-15
Duration: 7 hrs / 93 lessons
Captions: For Online University members only
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 98,729 Video Tutorials (23,265 free)
  • Video Available as Flash or QuickTime
  • Over 1026 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available