Skip to content

Commit

Permalink
Updated textVideo.rlm to allow a full screen toggle, and an updated e…
Browse files Browse the repository at this point in the history
…ngine to fire a MOVIE.onResize event so you can handle the resizing in Xerte.

git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/trunk@10 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
juliantenney committed Jul 19, 2010
1 parent ab05640 commit f815659
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 1 deletion.
Binary file modified XMLEngine.swf
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -1 +1 @@
<PG name="textVideo"> <SCR name="getPageID"><![CDATA[pageIcon = icon.parentNode.clip();myXML = new XML(extXML.firstChild.childNodes[rootIcon.getPageIndex() - pgOffset]);pageIcon.templateData = myXML.toObject();rootIcon.setTitleText(templateData.learningObject[0].name);//size the movieif (pageIcon.templateData.textVideo[0].movieSize != undefined){ icon.parentNode.getChildByName('movie').attributes.w = pageIcon.templateData.textVideo[0].movieSize.split(',')[0]; icon.parentNode.getChildByName('movie').attributes.h = pageIcon.templateData.textVideo[0].movieSize.split(',')[1];}vidURL = pageIcon.templateData.textVideo[0].url;//support for links from moletvif (vidURL.indexOf('moletv.org.uk') != -1){ vid = vidURL.split('=')[1]; vidURL = "'http://www.moletv.org.uk/mod/FileStream.aspx?v=" + vid + "&t=1&z=.flv'"}if (pageIcon.templateData.textVideo[0].narration != undefined){ narration = pageIcon.templateData.textVideo[0].narration; rootIcon.broadcast('showAudio');}]]></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="calculate"><![CDATA[//ok to move on]]></SCR> </RES> </INT> <MOV id="movie" name="movie" x="0" y="30" url="{vidURL}" controls="1" play="0"><![CDATA[{pageIcon.templateData.textVideo[0].tip}]]></MOV> <INT name="loadVideo" perpetual="0"> <RES name="onMovieReady" type="event" eventName="onMovieReady" icon="movie" erase="1" exit="1"> <SCR name="calculate"><![CDATA[//resize the panel to the graphicpanel._width = movie._width + 20;panel._height = movie._height + 40;if (pageIcon.templateData.textVideo[0].align == 'Left'){ panel._x = stageWidth - panel._width - 20; movie._x = panel._x + 10; textX = 20;} else { panel._x = 20; movie._x = 30; textX = panel._width + 40;}textWidth = stageWidth - 60 - panel._width;if (pageIcon.templateData.textVideo[0].reset == 'false'){ movie.flvPlayer.autoRewind = false;}]]></SCR> </RES> </INT> <DIS id="textBlock" scrolling="auto" name="text" x="textX" y="20" w="textWidth" h="480" type="text"><![CDATA[{pageIcon.templateData.textVideo[0]}]]></DIS> <SCR name="setupTranscript"><![CDATA[if (pageIcon.templateData.textVideo[0].transcript == undefined){ icon.nextSibling.removeNode();}]]></SCR> <INT id="trans" name="transcript" perpetual="0"> <RES w="90" swf="templatePath + 'common/invertTab.swf'" rs="btnTrans" name="showTranscript" type="button" x="panel._x + panel._width - 100" y="panel._y + panel._height" label="transcript" erase="1" exit="0"> <SCR name="tween"><![CDATA[if (transShow != true){ panel.tween("_height", panel._height, 464,0.2,'Strong', 'easeIn'); btnTrans.tween("_y", btnTrans._y, 484,0.2,'Strong', 'easeIn'); transShow = true;} else { panel.tween("_height", panel._height, movie._height + 20,0.2,'Strong', 'easeIn'); btnTrans.tween("_y", btnTrans._y, movie._y + movie._height + 10,0.2,'Strong', 'easeIn'); transShow = false;}]]></SCR> </RES> <RES name="onMotionFinished" type="event" eventName="onMotionFinished" icon="panel" erase="1" exit="0"> <SCR name="broadcast"><![CDATA[if (transShow == true){ trans.broadcast("showTranscript");}]]></SCR> </RES> <RES name="showTranscript" type="event" eventName="showTranscript" icon="trans" erase="1" exit="0"> <DIS textColour="#333333" scrolling="auto" name="transcript" x="movie._x" y="movie._y + movie._height" w="movie._width" h="panel._height - movie._height - 20" type="text"><![CDATA[{pageIcon.templateData.textVideo[0].transcript}]]></DIS> </RES> </INT> </PG>
<PG name="textVideo"> <SCR name="getPageID"><![CDATA[pageIcon = icon.parentNode.clip();myXML = new XML(extXML.firstChild.childNodes[rootIcon.getPageIndex() - pgOffset]);pageIcon.templateData = myXML.toObject();rootIcon.setTitleText(templateData.learningObject[0].name);//size the movieif (pageIcon.templateData.textVideo[0].movieSize != undefined){ icon.parentNode.getChildByName('movie').attributes.w = pageIcon.templateData.textVideo[0].movieSize.split(',')[0]; icon.parentNode.getChildByName('movie').attributes.h = pageIcon.templateData.textVideo[0].movieSize.split(',')[1];}vidURL = pageIcon.templateData.textVideo[0].url;//support for links from moletvif (vidURL.indexOf('moletv.org.uk') != -1){ vid = vidURL.split('=')[1]; vidURL = "'http://www.moletv.org.uk/mod/FileStream.aspx?v=" + vid + "&t=1&z=.flv'"}if (pageIcon.templateData.textVideo[0].narration != undefined){ narration = pageIcon.templateData.textVideo[0].narration; rootIcon.broadcast('showAudio');}fullScreen = false;]]></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="calculate"><![CDATA[//ok to move on]]></SCR> </RES> </INT> <MOV id="movie" name="movie" x="0" y="30" url="{vidURL}" controls="1" play="0"><![CDATA[{pageIcon.templateData.textVideo[0].tip}]]></MOV> <INT name="loadVideo" perpetual="0"> <RES name="onMovieReady" type="event" eventName="onMovieReady" icon="movie" erase="1" exit="1"> <SCR name="calculate"><![CDATA[//resize the panel to the graphicpanel._width = movie._width + 20;panel._height = movie._height + 40;if (pageIcon.templateData.textVideo[0].align == 'Left'){ panel._x = stageWidth - panel._width - 20; movie._x = panel._x + 10; textX = 20;} else { panel._x = 20; movie._x = 30; textX = panel._width + 40;}textWidth = stageWidth - 60 - panel._width;if (pageIcon.templateData.textVideo[0].reset == 'false'){ movie.flvPlayer.autoRewind = false;}initW = movie._width;initH = movie._height;initX = movie._x;initY = movie._y;]]></SCR> </RES> </INT> <DIS id="textBlock" scrolling="auto" name="text" x="textX" y="20" w="textWidth" h="480" type="text"><![CDATA[{pageIcon.templateData.textVideo[0]}]]></DIS> <INT name="[Untitled]" perpetual="0"> <RES rs="btnToggle" swf="templatePath + 'common/zoom.png'" name="[Untitled]" type="button" x="movie._x + movie._width - 20" y="movie._y + movie._height + 2" label="label" erase="1" exit="0"> <SCR name="[Untitled]"><![CDATA[if (fullScreen == false){ fullScreen = true; movie.setSize(800,434); textBlock._visible = false; } else { fullScreen = false; movie.setSize(initWidth,initH); textBlock._visible = true;}]]></SCR> </RES> <RES name="[Untitled]" type="event" eventName="onResize" icon="movie" erase="1" exit="0"> <SCR name="[Untitled]"><![CDATA[if (fullScreen == true){ movie._x = 400 - movie._width / 2; panel._x = movie._x - 10; panel._y = movie._y - 10; panel._width = movie._width + 20; panel._height = movie._height +40; btnToggle._x = movie._x + movie._width - 20; btnToggle._y = movie._y + movie._height + 2;} else { movie._x = initX; movie._y = initY; panel._x = movie._x - 10; panel._y = movie._y - 10; panel._width = initW + 20; panel._height = initH +40; btnToggle._x = initX + initW - 20; btnToggle._y = initY + initH + 2;}]]></SCR> </RES> </INT> <SCR name="setupTranscript"><![CDATA[if (pageIcon.templateData.textVideo[0].transcript == undefined){ icon.nextSibling.removeNode();}]]></SCR> <INT id="trans" name="transcript" perpetual="0"> <RES w="90" swf="templatePath + 'common/invertTab.swf'" rs="btnTrans" name="showTranscript" type="button" x="panel._x + panel._width - 100" y="panel._y + panel._height" label="transcript" erase="1" exit="0"> <SCR name="tween"><![CDATA[if (transShow != true){ panel.tween("_height", panel._height, 464,0.2,'Strong', 'easeIn'); btnTrans.tween("_y", btnTrans._y, 484,0.2,'Strong', 'easeIn'); transShow = true;} else { panel.tween("_height", panel._height, movie._height + 20,0.2,'Strong', 'easeIn'); btnTrans.tween("_y", btnTrans._y, movie._y + movie._height + 10,0.2,'Strong', 'easeIn'); transShow = false;}]]></SCR> </RES> <RES name="onMotionFinished" type="event" eventName="onMotionFinished" icon="panel" erase="1" exit="0"> <SCR name="broadcast"><![CDATA[if (transShow == true){ trans.broadcast("showTranscript");}]]></SCR> </RES> <RES name="showTranscript" type="event" eventName="showTranscript" icon="trans" erase="1" exit="0"> <DIS textColour="#333333" scrolling="auto" name="transcript" x="movie._x" y="movie._y + movie._height" w="movie._width" h="panel._height - movie._height - 20" type="text"><![CDATA[{pageIcon.templateData.textVideo[0].transcript}]]></DIS> </RES> </INT> </PG>
Expand Down

0 comments on commit f815659

Please sign in to comment.