开发者

Flash Packages and Inheritance

Why human cannot find God in this structure ?

c:\myproject\src\
    main.as
    human.as
    com\god\
        God.as
   开发者_StackOverflow中文版     IGod.as

human.as :

import com.*;
public class human extend God implements IGod {

}


Because god is hiding in his own folder, and humans can only see files (ActionScript does not import recursively). If you import this way:

import com.god.*
public class human extend God implements IGod {
    ...
}

it should work.


"*" means all classes in that package, not all classes of all sub-packages of that package.

Try

import com.god.*;

Instead.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜