Last active
September 26, 2015 17:18
-
-
Save aumouvantsillage/1132368 to your computer and use it in GitHub Desktop.
Sample Sozi document that shows/hides objects during the presentation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<!-- Created with Inkscape (http://www.inkscape.org/) --> | |
<svg | |
xmlns:ns1="http://sozi.baierouge.fr" | |
xmlns:dc="http://purl.org/dc/elements/1.1/" | |
xmlns:cc="http://creativecommons.org/ns#" | |
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
xmlns:svg="http://www.w3.org/2000/svg" | |
xmlns="http://www.w3.org/2000/svg" | |
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" | |
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" | |
width="210mm" | |
height="297mm" | |
id="svg2" | |
version="1.1" | |
inkscape:version="0.48.2 r9819" | |
sodipodi:docname="Nouveau document 1"> | |
<sodipodi:namedview | |
id="base" | |
pagecolor="#ffffff" | |
bordercolor="#666666" | |
borderopacity="1.0" | |
inkscape:pageopacity="0.0" | |
inkscape:pageshadow="2" | |
inkscape:zoom="1.4" | |
inkscape:cx="488.03357" | |
inkscape:cy="599.25875" | |
inkscape:document-units="px" | |
inkscape:current-layer="layer1" | |
showgrid="false" | |
inkscape:window-width="1280" | |
inkscape:window-height="974" | |
inkscape:window-x="0" | |
inkscape:window-y="26" | |
inkscape:window-maximized="1" /> | |
<defs | |
id="defs4" /> | |
<metadata | |
id="metadata7"> | |
<rdf:RDF> | |
<cc:Work | |
rdf:about=""> | |
<dc:format>image/svg+xml</dc:format> | |
<dc:type | |
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> | |
<dc:title></dc:title> | |
</cc:Work> | |
</rdf:RDF> | |
</metadata> | |
<g | |
id="layer1" | |
inkscape:groupmode="layer" | |
inkscape:label="Calque 1"> | |
<text | |
sodipodi:linespacing="125%" | |
id="text2985" | |
y="317.36218" | |
x="262.14285" | |
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans" | |
xml:space="preserve"><tspan | |
y="317.36218" | |
x="262.14285" | |
id="tspan2987" | |
sodipodi:role="line">First</tspan></text> | |
<text | |
xml:space="preserve" | |
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans" | |
x="406.42856" | |
y="417.36221" | |
id="text2989" | |
sodipodi:linespacing="125%"><tspan | |
sodipodi:role="line" | |
id="tspan2991" | |
x="406.42856" | |
y="417.36221">Second</tspan></text> | |
<text | |
sodipodi:linespacing="125%" | |
id="text2993" | |
y="490.93362" | |
x="287.85715" | |
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans" | |
xml:space="preserve"><tspan | |
y="490.93362" | |
x="287.85715" | |
id="tspan2995" | |
sodipodi:role="line">Third</tspan></text> | |
<rect | |
y="275.21933" | |
x="251.42857" | |
height="160" | |
width="214.28572" | |
id="rect2997" | |
style="opacity:0.50000000000000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:#008080;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> | |
<rect | |
style="opacity:0.5;fill:none;stroke:#008080;stroke-width:2;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" | |
id="rect2999" | |
width="214.28572" | |
height="160" | |
x="360.71429" | |
y="374.50504" /> | |
<rect | |
y="280.40616" | |
x="243.75827" | |
height="241.05493" | |
width="200.34065" | |
id="rect3001" | |
style="opacity:0.5;fill:none;stroke:#008080;stroke-width:2.37364578;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> | |
<path | |
style="fill:#ff0000;stroke:none" | |
d="m 360,356.64789 -5.71429,-35.71428 35,15.71429 -21.13677,1.47319 z" | |
id="path3095" | |
inkscape:connector-curvature="0" | |
sodipodi:nodetypes="ccccc" /> | |
<path | |
sodipodi:nodetypes="ccccc" | |
inkscape:connector-curvature="0" | |
id="path3097" | |
d="m 365.79831,386.57843 32.16748,16.5353 -33.38346,18.90724 11.32445,-17.90783 z" | |
style="fill:#55d400;stroke:none" /> | |
<path | |
style="fill:#5599ff;stroke:none" | |
d="m 435.66394,473.38416 -36.12913,1.68796 19.52663,-33.02499 -0.89776,21.16903 z" | |
id="path3099" | |
inkscape:connector-curvature="0" | |
sodipodi:nodetypes="ccccc" /> | |
</g> | |
<script | |
ns1:version="11.07-27221841" | |
id="sozi-script">var sozi=sozi||{};(function(){var a=sozi.events=sozi.events||{},b={};a.listen=function(d,e){var c=b[d];if(!c){c=b[d]=[]}c.push(e)};a.fire=function(g){var d=b[g],c,f,e=Array.prototype.slice.call(arguments,1);if(d){c=d.length;for(f=0;f<c;f+=1){d[f].apply(null,e)}}}}());var sozi=sozi||{};(function(){var x=sozi.framelist=sozi.framelist||{},l=this,s=l.document,r,n,c,k=0,d=5,i,v,b,z,A,w,f=300,j=30,g="decelerate",a="http://www.w3.org/2000/svg";function h(B){return function(C){sozi.player.previewFrame(B);C.stopPropagation()}}function m(B){B.stopPropagation()}function q(C){var B=C.relatedTarget;while(B!==n&&B!==r){B=B.parentNode}if(B===r){x.hide();sozi.player.restart();C.stopPropagation()}}function u(C){var B=c.getCTM().f;if(B<=-l.innerHeight/2){B+=l.innerHeight/2}else{if(B<0){B=0}}c.setAttribute("transform","translate(0,"+B+")");C.stopPropagation()}function e(C){var B=c.getCTM().f;if(B+k>=l.innerHeight*3/2){B-=l.innerHeight/2}else{if(B+k>l.innerHeight+2*d){B=l.innerHeight-k-4*d}}c.setAttribute("transform","translate(0,"+B+")");C.stopPropagation()}function t(B){var D=sozi.animation.profiles[g](B),C=1-D;A=z*D+b*C;n.setAttribute("transform","translate("+A+",0)")}function y(){}function p(){var H=s.createElementNS(a,"rect"),B=s.createElementNS(a,"path"),F=s.createElementNS(a,"path"),I=0,G,D=sozi.document.frames.length,C=sozi.location.getFrameIndex(),E,J;r=s.documentElement;n=s.createElementNS(a,"g");n.setAttribute("id","sozi-toc");r.appendChild(n);c=s.createElementNS(a,"g");n.appendChild(c);H.setAttribute("id","sozi-toc-background");H.setAttribute("x",d);H.setAttribute("y",d);H.setAttribute("rx",d);H.setAttribute("ry",d);H.addEventListener("click",m,false);H.addEventListener("mousedown",m,false);H.addEventListener("mouseout",q,false);c.appendChild(H);for(E=0;E<D;E+=1){J=s.createElementNS(a,"text");J.appendChild(s.createTextNode(sozi.document.frames[E].title));c.appendChild(J);if(E===C){J.setAttribute("class","sozi-toc-current")}G=J.getBBox().width;k+=J.getBBox().height;if(G>I){I=G}J.setAttribute("x",2*d);J.setAttribute("y",k+d);J.addEventListener("click",h(E),false);J.addEventListener("mousedown",m,false)}B.setAttribute("class","sozi-toc-arrow");B.setAttribute("d","M"+(I+3*d)+","+(5*d)+" l"+(4*d)+",0 l-"+(2*d)+",-"+(3*d)+" z");B.addEventListener("click",u,false);B.addEventListener("mousedown",m,false);n.appendChild(B);F.setAttribute("class","sozi-toc-arrow");F.setAttribute("d","M"+(I+3*d)+","+(7*d)+" l"+(4*d)+",0 l-"+(2*d)+","+(3*d)+" z");F.addEventListener("click",e,false);F.addEventListener("mousedown",m,false);n.appendChild(F);H.setAttribute("width",I+7*d);H.setAttribute("height",k+2*d);i=-I-9*d;v=0;A=z=i;n.setAttribute("transform","translate("+i+",0)");w=new sozi.animation.Animator(j,t,y)}function o(B){var E=c.getElementsByClassName("sozi-toc-current"),D=c.getElementsByTagName("text"),C;for(C=0;C<E.length;C+=1){E[C].removeAttribute("class")}D[B].setAttribute("class","sozi-toc-current")}x.show=function(){b=A;z=v;w.start(f)};x.hide=function(){b=A;z=i;w.start(f)};x.isVisible=function(){return z===v};sozi.events.listen("displayready",p);sozi.events.listen("cleanup",x.hide);sozi.events.listen("framechange",o)}());var sozi=sozi||{};(function(){var s=sozi.player=sozi.player||{},t=sozi.display=sozi.display||{},j=this,o=j.document,p=0,u=1,r=1.05,w=5,c=false,l=false,g=0,e=0;function a(A,z,B){s.stop();t.zoom(A>0?r:1/r,z,B)}function v(x){s.stop();t.rotate(x>0?w:-w)}function q(){if(sozi.framelist.isVisible()){sozi.framelist.hide();s.restart()}else{s.stop();sozi.framelist.show()}}function i(x){if(x.button===p){c=true;l=false;g=x.clientX;e=x.clientY}else{if(x.button===u){q()}}x.stopPropagation()}function m(x){if(c){s.stop();l=true;sozi.events.fire("cleanup");t.drag(x.clientX-g,x.clientY-e);g=x.clientX;e=x.clientY}x.stopPropagation()}function f(x){if(x.button===p){c=false}x.stopPropagation()}function h(x){if(!l&&x.button!==u){s.moveToNext()}x.stopPropagation()}function k(x){var y=0;if(!x){x=j.event}if(x.wheelDelta){y=x.wheelDelta;if(j.opera){y=-y}}else{if(x.detail){y=-x.detail}}if(y!==0){if(x.shiftKey){v(y)}else{a(y,x.clientX,x.clientY)}}x.stopPropagation();x.preventDefault()}function n(x){switch(x.charCode){case 43:a(1,j.innerWidth/2,j.innerHeight/2);break;case 45:a(-1,j.innerWidth/2,j.innerHeight/2);break;case 61:s.moveToCurrent();break;case 70:case 102:s.showAll();break;case 84:case 116:q();break;case 82:v(-1);break;case 114:v(1);break}x.stopPropagation()}function d(x){switch(x.keyCode){case 36:s.moveToFirst();break;case 35:s.moveToLast();break;case 38:s.jumpToPrevious();break;case 33:case 37:s.moveToPrevious();break;case 40:s.jumpToNext();break;case 34:case 39:case 13:case 32:s.moveToNext();break}x.stopPropagation()}function b(){var x=o.documentElement;x.addEventListener("click",h,false);x.addEventListener("mousedown",i,false);x.addEventListener("mouseup",f,false);x.addEventListener("mousemove",m,false);x.addEventListener("keypress",n,false);x.addEventListener("keydown",d,false);x.addEventListener("DOMMouseScroll",k,false);j.onmousewheel=k}j.addEventListener("load",b,false)}());var sozi=sozi||{};(function(){var a=sozi.animation=sozi.animation||{},b=this;a.Animator=function(d,c,e){this.timeStepMs=d||40;this.onStep=c;this.onDone=e;this.durationMs=0;this.data={};this.initialTime=0;this.started=false;this.timer=0};a.Animator.prototype.start=function(c,e){var d=this;this.durationMs=c;this.data=e;this.initialTime=Date.now();this.onStep(0,this.data);if(!this.started){this.started=true;this.timer=b.setInterval(function(){d.step()},this.timeStepMs)}};a.Animator.prototype.stop=function(){if(this.started){b.clearInterval(this.timer);this.started=false}};a.Animator.prototype.step=function(){var c=Date.now()-this.initialTime;if(c>=this.durationMs){this.stop();this.onStep(1,this.data);this.onDone()}else{this.onStep(c/this.durationMs,this.data)}};a.profiles={linear:function(c){return c},accelerate:function(c){return Math.pow(c,3)},"strong-accelerate":function(c){return Math.pow(c,5)},decelerate:function(c){return 1-Math.pow(1-c,3)},"strong-decelerate":function(c){return 1-Math.pow(1-c,5)},"accelerate-decelerate":function(c){var d=c<=0.5?c:1-c,e=Math.pow(2*d,3)/2;return c<=0.5?e:1-e},"strong-accelerate-decelerate":function(c){var d=c<=0.5?c:1-c,e=Math.pow(2*d,5)/2;return c<=0.5?e:1-e},"decelerate-accelerate":function(c){var d=c<=0.5?c:1-c,e=(1-Math.pow(1-2*d,2))/2;return c<=0.5?e:1-e},"strong-decelerate-accelerate":function(c){var d=c<=0.5?c:1-c,e=(1-Math.pow(1-2*d,3))/2;return c<=0.5?e:1-e}}}());var sozi=sozi||{};(function(){var d=sozi.player=sozi.player||{},j=sozi.display=sozi.display||{},h=this,c,k,e=500,q=-10,l="linear",g=0,n=0,o=false,p=false;function f(t,w){var v=1-t,u=w.profile(t),s=1-u,r,x;for(r in w.initialState){if(w.initialState.hasOwnProperty(r)){if(typeof w.initialState[r]==="number"&&typeof w.finalState[r]==="number"){j.geometry[r]=w.finalState[r]*u+w.initialState[r]*s}}}if(w.zoomWidth&&w.zoomWidth.k!==0){x=t-w.zoomWidth.ts;j.geometry.width=w.zoomWidth.k*x*x+w.zoomWidth.ss}if(w.zoomHeight&&w.zoomHeight.k!==0){x=t-w.zoomHeight.ts;j.geometry.height=w.zoomHeight.k*x*x+w.zoomHeight.ss}j.clip=w.finalState.clip;j.update()}function i(){var r;if(sozi.document.frames[n].timeoutEnable){p=true;r=(n+1)%sozi.document.frames.length;k=h.setTimeout(function(){d.moveToFrame(r)},sozi.document.frames[n].timeoutMs)}}function m(){g=n;if(o){i()}}d.startFromIndex=function(r){o=true;p=false;g=r;n=r;j.showFrame(sozi.document.frames[r]);i()};d.restart=function(){d.startFromIndex(n)};d.stop=function(){c.stop();if(p){h.clearTimeout(k);p=false}o=false;g=n};function b(r,B,z){var C={ss:((r<0)?Math.max(B,z):Math.min(B,z))*(100-r)/100,ts:0.5,k:0},x,w,t,s,A,y;if(r!==0){x=B-z;w=B-C.ss;t=z-C.ss;if(x!==0){s=Math.sqrt(w*t);A=(w-s)/x;y=(w+s)/x;C.ts=(A>0&&A<=1)?A:y}C.k=w/C.ts/C.ts}return C}d.jumpToFrame=function(r){d.stop();sozi.events.fire("cleanup");g=r;n=r;j.showFrame(sozi.document.frames[r]);sozi.events.fire("framechange",r)};d.previewFrame=function(s){var u=sozi.document.frames[s].geometry,r,t;if(q!==0){r=b(q,j.geometry.width,u.width);t=b(q,j.geometry.height,u.height)}n=s;c.start(e,{initialState:j.getCurrentGeometry(),finalState:u,profile:sozi.animation.profiles[l],zoomWidth:r,zoomHeight:t});sozi.events.fire("framechange",s)};d.moveToFrame=function(t){var s=e,w=q,u=sozi.animation.profiles[l],r,v;if(p){h.clearTimeout(k);p=false}if(t===(n+1)%sozi.document.frames.length){s=sozi.document.frames[t].transitionDurationMs;w=sozi.document.frames[t].transitionZoomPercent;u=sozi.document.frames[t].transitionProfile}sozi.events.fire("cleanup");if(w!==0){r=b(w,j.geometry.width,sozi.document.frames[t].geometry.width);v=b(w,j.geometry.height,sozi.document.frames[t].geometry.height)}o=true;n=t;c.start(s,{initialState:j.getCurrentGeometry(),finalState:sozi.document.frames[n].geometry,profile:u,zoomWidth:r,zoomHeight:v});sozi.events.fire("framechange",t)};d.moveToFirst=function(){d.moveToFrame(0)};d.jumpToPrevious=function(){var r=n;if(!c.started||g<=n){r-=1}if(r>=0){d.jumpToFrame(r)}};d.moveToPrevious=function(){var r=n,s;for(r-=1;r>=0;r-=1){s=sozi.document.frames[r];if(!s.timeoutEnable||s.timeoutMs!==0){d.moveToFrame(r);break}}};d.jumpToNext=function(){var r=n;if(!c.started||g>=n){r+=1}if(r<sozi.document.frames.length){d.jumpToFrame(r)}};d.moveToNext=function(){if(n<sozi.document.frames.length-1||sozi.document.frames[n].timeoutEnable){d.moveToFrame((n+1)%sozi.document.frames.length)}};d.moveToLast=function(){d.moveToFrame(sozi.document.frames.length-1)};d.moveToCurrent=function(){d.moveToFrame(n)};d.showAll=function(){d.stop();sozi.events.fire("cleanup");c.start(e,{initialState:j.getCurrentGeometry(),finalState:j.getDocumentGeometry(),profile:sozi.animation.profiles[l]})};function a(){d.startFromIndex(sozi.location.getFrameIndex())}c=new sozi.animation.Animator(40,f,m);sozi.events.listen("displayready",a)}());var sozi=sozi||{};(function(){var d=sozi.display=sozi.display||{},h=this,i=h.document,j,c,k,a,g="http://www.w3.org/2000/svg";d.geometry={cx:0,cy:0,width:1,height:1,rotate:0};d.clip=true;function f(){var o,l=i.createElementNS(g,"g"),m=i.createElementNS(g,"clipPath");j=i.documentElement;j.removeAttribute("viewBox");k=j.getBBox();a=i.createElementNS(g,"g");while(true){o=j.firstChild;if(!o){break}j.removeChild(o);a.appendChild(o)}c=i.createElementNS(g,"rect");c.setAttribute("id","sozi-clip-rect");m.setAttribute("id","sozi-clip-path");m.appendChild(c);j.appendChild(m);l.setAttribute("clip-path","url(#sozi-clip-path)");l.appendChild(a);j.appendChild(l);j.setAttribute("width",h.innerWidth);j.setAttribute("height",h.innerHeight);sozi.events.fire("displayready")}function b(){j.setAttribute("width",h.innerWidth);j.setAttribute("height",h.innerHeight);d.update()}function e(){var l={};l.scale=Math.min(h.innerWidth/d.geometry.width,h.innerHeight/d.geometry.height);l.width=d.geometry.width*l.scale;l.height=d.geometry.height*l.scale;l.x=(h.innerWidth-l.width)/2;l.y=(h.innerHeight-l.height)/2;return l}d.getElementGeometry=function(l){var s,p,t,n,q,o,r=l.getCTM(),m=Math.sqrt(r.a*r.a+r.b*r.b);if(l.nodeName==="rect"){s=l.x.baseVal.value;p=l.y.baseVal.value;t=l.width.baseVal.value;n=l.height.baseVal.value}else{q=l.getBBox();s=q.x;p=q.y;t=q.width;n=q.height}o=i.documentElement.createSVGPoint();o.x=s+t/2;o.y=p+n/2;o=o.matrixTransform(r);return{cx:o.x,cy:o.y,width:t*m,height:n*m,rotate:Math.atan2(r.b,r.a)*180/Math.PI}};d.getDocumentGeometry=function(){return{cx:k.x+k.width/2,cy:k.y+k.height/2,width:k.width,height:k.height,rotate:0,clip:false}};d.getCurrentGeometry=function(){return{cx:d.geometry.cx,cy:d.geometry.cy,width:d.geometry.width,height:d.geometry.height,rotate:d.geometry.rotate,clip:d.clip}};d.update=function(){var l=e(),n=-d.geometry.cx+d.geometry.width/2+l.x/l.scale,m=-d.geometry.cy+d.geometry.height/2+l.y/l.scale;a.setAttribute("transform","scale("+l.scale+")translate("+n+","+m+")rotate("+(-d.geometry.rotate)+","+d.geometry.cx+","+d.geometry.cy+")");c.setAttribute("x",d.clip?l.x:0);c.setAttribute("y",d.clip?l.y:0);c.setAttribute("width",d.clip?l.width:h.innerWidth);c.setAttribute("height",d.clip?l.height:h.innerHeight)};d.showFrame=function(m){var l;for(l in m.geometry){if(m.geometry.hasOwnProperty(l)){d.geometry[l]=m.geometry[l]}}d.update()};d.drag=function(m,l){var n=e(),o=d.geometry.rotate*Math.PI/180;d.geometry.cx-=(m*Math.cos(o)-l*Math.sin(o))/n.scale;d.geometry.cy-=(m*Math.sin(o)+l*Math.cos(o))/n.scale;d.clip=false;d.update()};d.zoom=function(o,m,p){var n=(1-o)*(m-h.innerWidth/2),l=(1-o)*(p-h.innerHeight/2);d.geometry.width/=o;d.geometry.height/=o;d.drag(n,l)};d.rotate=function(l){d.geometry.rotate+=l;d.geometry.rotate%=360;d.update()};sozi.events.listen("documentready",f);h.addEventListener("resize",b,false)}());var sozi=sozi||{};(function(){var c=sozi.document=sozi.document||{},g=this,a=g.document,f="http://sozi.baierouge.fr",d={title:"Untitled",sequence:"0",hide:"true",clip:"true","timeout-enable":"false","timeout-ms":"5000","transition-duration-ms":"1000","transition-zoom-percent":"0","transition-profile":"linear"};c.frames=[];function h(j,i){var k=j.getAttributeNS(f,i);return k===""?d[i]:k}function b(){var j=a.getElementsByTagNameNS(f,"frame"),k=j.length,m,l,n;for(l=0;l<k;l+=1){m=a.getElementById(j[l].getAttributeNS(f,"refid"));if(m){n={geometry:sozi.display.getElementGeometry(m),title:h(j[l],"title"),sequence:parseInt(h(j[l],"sequence"),10),hide:h(j[l],"hide")==="true",timeoutEnable:h(j[l],"timeout-enable")==="true",timeoutMs:parseInt(h(j[l],"timeout-ms"),10),transitionDurationMs:parseInt(h(j[l],"transition-duration-ms"),10),transitionZoomPercent:parseInt(h(j[l],"transition-zoom-percent"),10),transitionProfile:sozi.animation.profiles[h(j[l],"transition-profile")||"linear"]};if(n.hide){m.setAttribute("visibility","hidden")}n.geometry.clip=h(j[l],"clip")==="true";c.frames.push(n)}}c.frames.sort(function(o,i){return o.sequence-i.sequence})}function e(){b();sozi.events.fire("documentready")}g.addEventListener("load",e,false)}());var sozi=sozi||{};(function(){var a=sozi.location=sozi.location||{},e=this,c=false;a.getFrameIndex=function(){var g=e.location.hash?parseInt(e.location.hash.slice(1),10)-1:0;if(isNaN(g)||g<0){return 0}else{if(g>=sozi.document.frames.length){return sozi.document.frames.length-1}else{return g}}};function f(){var g=a.getFrameIndex();if(!c){sozi.player.moveToFrame(g)}c=false}function d(g){c=true;e.location.hash="#"+(g+1)}function b(){sozi.events.listen("framechange",d)}e.addEventListener("hashchange",f,false);e.addEventListener("load",b,false)}());</script> | |
<script><![CDATA[ | |
var objList = [ | |
{id: "path3095", frame: 0}, | |
{id: "path3097", frame: 1}, | |
{id: "path3099", frame: 2} | |
]; | |
sozi.events.listen("sozi.player.framechange", function (index) { | |
for (var i = 0; i < objList.length; i ++) { | |
document.getElementById(objList[i].id).style.visibility = | |
objList[i].frame === index ? "visible" : "hidden"; | |
} | |
}); | |
]]></script> | |
<style | |
ns1:version="11.07-27221841" | |
id="sozi-style">#sozi-toc text{fill:#eff;font-family:Verdana,sans-serif;font-size:12pt}#sozi-toc text:hover{fill:#0cf;cursor:pointer}#sozi-toc text.sozi-toc-current{fill:#fa4}#sozi-toc-background{stroke:#222;stroke-opacity:.1;stroke-width:10;fill:#222;fill-opacity:.9}.sozi-toc-arrow{fill:#eff;fill-opacity:.75;stroke:none}.sozi-toc-arrow:hover{fill:#0cf}</style> | |
<ns1:frame | |
ns1:transition-profile="linear" | |
ns1:timeout-enable="false" | |
ns1:timeout-ms="5000" | |
ns1:transition-zoom-percent="0" | |
ns1:title="First" | |
ns1:clip="true" | |
ns1:hide="true" | |
ns1:transition-duration-ms="1000" | |
ns1:sequence="1" | |
ns1:refid="rect2997" /> | |
<ns1:frame | |
ns1:refid="rect2999" | |
ns1:sequence="2" | |
ns1:transition-duration-ms="1000" | |
ns1:hide="true" | |
ns1:clip="true" | |
ns1:title="Second" | |
ns1:transition-zoom-percent="0" | |
ns1:timeout-ms="5000" | |
ns1:timeout-enable="false" | |
ns1:transition-profile="linear" /> | |
<ns1:frame | |
ns1:transition-profile="linear" | |
ns1:timeout-enable="false" | |
ns1:timeout-ms="5000" | |
ns1:transition-zoom-percent="0" | |
ns1:title="Third" | |
ns1:clip="true" | |
ns1:hide="true" | |
ns1:transition-duration-ms="1000" | |
ns1:sequence="3" | |
ns1:refid="rect3001" /> | |
</svg> |
Hi,
with my version, I have to use "sozi.player.framechange" instead of "framechange", line 137.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I discovered your extension today. It is totally awesome!
Then I thought how can I show and hide objects during the presentation and found this code on Google.
Could you tell me how I can actually use it? I was planning to create something for Valentine's day tomorrow..
Regards
Johannes