Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Flash CS5 has several tools for working with ActionScript 3.0. One of those is improved Code Hinting. In the Actions panel, I'm going to create a variable called myLoader. I'll datatype it to Loader and create a new instance of the Loader class. You'll notice that as soon as I type the word 'Loader,' Flash automatically imports that code for me. The really exciting improvement, however, lies in the code hinting for your custom variables. So if I type this and a dot and I start to type myLoader, you'll see that it gets highlighted in the code, and I can use the Return key to autocomplete that code for me.
So Flash actually knows your own variables. Flash also knows your own custom functions. For example, if I created a function called myFunction, Flash would recognize that. If I type the 'this' keyword and then a dot and you start to type myFunction, you'll see that it gets highlighted in the Code Hinting window, and if you press Return, Flash will autocomplete that for you. Further, this works if you're going to add parameters.
Flash will give you code hinting for them. So if I create a parameter called param1, and that were a Number, I could create another one that's a string, so param2, datatype it to a String, then when I open the parentheses for my function, I'll get code hinting for the parameters. So I can see that param1 is the name of the first parameter. It wants a number, and then after I type that - I'll type a comma - param2 is then highlighted, and Flash is telling me that it wants a String, so I could type in a string there.
So using the new Code Hinting features in Flash CS5, you're less likely to make a mistake in writing your code because Flash will give you the code hinting that you need to make sure you're accessing the right variables, the right functions, and that you're inputting the right datatypes into those functions.
Get unlimited access to all courses for just $25/month.Become a member
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.