前一段做的个小东西,没多少代码,但非常繁琐,希望哪位高人给指点一下。主要代码如下:
主要是三个物体的换位问题,点击两边的按钮时判断中间的是什么图形,同时判断自身是什么图形,然后使中间的图形交替
on(press){
if(_root.here=="yuan"){
if(_root.aaa._currentframe<=5){
_root.bbb.gotoandplay("yuan");
}if(_root.aaa._currentframe<=13 and _root.aaa._currentframe>5){
_root.bbb.gotoandplay("fang");
}if(_root.aaa._currentframe<=21 and _root.aaa._currentframe>13){
_root.bbb.gotoandplay("sanjiao");}
_root.aaa.gotoAndplay("yuan");
}
if(_root.here=="fang"){
if(_root.aaa._currentframe<=5){
_root.bbb.gotoandplay("yuan");
}if(_root.aaa._currentframe<=13 and _root.aaa._currentframe>5){
_root.bbb.gotoandplay("fang");
}if(_root.aaa._currentframe<=21 and _root.aaa._currentframe>13){
_root.bbb.gotoandplay("sanjiao");}
_root.aaa.gotoAndplay("fang");
}
if(_root.here=="sanjiao"){
if(_root.aaa._currentframe<=5){
_root.bbb.gotoandplay("yuan");
}if(_root.aaa._currentframe<=13 and _root.aaa._currentframe>5){
_root.bbb.gotoandplay("fang");
}if(_root.aaa._currentframe<=21 and _root.aaa._currentframe>13){
_root.bbb.gotoandplay("sanjiao");}
_root.aaa.gotoAndplay("sanjiao");
}
}