.flash filename="access.swf" bbox=420x440 version=9 fps=12 background=#CCCCCC .edittext log width=400 height=150 color=black multiline html .edittext lo2 width=400 height=50 color=black multiline html .put log x=10 y=200 .action: package { import flash.display.*; import flash.text.*; public dynamic class exp extends Sprite { var tf=new TextField(); function exp () { tf.text="text fiefd contents in exp class"; tf.border=true; addChild(tf); } } } .end # action .circle c1 r=34 fill=red .sprite sp1 .put lo2 .put c1 30 30 .end #sprite .put sp1 0 50 .action: package { import flash.display.* public dynamic class main extends MovieClip { function trace (s) { this.log.text+=s+"\n"; } public function main (){ trace("object access in swfc declaration way"); trace(" textfield in a root sprite "+this.sp1.lo2); trace(" a circle in the same sprite "+this.sp1.c1); trace(" the sprite "+ this.sp1); var a=new exp(); trace("my class "+a); trace("a textfield in this class "+a.tf); trace(" "+a.tf.text); } } } .end # action .end # .flash