28. //
gAS // gotoAndStop();
gAP // gotoAndPlay();
29.
30. // MyClass.as
public class MyClass
{
private var strTitle:String;
private var _price_code:int;
public function get_price_code ():int
{
return _price_code;
}
public function setPriceCode (arg:int):void
{
_price_code = arg;
}
..
}
32. // MyClass.as
public class MyClass //
{
public static const NAME:String //
private var _price:int; // private
public function get_price_code():int // function
{
return _price;
}
public function set_username(name:String):void //
{
var age:int = 30; //
}
}
33. // Member.as
public class Member
{
...
public function member_info():String { .... }
public function get_member_info():String { .... }
public function user_info():String { .... }
public function get_user():String { .... }
..
}
34.
35.
36. // MyClass.as
package tw.eddie.com {
public class MyClass
{
...
private var _title:String; //
public function get_price_code ():int
{
return _price_code;
}
..
}
}
37.
38. // BookStore.as
public class BookStore
{
...
public function setBookInfo (bookname:String, author:String, total_page:int,
amount:int, price:int, publish_date:String, is_available:Boolean):void
{
...
}
..
}
39. //
book = new Book("Hello AS3", 1, 320, 550, "2011/6/21");
// ?
book = new Book();
book.name = “Hello AS3”;
book.amount = 1;
book.page = 320;
book.price = 550;
book.publish_date = “2011/6/21”
40. // MyClass.as
public class MyClass
{
...
public function set_user (username:String = “guest”):void
{
...
}
..
}
41. // ?
book = new Book(“hello AS3”, true, false);
//
book = new Book(“hello AS3”, Book.IS_AVAILABLE, Book.IN_STOCK);
42.
43.
44.
45.
46. // BookStore.as
/**
* BookStore ...
*
*
*/
public class BookStore
{
/**
* ASDoc
*/
public function setBookInfo(book:Book):void
{
...
}
..
}
http://livedocs.adobe.com/flex/3/html/help.html?content=asdoc_9.html
47. // BookStore.as
public class BookStore
{
...
public function setBookInfo(book:Book):void
{
book.count += 1; // 1
...
}
..
}
88. Thank You!
2011/6/21
Kaos’ Digital Network, Ltd.
TEL +886-2-2682-4700
No.26, Ln. 248, Junying St., Shulin Dist., New Taipei
City 238, Taiwan (R.O.C.)
Welcome to visit http://digik.tw for more information!