[Xerte] Re: Narration oddness (Wizards)
Kemp Johnathan
johnathan.kemp at ntlworld.com
Tue Apr 26 20:17:44 BST 2011
Hello Deborah,
Is there an optional property in your wizard that offers narration?
If not, then you can add it to the xwd file in the page's folder (each Page
Wizard based page has its own folder. Inside that folder are the xml and xwd
files for the page and changes to these will affect your page. Remember
changing the .rlm file will do nothing to your page as Xerte only uses that
file as information to enable it to build the icon structure for the page in
the .rlo file)
You can check what needs to be added to the xwd file and where by comparing
your xwd file to that from one of my pages in the sample project. If you use
my gapFill page as the example to copy from then you should see the code for
the autoNarration property as well.
Once you have a narration property in the wizard and have added it and
assigned a file to it then you can turn your attention to the getPageID
script for your page in the icon structure of the Xerte project.
Pretty much the last section of that script will be the narration block. You
need to copy the block from my page to your page. Best way to do this is to
open my project in Xerte. Select my gapFill page and then select the
getPageID script and look at the code. Copy the code for the complete
Narration section into notepad, just as a temporary measure. Then close my
project, open your own Project and then open your page's getPageID script.
Then paste in my narration block. Below is an example of the block. The
gapFill page with the option to have narration auto play is slightly
different with an if { } block around the nar.play(); statement.
*if (pageIcon.templateData.learningObject[0].dialog[0].narration !=
undefined){*
*
*
* narration = pageIcon.templateData.learningObject[0].dialog[0].narration;*
*
*
* rootIcon.broadcast('showAudio');*
* nar.play();*
*}*
Note that the blue bits must match the page you are pasting this into. I
think for the gapFill page they will read "gapFill" and not "dialog". You
can tell what they should be as the code will be riddled with
pageIcon.templateData.learningObject[0].pageType[0] statements, where
pageType will be dependent on the Page Wizard used for the page.
That should just about do it. All narration needs to work is
1. The narrationHandler.rlm model on the entryFrame as in the demo project.
2. The xwd file to have the narration option so that the user can add the
narration property and select a file to be narrated.
3. Code in getPageID to action narration if the wizard has a narration
property defined.
Use my project as a model to guide you. The Page Wizards are based on pages
in PageTemplates. I am not sure if all of them offer narration. If a page in
PageTemplates does not offer narration then it is likely that narration has
not been included in the Page Wizard equivalent. However even then the above
information should enable you to add narration.
If you still cannot get your project to work if you want to email me a
zipped up example of what you are doing I will try to figure out what it is
that is tripping everything up.
Kind regards
Johnathan
On 26 April 2011 11:13, Deborah Delin <admin at strivney.com> wrote:
> Hi Jonathan,
>
> Thank you for sending me the narration test to try out - I can confirm that
> it works as expected when tested. But I am unable to re-create correct
> narration on my desktop............
>
> I think my problem may be a version thing because the script that you
> mentioned on the getPageID which relates to narration:
>
> *if (pageIcon.templateData.learningObject[0].dialog[0].narration !=
> undefined){*
> *
> *
> * narration =
> pageIcon.templateData.learningObject[0].dialog[0].narration;*
> *
> *
> * rootIcon.broadcast('showAudio');*
> * nar.play();*
> *}*
>
> doesn't appear in the getPageID script on the learning object I create on
> my desktop. I confirm that I downloaded the latest version of wizards which
> you posted to the Wiki on 19/4/11. This is the script on my getPageID:
>
> *pageIcon = icon.parentNode.clip();*
> *
> *
> *//myXML = new XML(extXML.firstChild.childNodes[rootIcon.getPageIndex() -
> pgOffset]);*
> *
> *
> *//pageIcon.templateData = myXML.toObject();*
> *
> *
> *pageIcon.templateData = pageIcon.extXML.toObject();*
> *
> *
> *
> *
> *
> *
> *//rootIcon.setTitleText(templateData.learningObject[0].name);*
> *
> *
> *
> *
> *
> *
> *
> *
> *
> *
> *ts = STYLES.inputSize;*
> *
> *
> *
> *
> *
> *
> *//icon.parentNode.getChildByName('passage').attributes.textSize = ts;*
> *
> *
> *//icon.parentNode.getChildByName('lbls').attributes.textSize = ts;*
> *
> *
> *
> *
> *
> *
> *panelWidth =
> pageIcon.templateData.learningObject[0].gapFill[0].panelWidth;*
> *
> *
> *if (panelWidth == "Small"){*
> *
> *
> * panelW = 300;*
> *
> *
> * textW = 440;*
> *
> *
> *} else if (panelWidth == "Medium"){*
> *
> *
> * panelW = 450;*
> *
> *
> * textW = 290;*
> *
> *
> *} else if (panelWidth == "Large"){*
> *
> *
> * panelW = 600;*
> *
> *
> * textW = 150;*
> *
> *
> *} else {*
> *
> *
> * panelW = 760;*
> *
> *
> * textW = 0;*
> *
> *
> *}*
>
> If I add the script pertaining to narration to my script, the narration
> still doesn't show up. Where am I going wrong?
>
> Many thanks in advance for your help.
>
> Deborah
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it. Please do not
> use, copy or disclose the information contained in this message or in any
> attachment. Any views or opinions expressed by the author of this email do
> not necessarily reflect the views of the University of Nottingham.
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
>
> _______________________________________________
> Xerte mailing list
> Xerte at lists.nottingham.ac.uk
> http://lists.nottingham.ac.uk/mailman/listinfo/xerte
>
> This message and any attachment are intended solely for the addressee and
> may contain confidential information. If you have received this message in
> error, please send it back to me, and immediately delete it. Please do not
> use, copy or disclose the information contained in this message or in any
> attachment. Any views or opinions expressed by the author of this email do
> not necessarily reflect the views of the University of Nottingham.
>
> This message has been checked for viruses but the contents of an attachment
> may still contain software viruses which could damage your computer system:
> you are advised to perform your own checks. Email communications with the
> University of Nottingham may be monitored as permitted by UK legislation.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20110426/8a80cc85/attachment.html>
More information about the Xerte
mailing list