|
-
Quiz template actionscript...
Hi Guys,
I'm using Flash's inbuilt learning object templates to create a multiple choice quiz. However the quiz template actiionscript is so well hidden I cannoty find it - even when I look in the movie explorer and find it is hidden in the frameNav mc.
I need to insert an explanation page after each question in the quiz so the answer and explanation appears after each question. If I simply did this the quiz would work but not with randomizing the questions (as you can do in the component inspector).
A better solution would be to find the actionscript for the quiz template and make a button display when the control button is clicked and the feedback given. This button could load a mc containing the text explanation for the question, and unload when next question is clicked at the bottom.
I'm really struggling here and would appreciate any help you can give. Try using the generic flash quiz template as a starting point and you'll see what I mean.
Have a ace Christmas anyway as this is my last day in work!!! - yeeeaaaay!
Cheers
-
I'm sure you will have found it by this time but for other people sake:
The code behind the quiz templates and the learning interactions are written in AS1. In the library, browse under the folders "Quiz Files > Learning Interactions > Assets > Controls". In there, you'll find another folder called "ComponentSuperClass". Open the movieclip "SuperClass". In it, you'll find all the code common to all question types. For the code specific to the question type itself, go to the "components" folder and open the respective movieclip.
For the logic that controls the questions and the sequencing (including randomization), you have to go to the folder "Quiz Files > Assets > Controls > ComponentSuperClass".
Finally, be careful. If you are using these templates with an LMS (SCORM or AICC), you'll find that the latency is not transfered to the LMS. There is a small bug in the HTML publish template. In the DoFSCommand function, there is a loop where the condition is <9 when in fact it should be <=9.
Open it helps someone!
Whyves
-
Cheers for the reply Dude...
Sorry to ask this but the code seems to be all to do with question weighting and knowledge tracking - although I must say I am impressed with how well commented it is...
Could I write AS2 (as I only know this) into the file to alter the navigation button as I mention above?
Here is the section from SuperClass that deals with navigation:
LToolBox.prototype.setNavigation = function (){
if (this.navigation == 0){
this.setComponentState(this.Assets.ControlButton, false);
}
else if (this.navigation == 1) {
if (!this.buttonFlag || this.buttonFlag == false){
this.setComponentLabel(this.Assets.ControlButton, this.buttonLabels[3]);
this.buttonFlag = true;
}
else{
if(this.navAction == false){
if(!this.navLabel){
this.assets_path.nextFrame();
}
else {
this.assets_path.gotoAndStop(this.navLabel);
}
}
else if(this.navAction == true){
if(!this.navLabel){
this.assets_path.gotoAndPlay(this._currentframe+1) ;
}
else {
this.assets_path.gotoAndPlay(this.navLabel);
}
}
}
}
else if (this.navigation == 2) {
this.assets_path.nextFrame();
}
}
I presume navigation is set to 1 when the button is clicked? Does this mean that I need to enter code here to make a button display when the control button is clicked and the feedback given? This button should load a mc containing the text explanation for the question, and unload when next question is clicked at the bottom.
Thanks for your help mate - I appreciate that quiz templates aren't the sexiest feature of Flash...
-
First, AS1 and AS2 are basically almost the same thing. AS2 is AS1 in disguise so yes you can use it in the code.
The setNavigation function is actually called after the button was clicked and its event handler processed. If you want to actually intercept the click itself, you have to go in the onMCButton function located in the MultipleChoice component. This is also where the feedback is actually set and where the call to setNavigation is made.
As for the navigation label, it is not set through code but rather through the Options tabs in the Component Inspector (Shift+F7). So, you cannot assume that it is 1 because the button was clicked. By default, it is 0 because the navigation is set to off in the properties. When it is off, the control button will be disabled after it has been clicked.
Hope it helps ...
-
WOW - cheers Dude... I'm in the middle of another project right now but when I get back to it tomorrow I think you've given me the info I need...
Cheers Again
-
I want go to next question without answering the question and click on "check answer".
would you please help me?
-
I want go to next question without answer the question and click on "check answer". would you please help me?
-
 Originally Posted by yombi69
WOW - cheers Dude... I'm in the middle of another project right now but when I get back to it tomorrow I think you've given me the info I need...
Cheers Again
I want go to next question without answer the question and click on "check answer". would you please help me?
-
 Originally Posted by Whyves
First, AS1 and AS2 are basically almost the same thing. AS2 is AS1 in disguise so yes you can use it in the code.
The setNavigation function is actually called after the button was clicked and its event handler processed. If you want to actually intercept the click itself, you have to go in the onMCButton function located in the MultipleChoice component. This is also where the feedback is actually set and where the call to setNavigation is made.
As for the navigation label, it is not set through code but rather through the Options tabs in the Component Inspector (Shift+F7). So, you cannot assume that it is 1 because the button was clicked. By default, it is 0 because the navigation is set to off in the properties. When it is off, the control button will be disabled after it has been clicked.
Hope it helps ...
I want go to next question without answer the question and click on "check answer". would you please help me?
-
AS 3.0 quiz?
What about AS 3.0 quiz templates? I can't seem to find any usable templates online. I'm even willing to pay for them. I need a template using AS 3.0 that tracks the score and forces the user to get 100% on the quiz before receiving a certificate.
Does anyone know where I can find something like this?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|