- class 名稱必須與 檔案名稱完全一致
- package 名稱必須與 目錄名稱完全一致
- 名稱的大小寫有別
- 如果package/class儲存的目錄並非現行目錄 必須手動將其加入class path
Edit -> Preferences -> ActionScript 3.0 Language Settings - 用到的class 都必須import, 例如 import mypack.class1;
//===
- case sensitive
- class name must match file name
- package name must match directory(folder) name
- class path setting need to be added if .as is saved in directory other than current dir/flash system dir by "Edit -> Preferences -> ActionScript 3.0 Language Settings ..."
- has to import the class, e.g. import mypack.class1;
[ref]
http://stackoverflow.com/questions/1259699/actionscript-3-import-package-vs-import-package-class
http://www.actionscript.org/resources/articles/698/1/Make-your-own-reusable-classes-using-Flash-and-AS3/Page1.html
http://www.foundation-flash.com/tutorials/packages/
沒有留言:
張貼留言