如果想在输出面板中排列出一个乘法口诀表请用以下方法
package {
import flash.display.MovieClip;
public class cheng extends MovieClip {
public function cheng() {
for (var a:int=1; a<10; a++) {
var b:String="";
for (var c:int=1; c<=a; c++) {
b=b+(c+"*"+a+"="+c*a)+ " ";
}
trace(b);
txt.text=String(b);
}
}
}
}