好的,有人真的可以帮助我解决这个问题,我一直在努力工作直到这一点。最后一件事是我需要的 nextquestion1 函数将我带到我的应用程序的最后一个。
我单击按钮nextQuestion_btn
将我带到我拥有的一个标记框架。我点击它,没有任何反应。两个事件监听器之间也有很多缺失的代码,你知道的。
那么......我怎样才能制作这个代码,以便我可以用按钮触发下一帧?
stage.addEventListener(Event.CHANGE, checkTotal1000)
function checkTotal1000(e:Event){
var tech:Number = parseInt(tech_txt.text);
var med:Number = parseInt(med_txt.text);
var space:Number = parseInt(space_txt.text);
var genetic:Number = parseInt(ge_txt.text);
var worldComp:Number = parseInt(worldComp_txt.text);
var mars:Number = parseInt(mars_txt.text);
var worldColab:Number = parseInt(worldColab_txt.text);
var nothing:Number = parseInt(nothing_txt.text);
var zombieApocFinal:Number = zombieApoc + genetic;
var robotApocFinal:Number = robotApoc+ tech;
var plagueFinal:Number = plague + med;
var asteroidFinal:Number = asteroid + mars;
var iceAgeFinal:Number = iceAge + nothing;
var aliensFinal:Number = aliens + space;
var nukeWarFinal:Number = nukeWar + worldComp;
//var happyEverAfterFinal:Number = ;
trace(aliensFinal);
var total1000:Number = tech + med + space +
worldComp + mars + genetic + worldColab + nothing;
nextQuestion_btn.addEventListener(MouseEvent.MOUSE_DOWN, nextQuestion1)
function nextQuestion1(e:MouseEvent){
if(tech && med && space && genetic && worldComp
&& mars && worldColab && nothing == 125){
gotoAndStop(7);
}
if(robotApocFinal > zombieApocFinal && plagueFinal &&
asteroidFinal && iceAgeFinal && aliensFinal &&
nukeWarFinal){
gotoAndStop("Robot");
}
else if(zombieApocFinal > robotApocFinal && plagueFinal &&
asteroidFinal && iceAgeFinal && aliensFinal &&
nukeWarFinal){
gotoAndStop("Zombie");
}
else if( plagueFinal > zombieApocFinal && robotApocFinal &&
asteroidFinal && iceAgeFinal && aliensFinal &&
nukeWarFinal){
gotoAndStop("Plague");
}
else if( asteroidFinal > zombieApocFinal && robotApocFinal &&
plagueFinal && iceAgeFinal && aliensFinal &&
nukeWarFinal){
gotoAndStop("Asteroid");
}
else if( iceAgeFinal > zombieApocFinal && robotApocFinal &&
plagueFinal && asteroidFinal && aliensFinal &&
nukeWarFinal){
gotoAndStop("IceAge");
}
else if( aliensFinal > zombieApocFinal && robotApocFinal &&
plagueFinal && asteroidFinal && iceAgeFinal &&
nukeWarFinal){
gotoAndStop("Aliens");
}
else if( nukeWarFinal > zombieApocFinal && robotApocFinal &&
plagueFinal && asteroidFinal && iceAgeFinal &&
aliensFinal){
gotoAndStop("Nuke");
}
}
}