Skip to content

Commit

Permalink
Incorrect paths in the navigators for handling initObjects and custom…
Browse files Browse the repository at this point in the history
… flash movies.

git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@452 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
juliantenney committed Oct 16, 2012
1 parent f8c5054 commit 9b65195
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
@@ -1 +1 @@
<PG title="Accordion Navigator" name="accNav"> <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.accNav[rootIcon.projectPageIndex].name == undefined){ projPI = 0;} else { projPI = rootIcon.projectPageIndex; } itemCount = pageIcon.templateData.accNav[projPI].nestedPage.length);panelWidth = pageIcon.templateData.accNav[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.accNav[projPI].narration != undefined){ narration = pageIcon.templateData.accNav[projPI].narration; rootIcon.broadcast('showAudio');}]]></SCR> <SCR isFunc="1" name="fTogglePanes"><![CDATA[tempIndex = icon.parentNode.index();tempY = panel._height - itemCount * 21;for (i = 0; i < acc.customButtons.length; i++){ if (i <= tempIndex){ acc.customButtons[i]._y = acc.customButtons[0]._y + 21*i } if (i > tempIndex){ acc.customButtons[i]._y = acc.customButtons[0]._y + tempY + 21*i-1; }}]]></SCR> <DIS initObject="{_alpha: subPageAccess == true ? 20 : 100}" h="475" w="panelW" tabIndex="-1" id="panel" name="panel" x="780 - panelW" y="20" type="ext" url="templatePath + 'common/whitePanel.swf'"><![CDATA[]]></DIS> <DIS scrolling="auto" id="textBlock" h="480" name="text" x="20" y="20" w="textW" type="text"><![CDATA[{pageIcon.templateData.accNav[projPI].text}]]></DIS> <SCR name="makeTabs"><![CDATA[if (icon.attributes.built != 'true'){ icon.nextSibling.firstChild.duplicate(itemCount - 1); icon.attributes.built = 'true';}icon.nextSibling.firstChild.attributes.rs = 'btn1';icon.nextSibling.lastChild.previousSibling.attributes.rs = 'initButton';]]></SCR> <INT id="acc" name="accInteraction" perpetual="0"> <RES w="panelW" swf="templatePath + 'common/accordion.swf'" name="protoPane" type="button" x="panel._x" y="panel._y + icon.index() * 22" label="{pageIcon.templateData.accNav[projPI].nestedPage[icon.index()].name}" erase="1" exit="0"> <SCR name="togglePanes"><![CDATA[fTogglePanes();btn = icon.parentNode.getMovieClip();if (subPageAccess == true){ icon.nextSibling.attributes.textColour = STYLES.defaultColour;} else { icon.nextSibling.attributes.textColour = '#333333';}gIcon = icon.parentNode.getChildByName('graphic');if (pageIcon.templateData.accNav[projPI].nestedPage[icon.parentNode.index()].url != undefined){ if (pageIcon.templateData.accNav[projPI].nestedPage[icon.parentNode.index()].controls == 'Control Bar'){ gIcon.attributes.controls = '1'; } if (pageIcon.templateData.accNav[projPI].nestedPage[icon.parentNode.index()].tip != undefined){ gIcon.attributes.toolTip = pageIcon.templateData.accNav[projPI].nestedPage[icon.parentNode.index()].tip; gIcon.firstChild.nodeValue = '{' + pageIcon.templateData.accNav[projPI].nestedPage[icon.parentNode.index()].tip + '}'; }} else { gIcon.removeNode(); icon.parentNode.getChildByName('loadGraphic&Resize').removeNode(); textH = 413 - (22*(itemCount - 1));} ]]></SCR> <DIS id="graphic" name="graphic" x="420" y="desc._y + desc._height + 20" type="ext" url="{pageIcon.templateData.accNav[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, 300 - (22*(itemCount - 1)));textH = 393 - (22*(itemCount - 1)) - graphic._height;if (pageIcon.templateData.accNav[projPI].nestedPage[icon.parentNode.index()].initObject != undefined){ obj = expression(pageIcon.templateData.accNav[projPI].nestedPage[icon.parentNode.index()].initObject, engine); graphic.clip.init(obj);}]]></SCR> </RES> </INT> <DIS scrolling="auto" textColour="#333333" id="desc" name="description" x="panel._x + 20" y="btn._y + 40" w="panelW - 40" h="textH" type="text"><![CDATA[{pageIcon.templateData.accNav[projPI].nestedPage[icon.parentNode.index()].text}]]></DIS> <SCR name="position"><![CDATA[if (pageIcon.templateData.accNav[projPI].nestedPage[icon.parentNode.index()].url != undefined){ if (pageIcon.templateData.accNav[projPI].nestedPage[acc.getPageIndex()].align == 'Bottom'){ graphic._y = desc._y; desc._y = graphic._y + graphic._height + 20; } else { graphic._y = desc._y + desc._height + 20; } graphic._x = panel._x + panel._width / 2 - graphic._width / 2;}]]></SCR> </RES> <RES name="initialise" type="event" eventName="onLoad" icon="initButton" erase="1" exit="0"> <INT name="wait" perpetual="0"> <RES name="initButton" type="timeLimit" secs="0.1" reset="0" erase="1" exit="0"> <SCR name="activatePaneOne"><![CDATA[btn1.swfFile.onRelease();]]></SCR> </RES> </INT> </RES> </INT> </PG>
<PG title="Accordion Navigator" name="accNav"> <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.accNav[rootIcon.projectPageIndex].name == undefined){ projPI = 0;} else { projPI = rootIcon.projectPageIndex; } itemCount = pageIcon.templateData.accNav[projPI].nestedPage.length);panelWidth = pageIcon.templateData.accNav[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.accNav[projPI].narration != undefined){ narration = pageIcon.templateData.accNav[projPI].narration; rootIcon.broadcast('showAudio');}]]></SCR> <SCR isFunc="1" name="fTogglePanes"><![CDATA[tempIndex = icon.parentNode.index();tempY = panel._height - itemCount * 21;for (i = 0; i < acc.customButtons.length; i++){ if (i <= tempIndex){ acc.customButtons[i]._y = acc.customButtons[0]._y + 21*i } if (i > tempIndex){ acc.customButtons[i]._y = acc.customButtons[0]._y + tempY + 21*i-1; }}]]></SCR> <DIS initObject="{_alpha: subPageAccess == true ? 20 : 100}" h="475" w="panelW" tabIndex="-1" id="panel" name="panel" x="780 - panelW" y="20" type="ext" url="templatePath + 'common/whitePanel.swf'"><![CDATA[]]></DIS> <DIS scrolling="auto" id="textBlock" h="480" name="text" x="20" y="20" w="textW" type="text"><![CDATA[{pageIcon.templateData.accNav[projPI].text}]]></DIS> <SCR name="makeTabs"><![CDATA[if (icon.attributes.built != 'true'){ icon.nextSibling.firstChild.duplicate(itemCount - 1); icon.attributes.built = 'true';}icon.nextSibling.firstChild.attributes.rs = 'btn1';icon.nextSibling.lastChild.previousSibling.attributes.rs = 'initButton';]]></SCR> <INT id="acc" name="accInteraction" perpetual="0"> <RES w="panelW" swf="templatePath + 'common/accordion.swf'" name="protoPane" type="button" x="panel._x" y="panel._y + icon.index() * 22" label="{pageIcon.templateData.accNav[projPI].nestedPage[icon.index()].name}" erase="1" exit="0"> <SCR name="togglePanes"><![CDATA[fTogglePanes();btn = icon.parentNode.getMovieClip();if (subPageAccess == true){ icon.nextSibling.attributes.textColour = STYLES.defaultColour;} else { icon.nextSibling.attributes.textColour = '#333333';}gIcon = icon.parentNode.getChildByName('graphic');if (pageIcon.templateData.accNav[projPI].nestedPage[icon.parentNode.index()].url != undefined){ if (pageIcon.templateData.accNav[projPI].nestedPage[icon.parentNode.index()].controls == 'Control Bar'){ gIcon.attributes.controls = '1'; } if (pageIcon.templateData.accNav[projPI].nestedPage[icon.parentNode.index()].tip != undefined){ gIcon.attributes.toolTip = pageIcon.templateData.accNav[projPI].nestedPage[icon.parentNode.index()].tip; gIcon.firstChild.nodeValue = '{' + pageIcon.templateData.accNav[projPI].nestedPage[icon.parentNode.index()].tip + '}'; }} else { gIcon.removeNode(); icon.parentNode.getChildByName('loadGraphic&Resize').removeNode(); textH = 413 - (22*(itemCount - 1));} ]]></SCR> <DIS id="graphic" name="graphic" x="420" y="desc._y + desc._height + 20" type="ext" url="{pageIcon.templateData.accNav[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, 300 - (22*(itemCount - 1)));textH = 393 - (22*(itemCount - 1)) - graphic._height;if (pageIcon.templateData.accNav[projPI].nestedPage[icon.parentNode.parentNode.parentNode.index()].initObject != undefined){ obj = expression(pageIcon.templateData.accNav[projPI].nestedPage[icon.parentNode.parentNode.parentNode.index()].initObject, engine); graphic.clip.init(obj);}]]></SCR> </RES> </INT> <DIS scrolling="auto" textColour="#333333" id="desc" name="description" x="panel._x + 20" y="btn._y + 40" w="panelW - 40" h="textH" type="text"><![CDATA[{pageIcon.templateData.accNav[projPI].nestedPage[icon.parentNode.index()].text}]]></DIS> <SCR name="position"><![CDATA[if (pageIcon.templateData.accNav[projPI].nestedPage[icon.parentNode.index()].url != undefined){ if (pageIcon.templateData.accNav[projPI].nestedPage[acc.getPageIndex()].align == 'Bottom'){ graphic._y = desc._y; desc._y = graphic._y + graphic._height + 20; } else { graphic._y = desc._y + desc._height + 20; } graphic._x = panel._x + panel._width / 2 - graphic._width / 2;}]]></SCR> </RES> <RES name="initialise" type="event" eventName="onLoad" icon="initButton" erase="1" exit="0"> <INT name="wait" perpetual="0"> <RES name="initButton" type="timeLimit" secs="0.1" reset="0" erase="1" exit="0"> <SCR name="activatePaneOne"><![CDATA[btn1.swfFile.onRelease();]]></SCR> </RES> </INT> </RES> </INT> </PG>
Expand Down
@@ -1 +1 @@
<PG title="Column Page" name="columnPage"> <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.columnPage[rootIcon.projectPageIndex].name == undefined){ projPI = 0;} else { projPI = rootIcon.projectPageIndex; } colCount = pageIcon.templateData.columnPage[projPI].nestedPage.length;colWidth = 780 / colCount;if (pageIcon.templateData.columnPage[projPI].narration != undefined){ narration = pageIcon.templateData.columnPage[projPI].narration; rootIcon.broadcast('showAudio');}]]></SCR> <SCR name="header"><![CDATA[if (pageIcon.templateData.columnPage[projPI].header == undefined && icon.built != 'true'){ icon.nextSibling.removeNode(); icon.built = 'true';}]]></SCR> <DIS id="header" name="header" x="20" y="20" w="760" h="10" type="text"><![CDATA[{pageIcon.templateData.columnPage[projPI].header}]]></DIS> <SCR name="getHeaderHeight"><![CDATA[if (pageIcon.templateData.columnPage[projPI].header == undefined){ headerHeight = 0;} else { headerHeight = header._height + 20;}if (icon.built != "true"){ icon.nextSibling.firstChild.duplicate(colCount - 1); icon.built = "true";}]]></SCR> <DEC id="columns" name="columns" repeat="all" branch="sequence" pause="0" erase="0" eraseOnExit="0"> <PG name="protoColumn"> <SCR name="deleteLoader"><![CDATA[col = icon.parentNode.clip();textH = 480 - headerHeight;if (pageIcon.templateData.columnPage[projPI].nestedPage[icon.parentNode.index()].url != undefined){ if (pageIcon.templateData.columnPage[projPI].nestedPage[icon.parentNode.index()].controls == 'Control Bar'){ icon.nextSibling.attributes.controls = '1'; } if (pageIcon.templateData.columnPage[projPI].nestedPage[icon.parentNode.index()].tip != undefined){ icon.nextSibling.attributes.toolTip = pageIcon.templateData.columnPage[projPI].nestedPage[icon.parentNode.index()].tip; icon.nextSibling.firstChild.nodeValue = '{"' + pageIcon.templateData.columnPage[projPI].nestedPage[icon.parentNode.index()].tip + '"}'; } } else { //no graphic icon.parentNode.getChildByName('graphic').removeNode(); icon.parentNode.getChildByName('loader').removeNode();}]]></SCR> <DIS id="graphic" name="graphic" x="20 + (colWidth * icon.parentNode.index())" y="colText._y + colText._height + 20" type="ext" url="{pageIcon.templateData.columnPage[projPI].nestedPage[icon.parentNode.index()].url}"><![CDATA[]]></DIS> <INT name="loader" perpetual="0"> <RES name="onLoad" type="event" eventName="onLoad" icon="graphic" erase="1" exit="1"> <SCR name="resize"><![CDATA[graphic.constrain(colWidth - 20, 300);textH = 480 - headerHeight - graphic._height - 20;if (pageIcon.templateData.columnPage[projPI].nestedPage[columns.getPageIndex()].initObject != undefined){ obj = expression(pageIcon.templateData.accNav[0].nestedPage[icon.parentNode.index()].initObject, engine); graphic.clip.init(obj);}]]></SCR> </RES> </INT> <DIS id="colText" scrolling="auto" name="text" x="20 + (colWidth * icon.parentNode.index())" y="20 + headerHeight" w="colWidth - 20" h="textH" type="text"><![CDATA[{pageIcon.templateData.columnPage[projPI].nestedPage[icon.parentNode.index()].text}]]></DIS> <SCR name="position"><![CDATA[colText._y = 20 + headerHeight;if (pageIcon.templateData.columnPage[projPI].nestedPage[icon.parentNode.index()].url != undefined){ if (pageIcon.templateData.columnPage[projPI].nestedPage[columns.getPageIndex()].align == 'Top'){ colText._y = 20 + headerHeight; graphic._y = 20 + headerHeight + textH + 20; } else { colText._y = 20 + graphic._height + 20 + headerHeight; graphic._y = 20 + headerHeight; }} else { //no graphic}]]></SCR> </PG> </DEC> </PG>
<PG title="Column Page" name="columnPage"> <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.columnPage[rootIcon.projectPageIndex].name == undefined){ projPI = 0;} else { projPI = rootIcon.projectPageIndex; } colCount = pageIcon.templateData.columnPage[projPI].nestedPage.length;colWidth = 780 / colCount;if (pageIcon.templateData.columnPage[projPI].narration != undefined){ narration = pageIcon.templateData.columnPage[projPI].narration; rootIcon.broadcast('showAudio');}]]></SCR> <SCR name="header"><![CDATA[if (pageIcon.templateData.columnPage[projPI].header == undefined && icon.built != 'true'){ icon.nextSibling.removeNode(); icon.built = 'true';}]]></SCR> <DIS id="header" name="header" x="20" y="20" w="760" h="10" type="text"><![CDATA[{pageIcon.templateData.columnPage[projPI].header}]]></DIS> <SCR name="getHeaderHeight"><![CDATA[if (pageIcon.templateData.columnPage[projPI].header == undefined){ headerHeight = 0;} else { headerHeight = header._height + 20;}if (icon.built != "true"){ icon.nextSibling.firstChild.duplicate(colCount - 1); icon.built = "true";}]]></SCR> <DEC id="columns" name="columns" repeat="all" branch="sequence" pause="0" erase="0" eraseOnExit="0"> <PG name="protoColumn"> <SCR name="deleteLoader"><![CDATA[col = icon.parentNode.clip();textH = 480 - headerHeight;if (pageIcon.templateData.columnPage[projPI].nestedPage[icon.parentNode.index()].url != undefined){ if (pageIcon.templateData.columnPage[projPI].nestedPage[icon.parentNode.index()].controls == 'Control Bar'){ icon.nextSibling.attributes.controls = '1'; } if (pageIcon.templateData.columnPage[projPI].nestedPage[icon.parentNode.index()].tip != undefined){ icon.nextSibling.attributes.toolTip = pageIcon.templateData.columnPage[projPI].nestedPage[icon.parentNode.index()].tip; icon.nextSibling.firstChild.nodeValue = '{"' + pageIcon.templateData.columnPage[projPI].nestedPage[icon.parentNode.index()].tip + '"}'; } } else { //no graphic icon.parentNode.getChildByName('graphic').removeNode(); icon.parentNode.getChildByName('loader').removeNode();}]]></SCR> <DIS id="graphic" name="graphic" x="20 + (colWidth * icon.parentNode.index())" y="colText._y + colText._height + 20" type="ext" url="{pageIcon.templateData.columnPage[projPI].nestedPage[icon.parentNode.index()].url}"><![CDATA[]]></DIS> <INT name="loader" perpetual="0"> <RES name="onLoad" type="event" eventName="onLoad" icon="graphic" erase="1" exit="1"> <SCR name="resize"><![CDATA[graphic.constrain(colWidth - 20, 300);textH = 480 - headerHeight - graphic._height - 20;if (pageIcon.templateData.columnPage[projPI].nestedPage[columns.getPageIndex()].initObject != undefined){ obj = expression(pageIcon.templateData.accNav[0].nestedPage[icon.parentNode.parentNode.parentNode.index()].initObject, engine); graphic.clip.init(obj);}]]></SCR> </RES> </INT> <DIS id="colText" scrolling="auto" name="text" x="20 + (colWidth * icon.parentNode.index())" y="20 + headerHeight" w="colWidth - 20" h="textH" type="text"><![CDATA[{pageIcon.templateData.columnPage[projPI].nestedPage[icon.parentNode.index()].text}]]></DIS> <SCR name="position"><![CDATA[colText._y = 20 + headerHeight;if (pageIcon.templateData.columnPage[projPI].nestedPage[icon.parentNode.index()].url != undefined){ if (pageIcon.templateData.columnPage[projPI].nestedPage[columns.getPageIndex()].align == 'Top'){ colText._y = 20 + headerHeight; graphic._y = 20 + headerHeight + textH + 20; } else { colText._y = 20 + graphic._height + 20 + headerHeight; graphic._y = 20 + headerHeight; }} else { //no graphic}]]></SCR> </PG> </DEC> </PG>
Expand Down

0 comments on commit 9b65195

Please sign in to comment.