flash8编程经典个案
点击次数:33 次 发布日期:2008-11-21 23:31:02 作者:源代码网
|
step 1: 打开flash8,新建一个项目,保存名为:helloworld.flp,这时在你的目录下有: helloworld.flp,helloworld.flp为flash项目文件。 /*
原创:[url]http://www.oiasoft.com/[/url] 作者:korpton [email]korpton@163.com[/email] 日期:2006/10/13 */ class helloworld{ public function sayHello(fWord:String):String{ var hello:String = "Hello, " + fWord; return hello; } } 保存。 /*
原创:[url]http://www.oiasoft.com/[/url] 作者:korpton [email]korpton@163.com[/email] 日期:2006/10/13 */ var myhello:helloworld = new helloworld(); hello_lab.text = myhello.sayHello("World"); step 5: helloworld.flas 和 helloworld.as 两个文件加入到项目中!打开项目窗口,菜单为:窗口->项目 快捷键为: shift+F8。在项目窗口中点选调试器 -> 添加文件 -> 加入刚才的两个文件即可完成加入项目。
|

helloworld.rar