I am trying to develop a multiple choice quiz using learning interactions (components)
It will be a series of 4 checkboxes, and if the checkbox chosen is wrong a certain mc will play, and if it is right a different mc will play.
So far, I have 2 tests going and I realize that I need to set
a boolean value to true in order for this to work the way I want.
When I have this code the mc plays as soon as the movie starts:
<hr>
function onChange(component)
{
if (component._name == “Checkbox1”)
_root.attachMovie(“wrong1”,“wrong2”,200);
}
<hr>
Well, I realized I had not told it to play only if the instance “Checkbox1” is true, so I tried this:
<hr>
function onChange(component)
{
if (component._name == “Checkbox1” && “Checkbox1” == true)
_root.attachMovie(“wrong1”,“wrong2”,200);
}
<hr>
When I preview the movie and select “Checkbox1” , nothing happens.
I wonder do I need to use an else if statement rather than trying to put it in the same section as the name equals, or what?
I am not sure what I am doing wrong.
Also, when the mc was playing (in the first example) it was cut off, only half the clip was showing. Any ideas about this as well?