If anyone can help I'll be eternally grateful. What I am trying to do is build a component to build quiz questions most of the types of question are fairly easy:-
typed answer, essay answer, true/false
The problems come when I want to build multiple choice questions. What I have done is to build a movie clip called OptionBox (the reason being, I want to asign other values inside the movie not used directly on the CheckBox & it's easier to move the Movie clip as opposed to the CheckBox component)to use as a component when the user selects the multiple choice question type they are asked how many answers they would like. The movie then attaches the required number of instances of the OptionBox movie the code is below
create_boxes(5,20);
function create_boxes(num,dis){
for(var i=1; i<=num;i++){
var id = "Option "+String(i);
var yPos;
if(num==1){
yPos =0;
}else{
yPos = i*dis;
}
attachMovie("OptionBox", id, i, {_x:0,_y:yPos});
}
}
The problem that I have I that I want to assign the .label to a string value by using the id variable that I defined above.
What I have thought about is defining a variable in
OptionBox and then using this to set the value of the CheckBox component inside OptionBox but I am unsure of the way to go about this or if it is the best way to do it? Any suggestions would be appreciated
THe Start of wisdom is to realise you know nothing. I'll be a genius then!
typed answer, essay answer, true/false
The problems come when I want to build multiple choice questions. What I have done is to build a movie clip called OptionBox (the reason being, I want to asign other values inside the movie not used directly on the CheckBox & it's easier to move the Movie clip as opposed to the CheckBox component)to use as a component when the user selects the multiple choice question type they are asked how many answers they would like. The movie then attaches the required number of instances of the OptionBox movie the code is below
create_boxes(5,20);
function create_boxes(num,dis){
for(var i=1; i<=num;i++){
var id = "Option "+String(i);
var yPos;
if(num==1){
yPos =0;
}else{
yPos = i*dis;
}
attachMovie("OptionBox", id, i, {_x:0,_y:yPos});
}
}
The problem that I have I that I want to assign the .label to a string value by using the id variable that I defined above.
What I have thought about is defining a variable in
OptionBox and then using this to set the value of the CheckBox component inside OptionBox but I am unsure of the way to go about this or if it is the best way to do it? Any suggestions would be appreciated
THe Start of wisdom is to realise you know nothing. I'll be a genius then!