Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2008
    Posts
    13

    Quiz Template with Images / Flash / Video

    I need to use the Quiz Template but I need each question to show an image or flash or video depending on the question.

    How can I modify the .quiz file to have it show an image/flash/video for each question?

  2. #2
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    If it were me I would look at adding a line into the XML file that references the object that you want to show for each question. For instance I would use the following

    <multimedia type="flash">path-to-file</multimedia>

    Then when you load the question I would check for the type of multimedia and then get the file name and load it into the appropriate object.
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  3. #3
    Join Date
    Dec 2008
    Posts
    13
    Thank you.

    I'm using the quiz template from AMS 7.5. I dont really know how to insert this line of code and where in the application the video will show. How can I insert the image/video/flash into the page and the info into the file sample.quiz that has all the questions information.


    This template has only 2 pages: one where the questions appears and one with the final information after completing the quiz.

    Also tried with a file that I downloaded from the forum

    Multiple_Choice_XML_Quiz This one uses a combo box for the answers and uses an xml file.

    I'm really new with this.

  4. #4
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    Here is one way to accomplish this task This uses an image/video/flash object on the same page to play/show the component. The quiz has questions with and without the files so you can see how it works if you have a mixed quiz.

    I added this to the Populate Quiz function on the Global functions page

    Code:
    --check for multimedia file
    Image.SetVisible("Image1", false);
    Flash.SetVisible("Flash1", false);
    Flash.Stop("Flash1");
    Video.SetVisible("Video1", false);
    Video.Stop("Video1");
    local strtype = XML.GetAttribute(strXMLPath.."/multimedia", "type");
    local strFile = XML.GetValue(strXMLPath.."/multimedia");
    --Dialog.Message(strtype, strXMLPath.."\r\n"..strFile);
    if strtype == "video" then
    	if File.DoesExist(_SourceFolder..strFile) then
    		Video.SetVisible("Video1", true);
    		Video.Load("Video1", _SourceFolder..strFile, true, false);
    	end	
    elseif strtype == "flash" then
    	if File.DoesExist(_SourceFolder..strFile) then
    		Flash.SetVisible("Flash1", true);
    		Flash.Load("Flash1", _SourceFolder..strFile, true, true);
    	end	
    elseif strtype == "image" then
    	if File.DoesExist(_SourceFolder..strFile) then
    		Image.SetVisible("Image1", true);
    		Image.Load("Image1", _SourceFolder..strFile);
    	end	
    end
    this just looks for the multimedia compnent for a question and if it exists it will play/show the appropriate object.

    Here is the structure of the XML file with the added multimedia component(see red lines below).

    Code:
    <item>
    	<question type="mc">What number comes immediately after 1?</question>
    	<multimedia type="image">/AutoPlay/Images/post-it.png</multimedia>
    	<answer correct="y">2</answer>
    	<answer>3</answer>
    	<answer>4</answer>
    	<answer>5</answer>	
    </item>
    <item>
    	<question type="mc">What number comes immediately after 2?</question>
    	<multimedia type="flash">/AutoPlay/Flash/globe.swf</multimedia>
    	<answer correct="y">3</answer>
    	<answer>5</answer>
    	<answer>6</answer>
    	<answer>7</answer>
    </item>
    <item>
    	<question type="mc">What number comes immediately after 3?</question>
    	<multimedia type="video">/AutoPlay/Videos/Magnolia.mpg</multimedia>
    	<answer correct="y">4</answer>
    	<answer>7</answer>
    	<answer>9</answer>
    	<answer>1</answer>
    </item>
    project file attached using the sample files from AMS for flash, video and images. replace with appropriate content.

    HTH
    Tigg
    Attached Files
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  5. #5
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    The alternate method I thought about using was to have the multimedia content displayed in a DialogEx window. I may try to post an example of this later, but don't have the time now to play with it. I think this would be a cleaner way (and more fun) to display those objects.

    Tigg
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

  6. #6
    Join Date
    Dec 2008
    Posts
    13
    Thank you. I will try and let you Know.

    Once again thanks

  7. #7
    Join Date
    Oct 2009
    Posts
    3

    Thank you for quiz but..................

    Please, how to save the selected answers.........................

  8. #8
    Join Date
    Oct 2009
    Posts
    3

    But how to save in html or excel or txt format

    please, help me.
    How to save the selected answers...................

  9. #9
    Join Date
    Sep 2002
    Location
    Sol 3
    Posts
    3,160
    In the example the selected answers are stored in the XML with the attribute of selected='y'. You could modify the function that checks for the correct answers and have it output the selected answers to a table or string that could then be output to an HTMl file or you could save it as a CSV.

    HTH
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

Similar Threads

  1. Quiz Template and images question
    By sue in forum AutoPlay Media Studio 5.0
    Replies: 10
    Last Post: 02-27-2006, 04:16 AM
  2. lowest flash version
    By LegoGirl in forum AutoPlay Media Studio 4.0
    Replies: 13
    Last Post: 07-31-2003, 06:04 AM
  3. HOWTO: Create a Page Template
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-26-2002, 05:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts