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
- How to blend adsense inside your post?
- Formatting my post
- Notepad++ - Add C++ compiler
- Install PHPMailer 5.2.4 and use smtp gmail
- Set up a child account and set screen time limit in Windows 8
- Wayback Machine - see archived versions of web pages across time
- phpexcel toggle expand and hide column in EXCEL and summary
- Install PHP ibm_db2 extension in Linux (redHat)
- PHP: add a download as pdf file button in report page
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