[Actionscript3] 纯文本查看 复制代码
package inte
{
public class Class2
{
var c1:Class1 = new Class1();
public function Class2()
{
// constructor code
}
//二班的属性和方法都是public
public var teacher2:String = "武老师";
public function pri2(en:String)
{
trace("我们二班的英语老师是:"+en);
}
//用二班的这个方法来访问一班的属性和方法
public function pri2_1()
{
c1.pri1(c1.teacher1);
}
}
}