Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…12cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
juliantenney committed Sep 9, 2010
1 parent 8190e46 commit 15da0b9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion modules/xerte/parent_templates/Nottingham/Nottingham.rlt
@@ -1 +1 @@
<LO description="A flexible template for creating interactive learning objects" targetFolder="Nottingham" version="1.0" styleSheet="templatePath + 'common/styles.css'" inputColour="0xFFFFCC" selectableText="1" templateData="FileLocation + 'template.xml'" name="Xerte Online Toolkit"> <SCR name="makePages"><![CDATA[//loop through the xml and insert a page of the right type for each page typeifc = icon.nextSibling;pageStore = icon.parentNode.getChildByName('pageStore');linkIndex = -1;if (templateData.learningObject[0].navigation == 'Menu'){ pgOffset = 2; newXML = new XML('<PG model="templatePath + \'models/menu.rlm\'"/>'); newChild = newXML.firstChild; newChild.attributes.title = 'Main Menu'; newChild.attributes.linkID = extXML.firstChild.childNodes[i].attributes.linkID; ifc.appendChild(newChild);} else { pgOffset = 1;}//custom interfaceif (templateData.learningObject[0].controller != undefined){ icon.nextSibling.attributes.swf = templateData.learningObject[0].controller; icon.nextSibling.attributes.visuals = 0;}//help fileif (templateData.learningObject[0].nfo != undefined){ icon.nextSibling.attributes.helpfile = templateData.learningObject[0].nfo;}//default text sizeif (templateData.learningObject[0].textSize != undefined){ STYLES.defaultSize = templateData.learningObject[0].textSize; STYLES.inputSize = templateData.learningObject[0].textSize;}for (i = 0; i < extXML.firstChild.childNodes.length; i++){ //build this file dynamically modName = extXML.firstChild.childNodes[i].nodeName; if (modName == 'xerteModel'){ newXML = new XML('<PG model="' + extXML.firstChild.childNodes[i].attributes.modelFile + '"/>'); //is there an initObject...? if (extXML.firstChild.childNodes[i].attributes.initObject != undefined){ newXML.firstChild.attributes.initObject = extXML.firstChild.childNodes[i].attributes.initObject; } } else { newXML = new XML('<PG model="templatePath + \'models/' + modName + '.rlm\'"/>'); } newChild = newXML.firstChild; newChild.attributes.title = extXML.firstChild.childNodes[i].attributes.name; newChild.attributes.linkID = extXML.firstChild.childNodes[i].attributes.linkID; if (extXML.firstChild.childNodes[i].attributes.linkID == _level0.linkID && extXML.firstChild.childNodes[i].attributes.linkID != undefined){ linkIndex = i; } ifc.appendChild(newChild);}]]></SCR> <IFC name="interface" title="My Learning Object" visuals="1"> <FW_ENT id="entryFrame" name="background"> <DIS initObject="{_alpha:15}" h="515" w="800" tabIndex="-1" id="bgImage" name="background" x="0" y="1" type="ext" url="{templateData.learningObject[0].background}"><![CDATA[]]></DIS> <SCR isFunc="1" name="navToPage"><![CDATA[for (i = 0; i < extXML.firstChild.childNodes.length; i++){ if (extXML.firstChild.childNodes[i].attributes.name == args[0]) { rootIcon.gotoPage(i); }}]]></SCR> <SCR name="setup"><![CDATA[rootIcon.loadIcon(expression(templateData.learningObject[0].ic, engine));if (templateData.learningObject[0].navigation != 'Menu'){ icon.nextSibling.firstChild.removeNode();} else { rootIcon.hideControls(); rootIcon.tocBtn._visible = true; rootIcon.tocBtn._x = 740; toc = rootIcon.tocBtn;}]]></SCR> <INT id="myInt" name="narrationHandlers" perpetual="0"> <RES name="mainMenu" type="event" eventName="onRelease" icon="rootIcon.tocBtn" erase="1" exit="0"> <SCR name="gotoMenu"><![CDATA[rootIcon.gotoPage(0);]]></SCR> </RES> <RES name="showAudio" type="event" eventName="showAudio" icon="rootIcon" erase="1" exit="0"> <SND id="nar" controls="25,0,975" name="narration" type="ext" url="{narration}" play="0" loop="0" wait="0" /> <SCR name="setup"><![CDATA[nar._y = -14;nar._x = 0;nar._yscale = 80;nar._xscale = 80;nar.clear();nar.beginFill(STYLES.titleBarColour,100);nar.drawRect(22,0,130,20);]]></SCR> </RES> <RES name="killYoutubePlayer" type="event" eventName="onClosePage" icon="rootIcon" erase="1" exit="0"> <SCR name="hideNarration"><![CDATA[if (engine[ytID] != undefined){ engine[ytID].destroy(); delete engine[ytID];}]]></SCR> </RES> <RES name="exitPreview" type="event" eventName="exitPreview" icon="rootIcon" erase="1" exit="0"> <SCR name="[Untitled]"><![CDATA[if (engine[ytID] != undefined){ engine[ytID].stopVideo(); engine[ytID].destroy(); engine[ytID].removeMovieClip()); delete engine[ytID];}]]></SCR> </RES> <RES name="onInit" type="event" eventName="onInit" icon="rootIcon" erase="1" exit="0"> <SCR name="jump"><![CDATA[rootIcon.preloadMedia();if (templateData.learningObject[0].displayMode != undefined){ rootIcon.setDisplayMode(templateData.learningObject[0].displayMode);}if (linkIndex != -1){ rootIcon.gotoPage(linkIndex);}]]></SCR> </RES> </INT> </FW_ENT> </IFC> <BIN myLongVarName="A variable for tracking the user" name="Deleted Items" /> </LO>
<LO description="A flexible template for creating interactive learning objects" targetFolder="Nottingham" version="1.0" styleSheet="templatePath + 'common/styles.css'" inputColour="0xFFFFCC" selectableText="1" templateData="FileLocation + 'template.xml'" name="Xerte Online Toolkit"> <SCR name="makePages"><![CDATA[//loop through the xml and insert a page of the right type for each page typeifc = icon.nextSibling;linkIndex = -1;if (templateData.learningObject[0].navigation != 'Linear'){ pgOffset = 2; newXML = new XML('<PG model="templatePath + \'models/menu.rlm\'"/>'); newChild = newXML.firstChild; newChild.attributes.title = 'Main Menu'; newChild.attributes.linkID = extXML.firstChild.childNodes[i].attributes.linkID; ifc.appendChild(newChild);} else { pgOffset = 1;}//custom interfaceif (templateData.learningObject[0].controller != undefined){ icon.nextSibling.attributes.swf = templateData.learningObject[0].controller; icon.nextSibling.attributes.visuals = 0;}//help fileif (templateData.learningObject[0].nfo != undefined){ icon.nextSibling.attributes.helpfile = templateData.learningObject[0].nfo;}//default text sizeif (templateData.learningObject[0].textSize != undefined){ STYLES.defaultSize = templateData.learningObject[0].textSize; STYLES.inputSize = templateData.learningObject[0].textSize;}for (i = 0; i < extXML.firstChild.childNodes.length; i++){ //build this file dynamically modName = extXML.firstChild.childNodes[i].nodeName; if (modName == 'xerteModel'){ newXML = new XML('<PG model="' + extXML.firstChild.childNodes[i].attributes.modelFile + '"/>'); //is there an initObject...? if (extXML.firstChild.childNodes[i].attributes.initObject != undefined){ newXML.firstChild.attributes.initObject = extXML.firstChild.childNodes[i].attributes.initObject; } } else { newXML = new XML('<PG model="templatePath + \'models/' + modName + '.rlm\'"/>'); } newChild = newXML.firstChild; newChild.attributes.title = extXML.firstChild.childNodes[i].attributes.name; newChild.attributes.linkID = extXML.firstChild.childNodes[i].attributes.linkID; if (extXML.firstChild.childNodes[i].attributes.linkID == _level0.linkID && extXML.firstChild.childNodes[i].attributes.linkID != undefined){ linkIndex = i; } ifc.appendChild(newChild);}]]></SCR> <IFC name="interface" title="My Learning Object" visuals="1"> <FW_ENT id="entryFrame" name="background"> <DIS initObject="{_alpha:15}" h="515" w="800" tabIndex="-1" id="bgImage" name="background" x="0" y="1" type="ext" url="{templateData.learningObject[0].background}"><![CDATA[]]></DIS> <SCR isFunc="1" name="navToPage"><![CDATA[for (i = 0; i < extXML.firstChild.childNodes.length; i++){ if (extXML.firstChild.childNodes[i].attributes.name == args[0]){ rootIcon.gotoPage(i); }}]]></SCR> <SCR name="setup"><![CDATA[rootIcon.loadIcon(expression(templateData.learningObject[0].ic, engine));if (templateData.learningObject[0].navigation == 'Linear'){ icon.nextSibling.firstChild.removeNode();} else { if (templateData.learningObject[0].navigation == 'Menu'){ rootIcon.hideControls(); rootIcon.tocBtn._visible = true; rootIcon.tocBtn._x = 740; toc = rootIcon.tocBtn; } if (templateData.learningObject[0].navigation == 'Menu with Page Controls'){ rootIcon.hideControls(); rootIcon.backBtn._visible = true; rootIcon.backBtn._x = 640; rootIcon.tocBtn._visible = true; rootIcon.tocBtn._x = 690; rootIcon.nextBtn._visible = true; rootIcon.nextBtn._x = 740; toc = rootIcon.tocBtn; }}]]></SCR> <INT id="myInt" name="narrationHandlers" perpetual="0"> <RES name="mainMenu" type="event" eventName="onRelease" icon="rootIcon.tocBtn" erase="1" exit="0"> <SCR name="gotoMenu"><![CDATA[rootIcon.gotoPage(0);]]></SCR> </RES> <RES name="showAudio" type="event" eventName="showAudio" icon="rootIcon" erase="1" exit="0"> <SND id="nar" controls="25,0,975" name="narration" type="ext" url="{narration}" play="0" loop="0" wait="0" /> <SCR name="setup"><![CDATA[nar._y = -14;nar._x = 0;nar._yscale = 80;nar._xscale = 80;nar.clear();nar.beginFill(STYLES.titleBarColour,100);nar.drawRect(22,0,130,20);]]></SCR> </RES> <RES name="killYoutubePlayer" type="event" eventName="onClosePage" icon="rootIcon" erase="1" exit="0"> <SCR name="hideNarration"><![CDATA[if (engine[ytID] != undefined){ engine[ytID].destroy(); delete engine[ytID];}]]></SCR> </RES> <RES name="exitPreview" type="event" eventName="exitPreview" icon="rootIcon" erase="1" exit="0"> <SCR name="[Untitled]"><![CDATA[if (engine[ytID] != undefined){ engine[ytID].stopVideo(); engine[ytID].destroy(); engine[ytID].removeMovieClip()); delete engine[ytID];}]]></SCR> </RES> <RES name="onInit" type="event" eventName="onInit" icon="rootIcon" erase="1" exit="0"> <SCR name="jump"><![CDATA[rootIcon.preloadMedia();if (templateData.learningObject[0].displayMode != undefined){ rootIcon.setDisplayMode(templateData.learningObject[0].displayMode);}if (linkIndex != -1){ rootIcon.gotoPage(linkIndex);}]]></SCR> </RES> </INT> </FW_ENT> </IFC> <BIN myLongVarName="A variable for tracking the user" name="Deleted Items" /> </LO>
Expand Down
20 changes: 11 additions & 9 deletions modules/xerte/parent_templates/Nottingham/data.xwd
Expand Up @@ -3,7 +3,7 @@
<learningObject icon="icPackage" remove="false" duplicate="false">

<name type="TextInput" label="Learning Object Title"/>
<navigation type="ComboBox" options="Linear,Menu" label="Navigation" width="100"/>
<navigation type="ComboBox" options="Linear,Menu,Menu with Page Controls" label="Navigation" width="170"/>
<textSize type="ComboBox" options="10,12,14,16,18,24,36" label="Default Text Size" width="100"/>
<displayMode type="ComboBox" options="default,full screen,fill window" label="Display Mode" width="100"/>

Expand All @@ -29,7 +29,7 @@

<dialog><![CDATA[<dialog name="Enter Page Title" text="Enter text for the page here" attempts="2"/>]]></dialog>

<categories><![CDATA[<categories name="Enter Page Title" text="Enter text for the page here" labelSize="Small"/>]]></categories>
<categories><![CDATA[<categories name="Enter Page Title" text="Enter text for the page here"/>]]></categories>
<gapFill><![CDATA[<gapFill name="Enter Page Title" text="Enter text for the page here" passage="Enter interactive text here. To mark words for the exercise select the word using the mouse and right-click, choosing 'mark word' from the menu." interactivity="Drag Drop" feedback="Enter feedback here" panelWidth="Medium"/>]]></gapFill>
<timeline><![CDATA[<timeline name="Enter Page Title" text="Enter text for the page here" interactivity="Timeline" feedback="Enter feedback here"/>]]></timeline>
<annotatedDiagram><![CDATA[<annotatedDiagram name="Enter Page Title" text="Enter text for the page here" url="Select an Image" tip="Enter a tooltip for the image" colour="0xFFFF00" shape="None"/>]]></annotatedDiagram>
Expand All @@ -50,7 +50,7 @@
<columnPage><![CDATA[<columnPage name="Column Page"/>]]></columnPage>


<links><![CDATA[<links name="Enter Page Title" text="Enter Page Text" cols="3" height="Medium"/>]]></links>
<links><![CDATA[<links name="Enter Page Title" text="Enter Page Text" cols="3" height="80"/>]]></links>
<xerteModel><![CDATA[<xerteModel name="Enter Page Title" modelFile="Select a Model"/>]]></xerteModel>
<captivate><![CDATA[<captivate name="Enter Page Title" url="Select a Captivate SWF File"/>]]></captivate>
<jing><![CDATA[<jing name="Enter Page Title" url="Select a Jing SWF File"/>]]></jing>
Expand All @@ -59,7 +59,7 @@
<textSWF><![CDATA[<textSWF name="Enter Page Title" align="Left" url="Select a SWF File" tip="Enter a Tooltip" >Enter text for the page here</textSWF>]]></textSWF>
<videoSynch><![CDATA[<videoSynch name="Enter Page Title" url="Select a Movie" text="Enter text for the page here" pause="True" erase="True"/>]]></videoSynch>

<morphImages><![CDATA[<morphImages name="Enter Page Title" text="Enter Page Text" url="Select Image" url2="Select Image" zoomSpeed="3"><hotspot name="zoom region" x="0" y="0" w="100" h="100" /></morphImages>]]></morphImages>
<morphImages><![CDATA[<morphImages name="Enter Page Title" text="Enter Page Text" url="Select Image" tip1="Enter tooltip for image 1" url2="Select Image" tip2="Enter tooltip for image 2" buttonLabel="Zoom" zoomSpeed="3"><hotspot name="zoom region" x="0" y="0" w="100" h="100" /></morphImages>]]></morphImages>

<imageViewer><![CDATA[<imageViewer name="Enter Page Title" align="Left" url="Select an Image">Enter text for the page here</imageViewer>]]></imageViewer>
<transcriptReader><![CDATA[<transcriptReader name="Enter Page Title" sound="Select a Sound File" text="Enter text for the page here" panelWidth="Medium"/>]]></transcriptReader>
Expand Down Expand Up @@ -100,8 +100,11 @@

<name type="TextInput" label="Page Title"/>
<text type="TextArea" height="250" label="Text"/>
<url type="media" label="Image One" optional="true"/>
<url2 type="media" label="Image Two" optional="true"/>
<url type="media" label="Image One"/>
<tip1 type="TextInput" label="Tooltip 1"/>
<url2 type="media" label="Image Two"/>
<tip2 type="TextInput" label="Tooltip 2"/>
<buttonLabel type="TextInput" label="Button Label"/>
<zoomSpeed label="Zoom Speed" type="NumericStepper" min="1" max="10" step="1"/>

</morphImages>
Expand Down Expand Up @@ -446,7 +449,6 @@

<name type="TextInput" label="Page Title"/>
<text type="TextArea" height="250" label="Text"/>
<labelSize type="ComboBox" label="Label Size" options="Small,Medium,Large" width="100"/>

<narration type="media" label="Narration" optional="true"/>

Expand Down Expand Up @@ -602,7 +604,7 @@
<sound optional="true" type="media" label="Sound"/>
<narration type="media" label="Narration" optional="true"/>
<magnifier optional="true" type="checkBox" defaultvalue="false" label="Magnifier"/>

</textGraphics>


Expand Down Expand Up @@ -672,7 +674,7 @@
<narration type="media" label="Narration" optional="true"/>
<movieSize type="textInput" label="Movie Size" optional="true"/>
<controls type="ComboBox" label="Interactivity" optional="true" options="Control Bar,Native SWF" defaultValue="Control Bar" width="100"/>
<initObject type="TextInput" label="Init Object" optional="true"/>
<initObject type="TextArea" height="60" label="Init Object" optional="true"/>

</textSWF>

Expand Down

0 comments on commit 15da0b9

Please sign in to comment.