Online computer courses, code, programming tutorial and sidebar information for monitoring Canadian S&P/TSX index. Build friendship and networking. Welcome to visit my blogs often!!! I also have two other sites: YouTube Channel and Google site.
Adsense
Popular Posts
- PHPWind-- A PHP forum script applcaition in China
- Free host forum is not reliable
- Formatting my post
- Powerful js library datable to export table in pdf, excel, sorting, freezing column and table header fixed (sticky)
- job interview questions (1)
- Set up a child account and set screen time limit in Windows 8
- PHP: add a download as pdf file button in report page
- phpexcel toggle expand and hide column in EXCEL and summary
- WinMerge - file and folder differencing and merging tool for Windows
- PHP connect IBM db2 database in XAMPP
Sunday, December 19, 2010
Adobe flash CS5 -actionscript 3.0 -- HelloWorld
Download a free trial of Flash Professional CS5 is HERE
1) Open Flash Professional CS5
2) File ->New->ActionScript 3.0 Class, type class: MyHelloWorld, type following code
package {
public class MyHelloWorld {
public function MyHelloWorld() {
// constructor cod
public function sayHello():String {
var greeting:String = "Hello World!";
return greeting;
}
}
}
3) Save as MyHellowWorld.as
4) File->New->ActionScript 3.0, Click T in the right menu bar
draw a rectangle in the center, change <instance name> in T in the right panel
as hello_txt
4) push keyboard F9 outside of the rectangle box, type following code:
import HelloWorld;
var classInstance:HelloWorld = new HelloWorld();
hello_txt.text = classInstance.sayHello();
5) Save as MyHelloWorld.fla
6) Control->Test Movie->in Flash Professional or (Ctrl enter)
you can watch swf file
7) File->Export->Export Movie, save as MyHelloWorld.swf
8) My result:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment