Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Randomize Question



er.....i having problem wif..please rescue!!!!i have few questions to let user answer.Each frame contain a question.i want the sequence of my questions is randomize each time differnt user answer the question.I would like my next button to play another random page.How can i do that?please hav a look my fla file....thankx



KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 06-28-2004, 11:59 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Randomize
how do you random a variable in flash mx?
like the code for it?

let say for this
x = 2y

i want y and x to randomize from value -5 to 5
how do i do it?
do it set x and y as a varible and then what?

also another simple question
I'm making a math tutorial, how do i make it so if user gets 5 question correct it will take user to other screen? like setting a counter

all help appericated
thanks !

Randomize
I need to know how to get my web page to randomly display one of three swf files - change everytime you come back to the site homepage.

Does anybody know the code I need to get this happening?
Cheers

Jamie

Randomize()
theres a movie i'm working on, which involves generating random numbers. It seems a lot of the time I am getting the same numbers over and over (or very close to the same ones) I am trying to figure out how to keep this from happening.

My first thought is there is something in my algorithm causing the numbers to be limited to a very small confined range, but then I just remembered that in some languages you need to call a randomize() function of some sort to keep the numbers from only being random the first time.

Does flash have anything happening of this sort where you need to call some form of randomize() ?

this is my function I am using to create random numbers


Code:


function randomRange(min:Number, max:Number):Number
{
var theresult = min - 1;
if(max<min){theresult=min;min=max;max=theresult;}
if(min==max){max++;}

theresult = Math.round(Math.random() * (max - min + 1)) + min;

if(theresult<min){
return min;
}else if(theresult>max){
return max;
}else{
return theresult;
}
}



the min and max variables are typically something like 100 and 250 etc

Got Duplication Done....now To Randomize
Hi guys....long to no see

Got myself some troubles again.
I got this duplication thing going on working like this:

Duplicate Movie Clip ("/blok&name", blok&name, name)

and this going on for like 200 times. with adding 1 to every name with every duplicate.

Now I have about 200 of these mc's on my stage and I want to play them randomly untill every single one is done (the mc is 5 frames, fading out).

How to go about this....thx for the help already

Randomize An Aray?
Hello! Does nayone know a short script (Flash5) to make a new Array based on an existing one but with all items in random order? I've tried Array.Splice but I don't know much about programming.

Thanks a lot in advance! Jean-francois

How To Randomize An Objectposition?
Hi folks,

I want some dots in my flashmovie wich are on the screen for a second and next time on an other position. But I dont' want to animate it my hand. Is there someone with an idea for an actionscript to randomize the position of an object?

Help Randomize .attachSound
sibilance

i've got two sounds, both with linkage set up and named. i've been busting my head trying to:

a) randomize the sound that's loaded
b) using the same variable that the randomized sound is loaded into, play 3 times with a delay of 5 seconds

now, i've got a delay function working fine, but that's in a child movieClip that tells the _parent timeline when to stop and start. i'm assuming i need to pass the variable to the child movieClip, but have no idea how.

a little help, please?

Randomize Playing MC
hi guyz
wanna justa know, how to bloody Žell randomize running of some MC during playing the whole presentation.

(randomize= MC starts running 5 times in 5 minutes, alwayz after some randomized period of time, but never sooner than in 20 seconds)
object of randomizing: background flashes
thanx

Randomize Without Repeat.
I may have asked this before, but lost the thread.
Is there a code to get a random number, without repeating a number twice in a row? i.e 1,8,9,3,5,6,7,4,2 not 1,1,8,9,3,5,6,7,4

Randomize Button
hey
i'm making a game right now and i having trouble randomizing a button

I want to make it so once i press on a button it will either go to frame 5,136 and 139

how can i do this?

thanks in advance, yeah i'm a noob

Randomize Mc Play
i need some help......i was woundering if the was a way to script a random mc play....with a delay selection time.....and it atou runs it the background......or is "allways running".....help please
send an example here if u have one ready
k_j_j_2000@hotmail.com

Randomize Variables
I have 4 numbers and I want to randomly assign them to four variables, like this for example

3, 4, 7, 9


no1 = "7";
no2 = "9";
no3 = "4";
no4 = "3";

any help would be greatly appreciated.

Randomize An Array
I have a text array of questions followed by the correct answer and 3 wrong answers. Right now it has 10 questions. Works fine. BUT I want to have 25 questions out of which 10 are randomly selected each time the quiz is started. I am very new at this and basically "reverse programing" examples I've found. Can anyone point me to an example to look at?

Thanks,
Kay

Randomize Question.
I'm going to turn a SWF I'm working on into a Screen Saver. It will have no buttons or interaction. What I'm trying to figure out how to do is to have it randomize the begining part. I was looking into having it load an external SWF, or pulling an object straight from the Library.

What method would be the easiest? I don't want it to load a txt file or a JPG. I have short MC's I want to work with. I'm not very comfortable with scripting in Flash MX, I could probably hack some code up if somebody posted it, but that's about it. Anyone care to help me out here with an example of code where it'll either pick a random object from a Library folder, or even just pick a random frame on the main movie clip to show a varied intro before it goes into the heart of the screen saver.
Also about setting a timer, not all the clips are exactly the same length, but I would have to set some sort of timer so it wouldn't jump right to the next scene right?
thanks!

Randomize 3 MCs On A Scene? PLEASE HELP
Hi,

I need to randomize three movie clips on the scene when the file is open (onload) no on a button click etc. can anyone help?

Many thanks!

Organizing Randomize?
How do you "organize" the random feature so that when it repeatedly randomizes among 8 numbers, it does not choose the same number twice?

Randomize Pics
I am using Flash MX 2004 and was wondering what the scripting would be to randomize different pictures in the flash movie. Also i want them to randomize in about 5 seconds. How would i go about this? Thanks in advance!

Randomize An Array
hey folks, I've got an array

just 1,2,3,4,5 etc

I need to randomize it so all the entries are random without repeating an entry.

anyone help

How To Randomize Two Numbers?
I want to know how to randomize a variable between 0 and 1.Can you help me please?

Randomize Question
hey guys! can you help me with this one? im tryin to develop a game like a question and answer game.. ex: text twist. and it can tally the score afterwards can you give me some script or code for this one. thanx! godbless!!!!

Randomize Options
Hi guys,
currently ihave option mc's stored in an options_array and i assign text to the text field optionText sequentially by using a loop. The options text are stored in goObjMCMAInfo object.
totalChoices = goObjMCMAInfo.Quiz[0].options[0].option.length;


Code:
for (i = 0; i <totalChoices; i++){
options_array[i].optionText.text = goObjMCMAInfo.Quiz[0].options[0].option[i]._value;

}
now i want the options to be jumbled up instead of appearing in a sequential order. Can somebody please help

Randomize Options
Hi guys,
currently ihave option mc's stored in an options_array and i assign text to the text field optionText sequentially by using a loop. The options text are stored in goObjMCMAInfo object.

Code:
totalChoices = goObjMCMAInfo.Quiz[0].options[0].option.length;

Code:
for (i = 0; i <totalChoices; i++){
options_array[i].optionText.text = goObjMCMAInfo.Quiz[0].options[0].option[i]._value;

}
now i want the options to be jumbled up instead of appearing in a sequential order. Can somebody please help

Randomize My Array?
Hi,

Could someone tel me how I can randomize this array please?


ActionScript Code:
alphabet=new Array(null,"A","B","C","D", "E", "F", "G", "H)
nodez=[]
for(i=1;i<9;i++){
     node=_root["mov"+i];
     nodez[i]=node;
     node.startX=node._x;
     node.startY=node._y;
     node.cText=node.blockTxt.text=alphabet[i]
     node.onPress=onDrag
     node.onRelease=noDrag
     
}
_root.onEnterFrame=function(){
     var x1,y1,x2,y2,nodeA,nodeB
     for(i=1;i<9;i++){
          nodeA= nodez[i]
          for(j=i+1;j<nodez.length;j++){
               nodeB=nodez[j]
               if(nodeA.hitTest(nodeB)&&i!=j){
                    if(!dragging){
                        var temp1=nodeA.cText
                        nodeA.blockTxt.text=nodeB.cText
                        nodeB.blockTxt.text=nodeB.cText=nodeA.cText
                        nodeA.cText=nodeA.blockTxt.text
                               }
                   
               }
               
          }

Thank you in advance!

XML Playlist - Randomize HELP
I posted before, and am still stuck. I have a simple mp3 player that loads the songs and title from XML. Everything works, however I want it to randomly pick a song each time the page is loaded. I have tried a few different algorithms but with no luck. Here is my code:


Code:
volume_mc.slider_mc.useHandCursor = true;

var musicReq:URLRequest;
var music:Sound = new Sound();
var sc:SoundChannel;
var currentSound:Sound = music;
var pos:Number;
var songPlaying:Boolean = false;

var xml:XML;
var songlist:XMLList;
var currentIndex:Number = 0;

var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, whenLoaded);

function whenLoaded(e:Event):void
{
xml = new XML(e.target.data);
songlist = xml.song;
for(var j=0;j<songlist.length;j++) {
for(var i=0;i<songlist.length;i++) {
var k = Math.floor(Math.random()*songlist.length);
var t = songlist[i];
songlist[i] = songlist[k];
songlist[k] = t;
}
}
musicReq = new URLRequest(songlist[0].url);
music.load(musicReq);
sc = music.play();
title_txt.text = "Now Playing: "+ songlist[0].title;
sc.addEventListener(Event.SOUND_COMPLETE, nextSong);
}
loader.load(new URLRequest("http://www.recklessred.com/music.xml"));

next_btn.addEventListener(MouseEvent.CLICK, nextSong);
prev_btn.addEventListener(MouseEvent.CLICK, prevSong);
pause_btn.addEventListener(MouseEvent.CLICK,pauseSong);

stop_btn.addEventListener(MouseEvent.CLICK,stopSong);

function nextSong(e:Event):void
{
if (currentIndex < (songlist.length() - 1))
{
currentIndex++;
}
else
{
currentIndex = 0;
}

var nextReq:URLRequest = new URLRequest(songlist[currentIndex].url);
var nextTitle:Sound = new Sound(nextReq);
sc.stop();
title_txt.text = "Now Playing: "+ songlist[currentIndex].title;
sc = nextTitle.play();
songPlaying = true;
currentSound = nextTitle;
sc.addEventListener(Event.SOUND_COMPLETE, nextSong);
}

function prevSong(e:Event):void
{
if (currentIndex > 0)
{
currentIndex--;
}
else
{
currentIndex = songlist.length() - 1;
}

var nextReq:URLRequest = new URLRequest(songlist[currentIndex].url);
var prevTitle:Sound = new Sound(nextReq);
sc.stop();
title_txt.text = "Now Playing: "+ songlist[currentIndex].title;
sc = prevTitle.play();
songPlaying = true;
currentSound = prevTitle;
sc.addEventListener(Event.SOUND_COMPLETE, nextSong);
}

function pauseSong(e:Event):void
{
pos = sc.position;
sc.stop();
songPlaying = false;
play_btn.addEventListener(MouseEvent.CLICK,playSong);
}

function playSong(e:Event):void
{
if(songPlaying == false)
{
sc = currentSound.play(pos);
sc.addEventListener(Event.SOUND_COMPLETE, nextSong);
songPlaying = true;
play_btn.removeEventListener(MouseEvent.CLICK,playSong);
}
}

function stopSong(e:Event):void
{
sc.stop();
pos = 0;
songPlaying = false;
play_btn.addEventListener(MouseEvent.CLICK,playSong);
}

//----VOLUME----//
var dragging:Boolean = false;
var rect:Rectangle = new Rectangle(0,0,50,0);
volume_mc.slider_mc.addEventListener(MouseEvent.MOUSE_DOWN,dragIt);
volume_mc.slider_mc.addEventListener(MouseEvent.MOUSE_UP,dropIt);
stage.addEventListener(MouseEvent.MOUSE_UP,dropIt);

function dragIt(e:Event):void
{
dragging = true;
e.target.startDrag(false,rect);
e.target.addEventListener(MouseEvent.MOUSE_MOVE, adjustVolume);
}

function dropIt(e:Event):void
{
if (dragging)
{
var vol:Number = volume_mc.slider_mc.x * .02;
var st:SoundTransform = new SoundTransform(vol,0);
sc.soundTransform = st;
volume_mc.slider_mc.stopDrag();
volume_mc.slider_mc.removeEventListener(MouseEvent.MOUSE_MOVE, adjustVolume);
dragging = false;
}
}

function adjustVolume(e:Event):void
{
var vol:Number = volume_mc.slider_mc.x * .02;
var st:SoundTransform = new SoundTransform(vol,0);
sc.soundTransform = st;
}
You can see the player I am working on at http://www.recklessred.com

Thanks for the help!

Looping/randomize;)
hello, im creating an astronoid game for the mobile where I want the comets to attack from 8 different directions (the spaceship is in the middle of the screen).

Here I've got the code but I want to create it so it loads a comet (komet_mc) and then randomizes the choose of directions mentioned bellow:




//Direction 1
var komet_mc:MovieClip = attachMovie("komet", "komet_mc"+Counter, bulletScope.getNextHighestDepth());
komet_mc._x = spaceship_mc._x -200;
komet_mc._y = spaceship_mc._y -200;
komet_mc.onEnterFrame = function() {
this._x += 3;
this._y += 3;
};
//Direction 2
var komet_mc:MovieClip = attachMovie("komet", "komet_mc"+Counter, bulletScope.getNextHighestDepth());
komet_mc._x = spaceship_mc._x;
komet_mc._y = spaceship_mc._y -200;
komet_mc.onEnterFrame = function() {
this._y += 3;
};
//Direction 3
var komet_mc:MovieClip = attachMovie("komet", "komet_mc"+Counter, bulletScope.getNextHighestDepth());
komet_mc._x = spaceship_mc._x + 200;
komet_mc._y = spaceship_mc._y - 200;
komet_mc.onEnterFrame = function() {
this._x -= 3;
this._y += 3;
};

//Direction 4
var komet_mc:MovieClip = attachMovie("komet", "komet_mc"+Counter, bulletScope.getNextHighestDepth());
komet_mc._x = spaceship_mc._x - 200;
komet_mc._y = spaceship_mc._y;
komet_mc.onEnterFrame = function() {
this._x += 3;
};


Very thankful for any help!

Randomize Questions
ActionScript Code:
var myArray = new Array(1, 2, 3, 4);

Array.prototype.randomize = function() {
 return this.sort(function ([b]a, b[/b]) {trace(a+", "+b); return (random(2) == 0) ?[b]-1:-1[/b];});
}

trace(myArray.randomize());
1. Where did a and b come from?

2. What's the return 1, 0, -1 means?


Any expert can explain for me?

Randomize On Swf Reload
I'm trying to create a randomizing effect that will randomly display 1 of 6 movie clips once it is loaded. Then, with every reload of the swf, a randomly selected movie clip will display within the same swf.
Thanks for any suggestions/help.

2 Arrays Randomize Together
I've got 2 arrays that I want to randomize together. So if array one (1,2,3,4,5) is randomized to be (5,2,3,4,1), how can I have the second array randomize to that order?

///Here's my randomize function///
Array.prototype.rn= function()
{
ret= new Array();
var copy= this.concat();
while(copy.length > 0)
{
rnd=int(Math.random()*copy.length)
ret.push(copy[rnd])
copy.splice(rnd,1);
}
return ret
}

///Here's me calling the first array to be random///
b=zArray.rn();

how can I say "make the xArray correspond with the random order of the zArray" with AS?

Thanks
Igby

Randomize Options
Hi guys,
currently ihave option mc's stored in an options_array and i assign text to the text field optionText sequentially by using a loop. The options text are stored in goObjMCMAInfo object.
totalChoices = goObjMCMAInfo.Quiz[0].options[0].option.length;

Code:

for (i = 0; i <totalChoices; i++){
options_array[i].optionText.text = goObjMCMAInfo.Quiz[0].options[0].option[i]._value;

}
now i want the options to be jumbled up instead of appearing in a sequential order. Can somebody please help

Randomize Array
how can you randomize the results of an array in a for loop?

I am loading data in via xml and when doing a for loop to iterate through instead of showing 0, 1, 2, 3, 4 ect... how can i randomize for [i] ? If i do it in the for loop it keeps doing the randomizing and gets stuck and if after things are already loaded. how is it done?

Randomize On Swf Reload
I'm trying to create a randomizing effect that will randomly display 1 of 6 movie clips once it is loaded. Then, with every reload of the swf, a randomly selected movie clip will display within the same swf.
Thanks for any suggestions/help.

Randomize Questions
Hi

I have used the flash mx 2004 quiz template.  
I have 47 questions that i have set to ask a random 10.  I have done all this through the componant inspector.  Trouble is, it doesn't ask 10 questions - sometimes it asks a few sometimes them all ???

Anyone seen this before ?  Or does anyone know how to get to the code that is used within this template ?

cheers

Randomize In Flash
I have a problem. I have a movie clip with 10 frames. I want Flash to go and play a random frame of my movie clip. How can I do this? Thanks for your help and attention, I will wait your answers.

Randomize Pattern
I'd like aan action script to random a pattern with 2 movieclips. The movieclips are both square 20x20 pixels, but they have a different color. Let's say I want 15 squares (movieclips) on the x axes en 8 on the y axes.
Each time you load, the pattern will looks different, not in the form (15 squares x 8 squares) but in color impression.
I have to work with speciaal colors, is not possible voor what I need to randomize the value of r, g, b.

Thanks

worfoual

Repost: Randomize Problem
Sorry about reposting, but I really need the answer on this question!

I have this questionairre, similar to 'Who wants to be a millionaire?' [you'll have to excuse my spelling ]

What I need, is a system that both randomizes the questions, and, at the same time, prevents the same question appearing twice in the same session..

This is the code i use now, and it works fine, cept that it can show two questions in a row.. and that is a bad idea

So if you can look at it and perhaps give me a hint of how I can do it (you don't have to write the code for me, unless you really want to), because I have no clue..

One more thing; the code here is defines on frame 1 in tne questionairre, and buttons call the function 'toanswer' with a number from 0 to 3..

questions = ["What is the name of the Norwegian prime minister?",
"What is the application used to make this question called?",
"Which rock band has a song called 'Aurora'?",
"Why is this game called 'Egg game'?",
"In which movie was the following said: 'There is no spoon'"]

answers0 = ["Jens Stoltenberg",
"Jan Pettersen",
"Carl I. Hagen",
"Kjell Magne Bondevik"]

answers1 = ["Adobe Photoshop",
"Notepad",
"Macromedia Flash",
"Microsoft Word"]

answers2 = ["Rage Against The Machine",
"Papa Roach",
"Smashing Pumpkins",
"Foo Fighters"]

answers3 = ["No specific reason",
"The author thought it was a nice name",
"Because the author have no imagination",
"Because there is a egg-shaped score thing"]

answers4 = ["Crocodile Dundee",
"The Matrix",
"Speed",
"Rush Hour"]

correctanswer = [4,3,4,4,2]
currentq = Math.floor(Math.random()*5)
question = questions[currentq]
ans1 = eval("answers"+currentq)[0]
ans2 = eval("answers"+currentq)[1]
ans3 = eval("answers"+currentq)[2]
ans4 = eval("answers"+currentq)[3]

function toanswer(answer) {
if (answer == correctanswer[currentq]) {
egg._x += 10
} else {
egg._x -= 10
}
currentq = Math.floor(Math.random()*5)
question = questions[currentq]
ans1 = eval("answers"+currentq)[0]
ans2 = eval("answers"+currentq)[1]
ans3 = eval("answers"+currentq)[2]
ans4 = eval("answers"+currentq)[3]
}

Thanks in advance!

How Can I Randomize Variables From A .txt File?
I want to make a game with questions and answers. I plan to put them into a .txt file and then to pull them out in random order, but I don't know how do I do this. Can someone help me?

Randomize Load Movie...
Im looking to load 5 small movies in a random order.
My idea was to has 1 movie, that has a script that puts the movies in a random order, then loads them into itself. (therefore creating 6 movies in all)

Is this possible, if so, how. Also, how would i make sure that the first movie finishes before the next one is loaded?

Lastly, once all movies have been played, id like it to start again.

Any help, greatly appreciated.

Thanks.

BM

Randomize Quiz Questions
Ok, conceptually I think I know what I have to do but I am stuck on how to code it if someone could help or point me in the right direction mucho thanks.

I have coded a series of questions (38 total) seperated by framelabels on one timeline. What I need to do now is everytime the quiz is loaded 25 of the 38 Questions are picked at random and the user answers those questions, and gets a score at the end. I am thinking that I have to start by populating an array with 25 non-repeating numbers between 1 and 38, and then use that array to control what frame label to go to. But I have no effing clue on how to populate the array that way.

Thanks again for any help.

V

Randomize Part Of An Array?
I've been using this code to randomize arrays in my project:

arrayName.sort(function (a, b) {return random(3)-1;}

i have 11 arrays that have 4 items each. for each array I need to keep the last item at the end while the first three are randomized. how can i do this? thanks.

Randomize A Movie Clip
Hey,

I'm asking 4 a little help ..
i've made a movie clip with 6 frames, the MC (movie clip)
is my logo that appeares 2 have "reception problems"
and it sort of blurs...

i was wondering how should i write my script
that this MC would be activated randomly ... lets say
every 30 seconds (randomly ... not EVERY 30 secs ).

i will be more than glad if u could write the script ...
cause 4 the last few days i tried every thing .

10X

Randomize Array (smart)
hey all. i have a prototype function that randomizes the sequence of any array:

Array.prototype.randomizeArray = function () {
return this.sort(function(a,b) {return (Math.floor(Math.random()*2) == 0) ? 1 : -1;});
};

however, i would like to modify it so that it the randomization guarantees that the no element in the new sequence is in the same position as it was in the original sequence.

in other words, if i have animalArray=new Array("cat","dog","bunny") and i call animalArray.randomizeArray(); ... then i want to make sure that the new animalArray never has "cat" in position 0, nor "dog" in position 1, nor "bunny" in position 2. what is the most efficient way to do this?

cheers
j

Randomize Array (with Restrictions)
hey all. i have a prototype function that randomizes the sequence of any array:

Array.prototype.randomizeArray = function () {
return this.sort(function(a,b) {return (Math.floor(Math.random()*2) == 0) ? 1 : -1;});
};

however, i would like to modify it so that the randomization guarantees that the no element in the new sequence is in the same position as it was in the original sequence.

in other words, if i have animalArray=new Array("cat","dog","bunny") and i call animalArray.randomizeArray(); ... then i want to make sure that the new animalArray never has "cat" in position 0, nor "dog" in position 1, nor "bunny" in position 2. what would be the best way to go about doing this? any help would be greatly appreciated.

cheers
j

Randomize Function Call - Possible?
Greetings all,

I am hoping this is possible. What I want to do is call functions randomly.

For example, I have the following functions which do specific things:

Itemone_01()
Itemone_02()
Itemtwo_01()
Itemtwo_02()
etc

Can I call these functions randomly? Right now I have everything hard coded and things just go in sequence. Am hoping to spice things up a bit.

Any assistance will be greatly appreciated.

Thanks!

[F5] Randomize Penner's EaseOutBounce
My sliding text uses Robert Penner's easeOutBounce nicely to come to a halt just like train cars as each letter independently jars to a halt. Now I want to randomize some of the motion so the letter's halting appear less homogeneous. Anyone have a fuller understanding of the optimized code and where to play with some randomization of parameters? Here's the code of interest:

MovieClip.prototype.easeOutBounce = function (t, b, c, d){
if ((t/=d) < (1/2.75)) {
return c*(7.5625*t*t) + b;
} else if (t < (2/2.75)) {
return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
} else if (t < (2.5/2.75)) {
return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
} else {
return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
}
}

Randomize Where The Playhead Starts
I have what's seems to be pretty simple, but is not working out for me

I have a slideshow with motion tweens in it, very simple change photo looking thing. Only thing is I don't want the first frame to always play first, I would like to be random when the movie reloads. What AS would I use to tell on a load that I would like it randomized between five diff frames to start on? (ie: frame 1, 94, 178, 262, 346) Anybody have a simple solution to this???

Any help would be greatly appreciated, thanks!

-cB

Randomize Questions For A Quiz
Hey,

Does anyone know how I'd randomize quiestions for a quiz that I created. I have about 100 written questions, but I'd like for the quiz to randomly ask only 10 apiece (each time the quiz is taken). Therefore, no student would have the exact same quiz.

Any help is appreciated

NB

Randomize Object Position?
Okay, here's the deal. I'm trying to figure out how to randomize three objects in a single slide. You know three card monte? Same kind of deal, I've got three different images, one of which is the 'correct' one. I've got it to run perfectly, all I need to do is be able to randomize the order so the user won't automatically know where to click (it's all about deception). I'm guessing there's some way to do it using Arrays, but I have no clue how to go about that.

Anyway, I'd appreciate any help you all can offer.

Quiz Only Works With Randomize On?
I'm using the built in Flash quiz template for my quiz and found that when Randomize is on, I get a repeat of the first question every time and I've checked to make sure the question is only on the timeline once.

When I turn off Randomize, the quiz navigation no longer works. I have the questions set to navigation off and I'm using the instance of "mc, frameNav" called "nav" built into the quiz template.

Has anyone else encountered this problem?

The FLA file is too big to attach, please PM me and I can send it to you.

Thanks in advance!

How To Randomize The Questions Of A Quiz?
I did a quiz in flash using xml.. everything is working well but how do i randomize the questions everytime i run the fla file?? all the questions will appear but no similiar qns will appear twice.. the fla file can be downloaded from the link below..

http://www.geocities.com/qiuling_ang/quiz_tutor2.fla

the xml file...

Code:
<?xml version="1.0"?>
<!DOCTYPE quiz [
<!ELEMENT quiz (title, items)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT items (item)+>
<!ELEMENT item (question, answer, answer+)>
<!ELEMENT question (#PCDATA)>
<!ELEMENT answer (#PCDATA)>
<!ATTLIST answer correct (y) #IMPLIED>
]>

<quiz>
<title>The Quiz</title>
<items>

<item>
<question>You need to obtain an Import Permit through TradeNet before goods are imported into Singapore.</question>
<answer correct="y">True</answer>
<answer>False</answer>
</item>

<item>
<question>Certain high-technology products are subject to export control by the exporting country, therefore you need to apply for Import Certificate and Delievery Verification Certificate (ICDV).</question>
<answer correct="y">True</answer>
<answer>False</answer>
</item>

<item>
<question>What is the purpose of ICDV?</question>
<answer>To ensure items are safely exported from Singapore.</answer>
<answer correct="y">To ensure items are in fact imported into Singapore and are not diverted or re-export to a proscribed destination.</answer>
<answer>To ensure items are in fact imported into destinated countries.</answer>
<answer>To ensure items are in fact imported into Singapore and are diverted or re-export to a proscribed destination.</answer>
</item>

<item>
<question>If your goods are non-controlled and are exported by sea or air, you need to </question>
<answer>obtain an export permit through TradeNet within 5 days of export.</answer>
<answer>obtain an export permit through TradeNet within 4 days of export.</answer>
<answer>obtain an export permit through TradeNet within 7 days of export.</answer>
<answer correct="y">obtain an export permit through TradeNet within 3 days of export.</answer>
</item>

<item>
<question>If your goods are controlled or are exported by road and rail, you do not need to obtain an Export Permit through TradeNet before goods are exported out of Singapore.</question>
<answer>True</answer>
<answer correct="y">False</answer>
</item>

<item>
<question>Which are the products that require Export Approval?</question>
<answer>Textile Products</answer>
<answer>Fresh-Cut Orchids</answer>
<answer>Aquarium Fish</answer>
<answer correct="y">All of the above</answer>
</item>

<item>
<question>What do you need to obtain before goods can be imported into Singapore through Transhipment? </question>
<answer correct="y">Transhipment Permit</answer>
<answer>Export Permit</answer>
<answer>Import Permit</answer>
<answer>All of the above</answer>
</item>

<item>
<question>Certificate of Origin (CO) enables buyers to claim preferential tariff treatment when importing company's products under</question>
<answer>Free Trade Agreement (FTA)</answer>
<answer>Common Effective Preferential Tariff (CEPT)</answer>
<answer>Generalised System of Preferences (GSP)</answer>
<answer correct="y">All of the above</answer>
</item>

<item>
<question>To qualify for a CO, the manufacturer must register his factory with the Documentation Specialists Branch, Singapore Customs and his product do not need to qualify as being of Singaporean origin.</question>
<answer>True</answer>
<answer correct="y">False</answer>
</item>

<item>
<question>To qualify as of Singapore origin, the product must be either</question>
<answer>Wholly obtained in Singapore AND manufactured in Singapore from materials and parts which are either wholly or partly imported.</answer>
<answer correct="y">Wholly obtained in Singapore OR manufactured in Singapore from materials and parts which are either wholly or partly imported.</answer>
</item>

<item>
<question>Your product must have a minimum of ___ % local content in order to qualify for an Ordinary CO.</question>
<answer correct="y">25</answer>
<answer>45</answer>
<answer>50</answer>
<answer>75</answer>
</item>

</items>
</quiz>

Copyright © 2005-08 www.BigResource.com, All rights reserved