Skip to content

Commit

Permalink
Fixed the non-scrolling audio slideshow children
Browse files Browse the repository at this point in the history
git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@476 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
juliantenney committed Nov 12, 2012
1 parent d860a3b commit bab7f3d
Showing 1 changed file with 1 addition and 1 deletion.
@@ -1 +1 @@
<PG title="Audio Slideshow" name="audioSlideshow"> <SCR name="getPageID"><![CDATA[pageIcon = icon.parentNode.clip();if (rootIcon.projMode == "dev"){ // Page Wizard pageIcon.templateData = pageIcon.extXML.toObject(); pageIcon.templateData = pageIcon.templateData.pageWizard[0];} else { // Toolkits myXML = new XML(extXML.firstChild.childNodes[rootIcon.getPageIndex() - pgOffset]); pageIcon.templateData = myXML.toObject();} rootIcon.setTitleText(templateData.learningObject[0].name); // handle multiple page data definitions in a project if (rootIcon.projectPageIndex == undefined){ rootIcon.projectPageIndex = 0;}// check if this page has a definition for the current project index and default to 0 if notif (pageIcon.templateData.audioSlideshow[rootIcon.projectPageIndex].name == undefined){ projPI = 0;} else { projPI = rootIcon.projectPageIndex; } itemCount = pageIcon.templateData.audioSlideshow[projPI].nestedPage.length);panelWidth = pageIcon.templateData.audioSlideshow[projPI].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 (pageIcon.templateData.audioSlideshow[projPI].narration != undefined){ narration = pageIcon.templateData.audioSlideshow[projPI].narration; rootIcon.broadcast('showAudio');}]]></SCR> <DIS h="474" w="panelW" tabIndex="-1" id="panel" name="panel" x="780 - panelW" y="20" type="ext" url="templatePath + 'common/whitePanel.swf'"><![CDATA[]]></DIS> <INT name="loadPanel" perpetual="0"> <RES name="onLoad" type="event" eventName="onLoad" icon="panel" erase="1" exit="1"> <SCR name="calculate"><![CDATA[//ok to move on]]></SCR> </RES> </INT> <DIS scrolling="auto" id="textBlock" h="480" name="text" x="20" y="20" w="textW" type="text"><![CDATA[{pageIcon.templateData.audioSlideshow[projPI].text}]]></DIS> <INT name="[Untitled]" perpetual="1"> <RES name="[Untitled]" type="timeLimit" secs="0" reset="0" erase="1" exit="0"> <SCR name="[Untitled]"><![CDATA[if (pageIcon.templateData.audioSlideshow[projPI].nestedPage[0].synch == 0){ snd.nextPage();}]]></SCR> </RES> </INT> <SCR name="makePages"><![CDATA[if (icon.attributes.built != 'true'){ icon.nextSibling.childNodes[0].duplicate(itemCount - 1); icon.attributes.built = 'true';}icon.nextSibling.firstChild.attributes.rs = 'initButton';icon.nextSibling.attributes.controls = panel._x + ',' + (panel._y + panel._height - 20) + ',' + panel._width;//make the synch points...for (i = 0; i < itemCount; i++){ icon.nextSibling.childNodes[i].attributes.synchPoint = pageIcon.templateData.audioSlideshow[projPI].nestedPage[i].synch * 1000;}]]></SCR> <SND eraseChildren="1" id="snd" controls="0,0,400" name="sound" type="ext" url="{pageIcon.templateData.audioSlideshow[projPI].sound}" play="0" loop="0" wait="0"> <PG synchPoint="2000" name="protoPage"> <SCR name="setSize"><![CDATA[if (pageIcon.templateData.audioSlideshow[projPI].nestedPage[icon.parentNode.index() - 1].url == undefined){ icon.nextSibling.nextSibling.attributes.tabIndex = -1;}if (pageIcon.templateData.audioSlideshow[projPI].nestedPage[icon.parentNode.index() - 1].controls == 'Control Bar'){ icon.nextSibling.nextSibling.attributes.controls = '1';}if (pageIcon.templateData.audioSlideshow[projPI].nestedPage[icon.parentNode.index()].tip != undefined){ icon.nextSibling.nextSibling.attributes.toolTip = pageIcon.templateData.audioSlideshow[projPI].nestedPage[icon.parentNode.index()].tip; //icon.nextSibling.nextSibling.nodeValue = '{' + pageIcon.templateData.audioSlideshow[projPI].nestedPage[icon.parentNode.index()].tip + '}';}]]></SCR> <DIS textColour="#333333" id="desc" name="protoText" x="panel._x + 20" y="40" w="panelW - 40" h="10" type="text"><![CDATA[{'<b>' + pageIcon.templateData.audioSlideshow[projPI].nestedPage[icon.parentNode.index()].name + '</b><br>' + pageIcon.templateData.audioSlideshow[projPI].nestedPage[icon.parentNode.index()].text}]]></DIS> <DIS transition="fadeIn(10)" id="graphic" name="protoGraphic" x="0" y="desc._y + desc._height + 20" type="ext" url="{pageIcon.templateData.audioSlideshow[projPI].nestedPage[icon.parentNode.index()].url}"><![CDATA[]]></DIS> <INT name="loadGraphic&Resize" perpetual="0"> <RES name="onLoad" type="event" eventName="onLoad" icon="graphic" erase="1" exit="0"> <SCR name="resize&Position"><![CDATA[space = panel._height - 80 - desc._height;graphic.constrain(panelW - 40, space);if (pageIcon.templateData.audioSlideshow[projPI].nestedPage[snd.getPageIndex()].align == 'Bottom'){ desc._y = 40 + graphic._height + 20; graphic._y = 40;}graphic.fade('in',1,'None','easeNone');if (pageIcon.templateData.audioSlideshow[projPI].nestedPage[snd.getPageIndex()].initObject != undefined){ obj = expression(pageIcon.templateData.audioSlideshow[projPI].nestedPage[snd.getPageIndex()].initObject, engine); graphic.clip.init(obj);}graphic._x = panel._x + panel._width / 2 - graphic._width / 2;]]></SCR> </RES> </INT> </PG> </SND> </PG>
<PG title="Audio Slideshow" name="audioSlideshow"> <SCR name="getPageID"><![CDATA[pageIcon = icon.parentNode.clip();if (rootIcon.projMode == "dev"){ // Page Wizard pageIcon.templateData = pageIcon.extXML.toObject(); pageIcon.templateData = pageIcon.templateData.pageWizard[0];} else { // Toolkits myXML = new XML(extXML.firstChild.childNodes[rootIcon.getPageIndex() - pgOffset]); pageIcon.templateData = myXML.toObject();} rootIcon.setTitleText(templateData.learningObject[0].name); // handle multiple page data definitions in a project if (rootIcon.projectPageIndex == undefined){ rootIcon.projectPageIndex = 0;}// check if this page has a definition for the current project index and default to 0 if notif (pageIcon.templateData.audioSlideshow[rootIcon.projectPageIndex].name == undefined){ projPI = 0;} else { projPI = rootIcon.projectPageIndex; } itemCount = pageIcon.templateData.audioSlideshow[projPI].nestedPage.length);panelWidth = pageIcon.templateData.audioSlideshow[projPI].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 (pageIcon.templateData.audioSlideshow[projPI].narration != undefined){ narration = pageIcon.templateData.audioSlideshow[projPI].narration; rootIcon.broadcast('showAudio');}]]></SCR> <DIS h="474" w="panelW" tabIndex="-1" id="panel" name="panel" x="780 - panelW" y="20" type="ext" url="templatePath + 'common/whitePanel.swf'"><![CDATA[]]></DIS> <INT name="loadPanel" perpetual="0"> <RES name="onLoad" type="event" eventName="onLoad" icon="panel" erase="1" exit="1"> <SCR name="calculate"><![CDATA[//ok to move on]]></SCR> </RES> </INT> <DIS scrolling="auto" id="textBlock" h="480" name="text" x="20" y="20" w="textW" type="text"><![CDATA[{pageIcon.templateData.audioSlideshow[projPI].text}]]></DIS> <INT name="[Untitled]" perpetual="1"> <RES name="[Untitled]" type="timeLimit" secs="0" reset="0" erase="1" exit="0"> <SCR name="[Untitled]"><![CDATA[if (pageIcon.templateData.audioSlideshow[projPI].nestedPage[0].synch == 0){ snd.nextPage();}]]></SCR> </RES> </INT> <SCR name="makePages"><![CDATA[if (icon.attributes.built != 'true'){ icon.nextSibling.childNodes[0].duplicate(itemCount - 1); icon.attributes.built = 'true';}icon.nextSibling.firstChild.attributes.rs = 'initButton';icon.nextSibling.attributes.controls = panel._x + ',' + (panel._y + panel._height - 20) + ',' + panel._width;//make the synch points...for (i = 0; i < itemCount; i++){ icon.nextSibling.childNodes[i].attributes.synchPoint = pageIcon.templateData.audioSlideshow[projPI].nestedPage[i].synch * 1000;}]]></SCR> <SND eraseChildren="1" id="snd" controls="0,0,400" name="sound" type="ext" url="{pageIcon.templateData.audioSlideshow[projPI].sound}" play="0" loop="0" wait="0"> <PG synchPoint="2000" name="protoPage"> <SCR name="setSize"><![CDATA[if (pageIcon.templateData.audioSlideshow[projPI].nestedPage[icon.parentNode.index()].url != undefined){ gIcon = icon.parentNode.getChildByName('protoGraphic'); icon.nextSibling.nextSibling.attributes.tabIndex = -1; if (pageIcon.templateData.audioSlideshow[projPI].nestedPage[icon.parentNode.index()].controls == 'Control Bar'){ gIcon.attributes.controls = '1'; } if (pageIcon.templateData.audioSlideshow[projPI].nestedPage[icon.parentNode.index()].tip != undefined){ gIcon.attributes.toolTip = pageIcon.templateData.audioSlideshow[projPI].nestedPage[icon.parentNode.index()].tip; gIcon.nodeValue = '{' + pageIcon.templateData.audioSlideshow[projPI].nestedPage[icon.parentNode.index()].tip + '}'; }} else { //no graphic icon.parentNode.getChildByName('protoGraphic').removeNode(); icon.parentNode.getChildByName('loadGraphic&Resize').removeNode(); textH = 413;}]]></SCR> <DIS transition="fadeIn(10)" id="graphic" name="protoGraphic" x="0" y="0" type="ext" url="{pageIcon.templateData.audioSlideshow[projPI].nestedPage[icon.parentNode.index()].url}"><![CDATA[]]></DIS> <INT name="loadGraphic&Resize" perpetual="0"> <RES name="onLoad" type="event" eventName="onLoad" icon="graphic" erase="1" exit="1"> <SCR name="resize&Position"><![CDATA[graphic.constrain(panelW - 40, space);textH = 393 - graphic._height;if (pageIcon.templateData.audioSlideshow[projPI].nestedPage[snd.getPageIndex()].initObject != undefined){ obj = expression(pageIcon.templateData.audioSlideshow[projPI].nestedPage[snd.getPageIndex()].initObject, engine); graphic.clip.init(obj);}]]></SCR> </RES> </INT> <DIS scrolling="auto" textColour="#333333" id="desc" name="protoText" x="panel._x + 20" y="40" w="panelW - 40" h="textH" type="text"><![CDATA[{'<b>' + pageIcon.templateData.audioSlideshow[projPI].nestedPage[icon.parentNode.index()].name + '</b><br>' + pageIcon.templateData.audioSlideshow[projPI].nestedPage[icon.parentNode.index()].text}]]></DIS> <SCR name="position"><![CDATA[if (pageIcon.templateData.audioSlideshow[projPI].nestedPage[icon.parentNode.index()].url != undefined){ if (pageIcon.templateData.audioSlideshow[projPI].nestedPage[icon.parentNode.index()].align == 'Bottom'){ desc._y = 40 + graphic._height + 20; graphic._y = 40; } else { graphic._y = desc._y + desc._height + 20; } graphic._x = panel._x + panel._width / 2 - graphic._width / 2; graphic.fade('in',1,'None','easeNone');}]]></SCR> </PG> </SND> </PG>
Expand Down

0 comments on commit bab7f3d

Please sign in to comment.