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.
精彩评论