Actionscript 3 Flash AS3琐事游戏错误答案图形需要出现在舞台上的3个位置

Actionscript 3 Flash AS3琐事游戏错误答案图形需要出现在舞台上的3个位置,actionscript-3,flash,scoring,Actionscript 3,Flash,Scoring,我正在创建一个琐事游戏,在这个游戏中,用户每轮回答一定数量的问题,如果他们答错了3个问题,他们就会失败。当一个问题被标记为不正确时,一个x从左到右放置在一个框中,每个x进入一个位于其各自位置的框中 根据回答错误的问题,我很难让x去他们的位置 这是一个游戏的图像 以下是我正在使用的代码: var questions:Array=['"I look like a dangling parsnip in this!" she cried. "I will never __________ these

我正在创建一个琐事游戏,在这个游戏中,用户每轮回答一定数量的问题,如果他们答错了3个问题,他们就会失败。当一个问题被标记为不正确时,一个x从左到右放置在一个框中,每个x进入一个位于其各自位置的框中

根据回答错误的问题,我很难让x去他们的位置

这是一个游戏的图像

以下是我正在使用的代码:

var questions:Array=['"I look like a dangling parsnip in this!" she cried. "I will never __________ these jeans!',
                 "Tell the freckled parrot to put his car in __________.",
                 "When purchasing a buttercream trowel, always choose one made of __________.",
                 "Everybody has a cracked snowflake. The question is, __________ one is yours? ",
                 "Standing at the dock, the loopy basket watched the cruise ship set __________ without him. ",];
var answers:Array=[   ["wear","where"], ["idle","idol"], ["steel","steal"] ,[ "which","witch"] ,[ "sail","sale"] ];

var qno=0;var rnd1; var rnd2;
tick.visible=false;cross1.visible=false;
var right_answers=0;var wrong_answers=0;

shade1.buttonMode = true;
shade1.useHandCursor = true;

shade2.buttonMode = true;
shade2.useHandCursor = true;


function change_question(){
if(tick.visible){right_answers++;}
if(cross1.visible){wrong_answers++;}
if(qno==questions.length){gotoAndPlay(60);}else{
tick.visible=false;cross1.visible=false;
rnd1=Math.ceil(Math.random()*3);
rnd2=Math.ceil(Math.random()*questions.length)-1;
q.text=questions[rnd2];
if(questions[rnd2]=="x"){change_question();}
questions[rnd2]="x";
enable_disable(1);
if(rnd1==1){opt1.text=answers[rnd2][0];opt2.text=answers[rnd2][1];}
if(rnd1==2){opt1.text=answers[rnd2][0];opt2.text=answers[rnd2][1];}
if(rnd1==3){opt1.text=answers[rnd2][0];opt2.text=answers[rnd2][1];}
if(rnd1==4){opt1.text=answers[rnd2][0];opt2.text=answers[rnd2][1];}
if(rnd1==5){opt1.text=answers[rnd2][0];opt2.text=answers[rnd2][1];}
}}

function enable_disable(a){
if(a==0){shade1.mouseEnabled=false;shade2.mouseEnabled=false;}
if(a==1){shade1.mouseEnabled=true;shade2.mouseEnabled=true;}}

change_question();


shade1.addEventListener(MouseEvent.CLICK, ButtonAction2);
shade2.addEventListener(MouseEvent.CLICK, ButtonAction3);


function ButtonAction2(eventObject:MouseEvent) {
enable_disable(0);if(rnd1==1) {tick.visible=true;tick.y=shade1.y}else{cross1.visible=true;cross1.y=shade1.y}
//qno++;change_question();
}
function ButtonAction3(eventObject:MouseEvent) {
enable_disable(0);if(rnd1==2){tick.visible=true;tick.y=shade2.y}else{cross1.visible=true;cross1.y=428.55}
//qno++;change_question();
}

非常感谢您的帮助,如果需要更多信息,请告诉我。提前谢谢。

为什么不制作一个4帧的电影剪辑呢。第1帧中没有任何内容。第2帧中有1个x。第3帧有2个x,第4帧有3个x。当他们弄错的时候,只需增加框架。只要你能用强硬的方式做事,就去做@阿斯曼对你的问题有一个绝妙的解决办法。@阿斯曼听上去会完全满足我的需要。谢谢