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 Mar 25, 2011
1 parent 878adb6 commit 6231d69
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 0 deletions.
@@ -0,0 +1 @@
<PG name="QRCodes"> <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);/* if (pageIcon.templateData.QRcode[0].narration != undefined){ narration = pageIcon.templateData.QRcode[0].narration; rootIcon.broadcast('showAudio');}*/]]></SCR> <DIS h="490" w="770" tabIndex="-1" id="panel" name="panel" x="15" y="15" 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 id="myurl" name="myurl" x="0" y="0" w="400" h="10" type="text"><![CDATA[]]></DIS> <SCR name="loadthetext"><![CDATA[//if(pageIcon.templateData.QRcode[0].url!=undefined and pageIcon.templateData.QRcode[0].url!="Type or paste a URL"){//pastedurl=pageIcon.templateData.QRcode[0].url;//}//else{//pastedurl=replace(_url,"XMLEngine.swf",'');//}pastedurl=pageIcon.templateData.QRcode[0].url;if (templatePath.indexOf('modules/xerte') == -1){ myurl.readFile("http://is.gd/api.php?longurl="+pastedurl);} else { myurl.readFile(_level0.site_url + 'rss_proxy.php?rss=' + "http://is.gd/api.php?longurl="+pastedurl);}]]></SCR> <INT name="loadurl" perpetual="0"> <RES name="onLoad" type="event" eventName="onReadFile" icon="myurl" erase="1" exit="1"> <SCR name="exit"><![CDATA[//ok to move on]]></SCR> </RES> </INT> <SCR name="getqrcode"><![CDATA[if (templatePath.indexOf('modules/xerte') == -1){ mytext='<a href="'+myurl.fileData+'">'+myurl.fileData+'</a>'; qrcodelink=myurl.fileData; qrcodelink="http://qrcode.winksite.com/php/qr_img.php?t=J&s=20&d="+qrcodelink;} else { mytext='<a href="'+myurl.fileData+'">'+myurl.fileData+'</a>'; qrcodelink=myurl.fileData; qrcodelink="http://qrcode.winksite.com/php/qr_img.php?t=J&s=20&d="+qrcodelink;}//mytext='<a href="'+myurl.fileData+'">'+myurl.fileData+'</a>';//qrcodelink=myurl.fileData;//qrcodelink="http://qrcode.winksite.com/php/qr_img.php?t=J&s=20&d="+qrcodelink;//myurl.readFile(_level0.site_url + 'rss_proxy.php?rss=' + "http://qrcode.winksite.com/php/qr_img.php?t=J&s=20&d="+qrcodelink);]]></SCR> <DIS toolTip="{pageIcon.templateData.QRcode[0].tip}" scrolling="auto" id="graphic" name="graphic" x="200" y="80" type="ext" url="qrcodelink"><![CDATA[{pageIcon.templateData.QRcode[0].tip}]]></DIS> <INT name="loadImage" perpetual="0"> <RES name="onLoad" type="event" eventName="onLoad" icon="graphic" erase="1" exit="1"> <SCR name="calculate"><![CDATA[align = pageIcon.templateData.QRcode[0].align;p = graphic._width / graphic._height;if (align == "Top" || align == 'Bottom'){ maxWidth = 740; maxHeight = 250;} else { //left or right, so fit to width maxWidth = 410;//was 465 maxHeight = 410;}if (pageIcon.templateData.QRcode[0].imagesize == 'full screen'){ maxWidth = 660; maxHeight = 444;}graphic.constrain(maxWidth, maxHeight);//resize the panel to the graphic//panel._width = graphic._width + 30;//panel._height = graphic._height + 70;if (align == 'Left'){ //panel._x = stageWidth - panel._width - 50; graphic._x = panel._x + 15; textX = 20; textY = 20; textWidth = stageWidth - 120 - graphic._width;} if (align == 'Right'){ //panel._x = 20; graphic._x = 30; textX = graphic._width + 60; textY = 20; textWidth = stageWidth - 80 - graphic._width;}if (align == 'Bottom'){ //panel._x = 20; graphic._x = 30; textWidth = panel._width; textX = panel._x; textY = panel._y + panel._height + 20;}if (align == 'Top'){ //panel._x = 20; graphic._x = 30; textWidth = panel._width; textX = panel._x; textY = panel._y + panel._height + 20;}if (pageIcon.templateData.QRcode[0].imagesize == 'full screen'){ //panel._x = 400 - panel._width / 2; graphic._x = panel._x + 10; textWidth = 0;}]]></SCR> </RES> </INT> <SCR name="sound"><![CDATA[if (pageIcon.templateData.textGraphics[0].sound != undefined){ //check for a literal path sndURL = pageIcon.templateData.textGraphics[0].sound; if (sndURL.indexOf('http') == 0){ sndURL = "'" + sndURL + "'"; } icon.nextSibling.attributes.controls = graphic._x +',' + (graphic._y + graphic._height - 20) + ',' + graphic._width;} else { if (icon.nextSibling.nodeName == 'SND'){ icon.nextSibling.removeNode(); }}]]></SCR> <SND name="sound" type="ext" url="{sndURL}" play="0" loop="0" wait="0" /> <SCR name="narration script"><![CDATA[//set up array to track auto played narration for each pageif (narautoplayed == undefined){ narautoplayed = new Array();}//if a narration file has been added to a particular pageif (pageIcon.templateData.QRcode[0].narration != undefined){ narration = pageIcon.templateData.QRcode[0].narration;//if auto play is set for a particular page if (pageIcon.templateData.QRcode[0].narautoplay == "true"){//if the particular narration hasn't already been played once if (narautoplayed[rootIcon.currentPage]!="played" ){rootIcon.broadcast('showAudio2');//now that the narration for this page has been played add to array narautoplayed[rootIcon.currentPage] ="played"; }else{rootIcon.broadcast('showAudio');}}//if auther has set to always repeat autoplay narration for this page reset array if (pageIcon.templateData.QRcode[0].repeatnarautoplay == "true"){ narautoplayed[rootIcon.currentPage] ="repeat"; }//if a narration file has been added to a particular page//and if autoplay isn't setif (pageIcon.templateData.QRcode[0].narration != undefined){ narration = pageIcon.templateData.QRcode[0].narration;//if auto play is set for a particular page if (pageIcon.templateData.QRcode[0].narautoplay != "true"){rootIcon.broadcast('showAudio');}}]]></SCR> <INT name="checknarnavigate" perpetual="1"> <RES name="onSoundComplete" type="event" eventName="onSoundComplete" icon="nar" erase="1" exit="1"> <SCR name="autonavigate"><![CDATA[//if the author has set autonavigate at end of narration move to next pageif (pageIcon.templateData.QRcode[0].narnavigate == "true"){rootIcon.nextPage();}]]></SCR> </RES> </INT> <DIS scrolling="auto" id="textBlock" h="450" name="text" x="textX" y="textY" w="textWidth" type="text"><![CDATA[{pageIcon.templateData.QRcode[0]}]]></DIS> <DIS textSize="36pt" scrolling="auto" id="textBlock" h="410" name="showurl" x="240" y="20" w="600" type="text"><![CDATA[{mytext}]]></DIS> <SCR name="layout"><![CDATA[if (align == 'Top'){ textBlock._y = 20; panel._y = textBlock._y + textBlock._height + 20; graphic._y = panel._y + 10;}//if (pageIcon.templateData.textGraphics[0].magnifier != "true"){ //icon.nextSibling.removeNode();//}//ExternalInterface.call("eval", "document.location.href");//my_location = callJS('window.location.href.toString');]]></SCR> <DIS name="[Untitled]" x="50" y="100" w="400" h="10" type="text"><![CDATA[]]></DIS> </PG>
Expand Down
@@ -0,0 +1 @@
<PG name="bleedingImage"> <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);]]></SCR> <DIS toolTip="{pageIcon.templateData.bleedingImage[0].tip}" scrolling="auto" id="graphic" name="graphic" x="coded" y="coded" type="ext" url="{pageIcon.templateData.bleedingImage[0].url}"><![CDATA[{pageIcon.templateData.bleedingImage[0].tip}]]></DIS> <INT name="loadImage" perpetual="0"> <RES name="onLoad" type="event" eventName="onLoad" icon="graphic" erase="1" exit="1"> <SCR name="calculate"><![CDATA[align = pageIcon.templateData.bleedingImage[0].align;p = graphic._width / graphic._height;if (align == "Top" || align == 'Bottom'){ maxWidth = 800; maxHeight = 300; if (pageIcon.templateData.bleedingImage[0].addmargin == 'true'){ maxWidth = 760; maxHeight = 280; }} else { //left or right, so fit to width maxWidth = 500;//465 maxHeight = 516; if (pageIcon.templateData.bleedingImage[0].addmargin == 'true'){ maxWidth = 460; maxHeight = 476; }}if (pageIcon.templateData.bleedingImage[0].imagesize == 'full screen'){ maxWidth = 800; maxHeight = 516; if (pageIcon.templateData.bleedingImage[0].addmargin == 'true'){ maxWidth = 760; maxHeight = 476; }}graphic.constrain(maxWidth, maxHeight);if (align == 'Left'){ graphic._y=(516-graphic._height)/2; graphic._x = stageWidth-graphic._width; textX = 20; textY = 20; textWidth = stageWidth - 40 - graphic._width; textHeight=515 - 40; if (pageIcon.templateData.bleedingImage[0].addmargin == 'true'){ graphic._y=(516-graphic._height)/2; graphic._x = stageWidth-(graphic._width+20); textWidth = stageWidth - 80 - graphic._width; textHeight=516 - 40; }} if (align == 'Right'){ graphic._y=(516-graphic._height)/2; graphic._x = 0; textX = graphic._width + 20; textY = 20; textWidth = (stageWidth - 40) - graphic._width; textHeight= 516 - 40; if (pageIcon.templateData.bleedingImage[0].addmargin == 'true'){ graphic._y=(516-graphic._height)/2; graphic._x = 20; textX = graphic._width + 40; textY = 20; textWidth = (stageWidth - 80) - graphic._width; textHeight= 516 - 40;}}if (align == 'Top'){ graphic._y=(516-graphic._height); graphic._x =(800-graphic._width)/2; textWidth = 760; textHeight=(516-graphic._height)-40; textX = 20; textY = 20; if (pageIcon.templateData.bleedingImage[0].addmargin == 'true'){ graphic._y=(516-graphic._height)-20; graphic._x =(800-graphic._width)/2; textWidth = 760; textHeight=(516-graphic._height)-40; textX = 20; textY = 20; }}if (align == 'Bottom'){ graphic._y=0; graphic._x = (800-graphic._width)/2; textWidth = 760; textHeight=(516-graphic._height)-40; textX = 20; textY = graphic._y + graphic._height + 20; if (pageIcon.templateData.bleedingImage[0].addmargin == 'true'){ graphic._y=20; graphic._x =(800-graphic._width)/2; textWidth = 760; textHeight=(516-graphic._height)-40; textX = 20; textY = graphic._y + graphic._height + 20; }}if (pageIcon.templateData.bleedingImage[0].imagesize == 'full screen'){ graphic._x = (800-graphic._width)/2; graphic._y=0; textWidth = 0; textHeight=0;}]]></SCR> </RES> </INT> <SCR name="linkcode"><![CDATA[//set linklinklocation=pageIcon.templateData.bleedingImage[0].link;if(linklocation!=undefined & linklocation!="" ){linktip="Link to " + pageIcon.templateData.bleedingImage[0].link;}else{//if there's no link and if the next icon is the link icon remove itif (icon.nextSibling.attributes.id == 'link'){//debug(icon.nextSibling.attributes.id); icon.nextSibling.removeNode(); //debug("remove the icon"); }}]]></SCR> <DIS toolTip="{linktip}" id="link" name="linkimage" x="377" y="480" type="ext" url="templatePath + 'common/linkicon.png'"><![CDATA[{linktip}]]></DIS> <INT id="linkstuff" name="link interaction" perpetual="1"> <RES name="hot object" type="hotObject" rs="link" click="1" cursor="1" erase="0" exit="1"> <SCR name="geturl"><![CDATA[linktarget=pageIcon.templateData.bleedingImage[0].linktarget;//debug("link="+linktarget);if(linktarget!=undefined & linktarget!=""){getURL(linklocation,linktarget);}else{getURL(linklocation, "");}]]></SCR> </RES> </INT> <SCR name="narration script"><![CDATA[//set up array to track auto played narration for each pageif (narautoplayed == undefined){ narautoplayed = new Array();}//if a narration file has been added to a particular pageif (pageIcon.templateData.bleedingImage[0].narration != undefined){ narration = pageIcon.templateData.bleedingImage[0].narration;//if auto play is set for a particular page if (pageIcon.templateData.bleedingImage[0].narautoplay == "true"){//if the particular narration hasn't already been played once if (narautoplayed[rootIcon.currentPage]!="played" ){rootIcon.broadcast('showAudio2');//now that the narration for this page has been played add to array narautoplayed[rootIcon.currentPage] ="played"; }else{rootIcon.broadcast('showAudio');}}//if auther has set to always repeat autoplay narration for this page reset array if (pageIcon.templateData.bleedingImage[0].repeatnarautoplay == "true"){ narautoplayed[rootIcon.currentPage] ="repeat"; }//if a narration file has been added to a particular page//and if autoplay isn't setif (pageIcon.templateData.bleedingImage[0].narration != undefined){ narration = pageIcon.templateData.bleedingImage[0].narration;//if auto play is set for a particular page if (pageIcon.templateData.bleedingImage[0].narautoplay != "true"){rootIcon.broadcast('showAudio');}}]]></SCR> <SCR name="sound and layout"><![CDATA[if (pageIcon.templateData.bleedingImage[0].imagesize == 'full screen'){ graphic._x = ((800-graphic._width)/2); graphic._y=0; if (pageIcon.templateData.bleedingImage[0].addmargin == 'true'){ icon.nextSibling.attributes.controls = graphic._x +',' + (graphic._y + graphic._height ) + ',' + graphic._width; graphic._x = ((800-graphic._width)/2); graphic._y=20; }}if (pageIcon.templateData.bleedingImage[0].sound != undefined){ //check for a literal path sndURL = pageIcon.templateData.bleedingImage[0].sound; if (sndURL.indexOf('http') == 0){ sndURL = "'" + sndURL + "'"; } icon.nextSibling.attributes.controls = graphic._x +',' + (graphic._y + graphic._height -20) + ',' + graphic._width; } else { if (icon.nextSibling.nodeName == 'SND'){ icon.nextSibling.removeNode(); }}]]></SCR> <SND id="soundc" name="sound" type="ext" url="{sndURL}" play="0" loop="0" wait="0" /> <SCR name="set text size or remove"><![CDATA[if (pageIcon.templateData.bleedingImage[0].size !=undefined){icon.nextSibling.attributes.textSize = pageIcon.templateData.bleedingImage[0].size;}//remove text box if full screenif (pageIcon.templateData.bleedingImage[0].imagesize == 'full screen'){ if (icon.nextSibling.attributes.id == 'textBlock'){ //debug(icon.nextSibling.attributes.id); icon.nextSibling.removeNode(); }}]]></SCR> <DIS scrolling="auto" id="textBlock" h="textHeight" name="text" x="textX" y="textY" w="textWidth" type="text"><![CDATA[{pageIcon.templateData.bleedingImage[0]}]]></DIS> <INT name="checknarnavigate" perpetual="1"> <RES name="onSoundComplete" type="event" eventName="onSoundComplete" icon="nar" erase="1" exit="1"> <SCR name="autonavigate"><![CDATA[//if the author has set autonavigate at end of narration move to next pageif (pageIcon.templateData.bleedingImage[0].narnavigate == "true"){rootIcon.nextPage();}]]></SCR> </RES> </INT> <SCR name="show hide magnifyer"><![CDATA[if (pageIcon.templateData.bleedingImage[0].magnifier != "true"){ icon.nextSibling.removeNode();}]]></SCR> <INT name="zoomControls" perpetual="0"> <RES name="onRollOver" type="event" eventName="onRollOver" icon="graphic" erase="1" exit="0"> <DIS h="graphic._height *4" w="graphic._width * 4" id="zoom" name="zoom" x="graphic._x" y="graphic._y" type="ext" url="{pageIcon.templateData.bleedingImage[0].url}"><![CDATA[]]></DIS> <DIS id="mask" name="mask" x="-100" y="-100" type="ext" url="FileLocation + "><![CDATA[]]></DIS> <DIS id="frame" name="frame" x="-100" y="-100" type="ext" url="FileLocation + "><![CDATA[]]></DIS> <SCR name="setup"><![CDATA[mask.beginFill(0xFF0000,100);mask.drawOval(0,0,60,60);zoom.setMask(mask);frame.lineStyle(2, 0x000000,100);frame.drawOval(0,0,60,60);mainMask.beginFill(0xFF0000,100);mainMask.drawRect(0,0,graphic._width, graphic._height);Mouse.hide();]]></SCR> <INT name="onMouseMove" perpetual="0"> <RES name="onMouseMove" type="event" eventName="onMouseMove" icon="zoom" erase="1" exit="0"> <SCR name="moveThings"><![CDATA[mask._x = rootIcon._xmouse;mask._y = rootIcon._ymouse - 60;frame._x = rootIcon._xmouse;frame._y = rootIcon._ymouse - 60;zoom._x = graphic._x - 3*(rootIcon._xmouse - graphic._x);zoom._y = graphic._y - 3*(rootIcon._ymouse - graphic._y) + 180;]]></SCR> </RES> </INT> </RES> <RES name="onRollOut" type="event" eventName="onRollOut" icon="graphic" erase="1" exit="0"> <SCR name="exit"><![CDATA[Mouse.show();]]></SCR> </RES> </INT> </PG>
Expand Down

0 comments on commit 6231d69

Please sign in to comment.