Random Frame Choice with no repeat


i working on flash game , have 1 major problem left!  have series of questions each own movie clip in flash.  have 13 different questions , 13 different movie clips, 1 each.  issue having this.  during course of game question repeat itself, , dont want that.  have tried make question selection random , without repeat have succeeded random part @ point.

 

this code for frame 1:

function randframe(cframe){

goframe = random(11)+2;

if (goframe == cframe){

while (cframe == goframe){

goframe = random(11)+2;

}

gotoandplay(goframe);

}

else{

gotoandplay(goframe);

}

}

and code frames 2-14 (or each question):

myarray = new array (1);
     stop();

 

can please tell me doing wrong , why game still repeats questions??  questions, comments, , advice welcomed , thank in advance helps!!!

 

kapelski

i surprised lack of responses on thread.  interested in being hired solve problem??



More discussions in Adobe Animate CC - General


adobe

Comments

Popular posts from this blog

Hur installera Joomla på One.com - Joomla! Forum - community, help and support

removing index.php from URL address - Joomla! Forum - community, help and support

「イメージマップのアンカー名には、...」のエラーが出ないようにしたい