Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
In this movie we'll take a look at some differences between ActionScript 2.0 and ActionScript 3.0. There are no Exercise Files for this movie. It's just for you to watch, especially if you know ActionScript 2.0 already. If you don't, that's OK too. Let's take a look at the ActionScript 2.0 section of this code, on line three. To create a text field you have to put the text field inside of a movie clip and then call that createTextField method. Specify an instance name, some width and height values, positioning, and a depth.
In ActionScript 3.0, to create a new text field, you simply create a new instance of the text field class and you can specify all the other properties later on. One reason this is useful is because you don't have to remember the create text field method. It's simply creating a new text field. Let's consider the next example. If we want to pull a movie clip symbol out of our library at runtime, you have to call a movie clip name.attachMovie, the symbol name in your library, the new instance name, and a depth value.
To create a new movie clip with ActionScript 3.0, we simply say, create a new instance of the movie clip class. We can set the properties for this instance later on, but the syntax is the same whether we want a create a text field, or to create a movie clip. Now this is just an isolated example, not everything in ActionScript 3.0 is less code, but the point it's standardized. Create a new text field; create a new movie clip. So in this example we've created a new instance of the text o f class, a new instance of the movie clip class, but the point is, it's standardized. It doesn't matter whether I'm creating a text field, a movie clip, a shape, or many many other objects. It's standardized in ActionScript 3.0, once you know how to use it and that makes it easier to learn and easier use.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 102042 Viewers
61 Video lessons · 88764 Viewers
71 Video lessons · 72577 Viewers
56 Video lessons · 104221 Viewers
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.