Flash AS3常用的关于MC的代码

http://www.webjx.com/  2009-12-07 09:20:48  来源:网页教学网 

Webjx核心提示:AS3常用代码(关于mc).

yi_mc.wb_txt.text="星期一";
er_mc.wb_txt.text="星期二";
san_mc.wb_txt.text="星期三";
si_mc.wb_txt.text="星期四";
var wb1="年龄:111111<br>名字:落落<br>学历:帝吧军"
var wb2="222222222"
var wb3="333333333"
var wb4="444444444"
var wb:String=wb1;
stage.addEventListener(Event.ENTER_FRAME,cfzx);
function cfzx(e) {
 if (nr_mc.currentFrame==5) {
  nr_mc.nr_txt.htmlText=wb;
 }
}

yi_mc.addEventListener(MouseEvent.CLICK,yi);
function yi(e) {
 wb = wb1;
 nr_mc.play()
// nr_mc.nr_txt.htmlText="年龄:111111<br>名字:落落<br>学历:帝吧军";
}
er_mc.addEventListener(MouseEvent.CLICK,er);
function er(e) {
 wb = wb2;
 nr_mc.play()
// nr_mc.nr_txt.htmlText="22222222222222";
}
san_mc.addEventListener(MouseEvent.CLICK,san);
function san(e) {
 wb = wb3;
 nr_mc.play()
// nr_mc.nr_txt.htmlText="3333333333";
}
si_mc.addEventListener(MouseEvent.CLICK,si);
function si(e) {
 wb = wb4;
 nr_mc.play()
// nr_mc.nr_txt.htmlText="4444444444";
}

更多