Your First Flash ActionScript 3 Code
This is the first series of Flash ActionScript 3 tutorials. The first tutorial print out a text "Hello World" on the stage of the Flash movie. The second tutorial will auto-size the TextField with the text "Hello World". Then the third tutorial will align the text "Hello World" to the stage center of our Flash Movie.
Flash Tutorial Content:
Like most other programming languages, we also start learning Flash ActionScript 3 by printing out the "Hello World" on the stage of flash movie. The "blue cross" is just showing the center of the stage. We will align the "Hello World" to the center of the stage later.
We do not give details in how to create a new Flash File, how to draw objects on stage, how to rename instance name of MovieClips and how to open ActionScript window. Please check with other Flash tutorials on the Internet.
Okay! Let's get started. Remember that it is fun to learn Flash ActionScript. Therefore be relax and have fun......
Flash ActionScript Codes:
// Add Content to Text Field
textField_txt.text = "Hello World";
Download Flash Source File:
We noticed that it is very difficult to draw the size of the Dynamic Text Field fit to the text "Hello World". In the next page we will use ActionScript to resize the TextField to fit the text automatically.