Skip to content

Commit

Permalink
fixed issue with narration path
Browse files Browse the repository at this point in the history
git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@454 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
juliantenney committed Oct 17, 2012
1 parent 76ef0ef commit c8de83d
Showing 1 changed file with 1 addition and 1 deletion.
@@ -1 +1 @@
<PG title="Enter page title" name="youtube"> <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.youtube[rootIcon.projectPageIndex].name == undefined){ projPI = 0;} else { projPI = rootIcon.projectPageIndex; } ]]></SCR> <SCR name="setup"><![CDATA[xml = new XML(pageIcon.templateData.youtube[projPI]);embedObj = xml.toObject();//new iframe code...if (pageIcon.templateData.youtube[projPI].indexOf('iframe') != -1){ //find the ID str = pageIcon.templateData.youtube[projPI].split("rel=0").join(''); s = str.indexOf('src') + 5; f = str.indexOf('"', s); src = str.substr(s, f-s); vidID = src.substr(src.lastIndexOf('/') + 1); //any params being passed in? vidID = vidID.split('?')[0]; } else { //two types of object embed code... if (embedObj.object[0].embed[0].src.split('/')[4].indexOf('?') != -1){ vidID = embedObj.object[0].embed[0].src.split('/')[4].split('?')[0]; } else { vidID = embedObj.object[0].embed[0].src.split('/')[4].split('&')[0]; }}align = pageIcon.templateData.youtube[projPI].align;previewURL = 'http://img.youtube.com/vi/' + vidID + '/0.jpg';params = new Object();params.url = embedObj.iframe[0].src;params.width = 420;params.height = 315;if (pageIcon.templateData.newWindow[0].narration != undefined){ narration = pageIcon.templateData.newWindow[0].narration; rootIcon.broadcast('showAudio');}]]></SCR> <SCR isFunc="1" name="launchNewWindow"><![CDATA[if (pageIcon.templateData.newWindow[0].htm != undefined){ callJS('createWindow', params);} else { callJS('openWindow', params);}]]></SCR> <DIS tabIndex="-1" id="panel" name="panel" x="-300" 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="exit"><![CDATA[//ok to move on]]></SCR> </RES> </INT> <DIS toolTip="Launch Video" scrolling="auto" id="graphic" name="graphic" x="coded" y="30" type="ext" url="previewURL"><![CDATA[Launch Video]]></DIS> <INT name="loadImage" perpetual="0"> <RES name="onLoad" type="event" eventName="onLoad" icon="graphic" erase="1" exit="1"> <SCR name="calculate"><![CDATA[graphic.constrain(465,465);//resize the panel to the graphicpanel._width = graphic._width + 20;panel._height = graphic._height + 20;panel._x = stageWidth - panel._width - 20;graphic._x = panel._x + 10;textX = 20;textY = 20;textWidth = stageWidth - 80 - graphic._width;graphic.useHandCursor = true;]]></SCR> </RES> </INT> <DIS scrolling="auto" id="textBlock" h="480" name="text" x="textX" y="textY" w="textWidth" type="text"><![CDATA[{pageIcon.templateData.youtube[projPI].text + '<br><br><a href="asfunction:_level0.engine.launchNewWindow">Launch Video</a>'}]]></DIS> <INT name="launch" perpetual="0"> <RES name="onRelease" type="event" eventName="onRelease" icon="graphic" erase="1" exit="0"> <SCR name="calculate"><![CDATA[launchNewWindow();]]></SCR> </RES> </INT> </PG>
<PG title="Enter page title" name="youtube"> <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.youtube[rootIcon.projectPageIndex].name == undefined){ projPI = 0;} else { projPI = rootIcon.projectPageIndex; } ]]></SCR> <SCR name="setup"><![CDATA[xml = new XML(pageIcon.templateData.youtube[projPI]);embedObj = xml.toObject();//new iframe code...if (pageIcon.templateData.youtube[projPI].indexOf('iframe') != -1){ //find the ID str = pageIcon.templateData.youtube[projPI].split("rel=0").join(''); s = str.indexOf('src') + 5; f = str.indexOf('"', s); src = str.substr(s, f-s); vidID = src.substr(src.lastIndexOf('/') + 1); //any params being passed in? vidID = vidID.split('?')[0]; } else { //two types of object embed code... if (embedObj.object[0].embed[0].src.split('/')[4].indexOf('?') != -1){ vidID = embedObj.object[0].embed[0].src.split('/')[4].split('?')[0]; } else { vidID = embedObj.object[0].embed[0].src.split('/')[4].split('&')[0]; }}align = pageIcon.templateData.youtube[projPI].align;previewURL = 'http://img.youtube.com/vi/' + vidID + '/0.jpg';params = new Object();params.url = embedObj.iframe[0].src;params.width = 420;params.height = 315;if (pageIcon.templateData.youtube[0].narration != undefined){ narration = pageIcon.templateData.youtube[0].narration; rootIcon.broadcast('showAudio');}]]></SCR> <SCR isFunc="1" name="launchNewWindow"><![CDATA[if (pageIcon.templateData.newWindow[0].htm != undefined){ callJS('createWindow', params);} else { callJS('openWindow', params);}]]></SCR> <DIS tabIndex="-1" id="panel" name="panel" x="-300" 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="exit"><![CDATA[//ok to move on]]></SCR> </RES> </INT> <DIS toolTip="Launch Video" scrolling="auto" id="graphic" name="graphic" x="coded" y="30" type="ext" url="previewURL"><![CDATA[Launch Video]]></DIS> <INT name="loadImage" perpetual="0"> <RES name="onLoad" type="event" eventName="onLoad" icon="graphic" erase="1" exit="1"> <SCR name="calculate"><![CDATA[graphic.constrain(465,465);//resize the panel to the graphicpanel._width = graphic._width + 20;panel._height = graphic._height + 20;panel._x = stageWidth - panel._width - 20;graphic._x = panel._x + 10;textX = 20;textY = 20;textWidth = stageWidth - 80 - graphic._width;graphic.useHandCursor = true;]]></SCR> </RES> </INT> <DIS scrolling="auto" id="textBlock" h="480" name="text" x="textX" y="textY" w="textWidth" type="text"><![CDATA[{pageIcon.templateData.youtube[projPI].text + '<br><br><a href="asfunction:_level0.engine.launchNewWindow">Launch Video</a>'}]]></DIS> <INT name="launch" perpetual="0"> <RES name="onRelease" type="event" eventName="onRelease" icon="graphic" erase="1" exit="0"> <SCR name="calculate"><![CDATA[launchNewWindow();]]></SCR> </RES> </INT> </PG>
Expand Down

0 comments on commit c8de83d

Please sign in to comment.