# Presentation script, generated by {program:version} # # Copyright (C) 2003 Leonard Lin # Copyright (C) 2007-2008 Sergio Costas # Copyright (C) 2009-2013 Pablo Rodríguez # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 3 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # Additional permission under GNU GPL version 3 section 7 # # As a special exception, if you create a document which uses this # script, and compile this script or a modified version of it in the # document, this script does not by itself cause the resulting document # to be covered by the GNU General Public License. This exception does # not however invalidate any other reasons why the document might be # covered by the GNU General Public License. .flash filename="{filename:output}" version=8 fps=12 .swf slides "{filename:slides}" .sound audio "{filename:audio}" .action: var times=new Array(); var maxtimes; var position; var mode; var sound_position; var sound_length; var show_slide; var contextual = new ContextMenu(); function ssurl(){ getURL("http://www.iraccoonshow.tk", "_blank"); } contextual.hideBuiltInItems(); ss_url = new ContextMenuItem("Done with iRaccoonShow", ssurl); contextual.customItems.push(ss_url); _root.menu = contextual; snd = new Sound(this); snd.attachSound("audio"); sound_length=snd.duration; position = 0; show_slide = false; {maxtime:maxtimes} {timelist:times} function pause_or_play() { if (mode==0) { snd.start(snd.position/1000.0,0); mode=1; } else if (mode==1) { snd.stop(); mode=0; } } function previous_slide() { if (mode<2) { if (mode==0) { mode=1; } snd.stop(); if (position>0) { sound_position=times[position-1]; } else { sound_position=0; } snd.start(sound_position/1000.0,0); } } function next_slide() { if (mode<2) { if (mode==0) { mode=1; } snd.stop(); sound_position = times[position+1]; if (sound_position>sound_length) { sound_position=sound_length-500; } snd.start(sound_position/1000.0,0); } } function first_slide() { snd.stop(); snd.start(0,0); slides.gotoAndStop(1); position=0; mode=1; show_slide=true; } function last_slide() { snd.stop(); sound_position = times[maxtimes]; slides.gotoAndStop(maxtimes); show_slide=false; snd.start(sound_position/1000.0,0); } function toogle_fullscreen() { if(Stage.displayState == "normal"){ Stage.displayState="fullScreen"; } else { Stage.displayState="normal"; } } Mouse.onMouseDown = function() { if ((getTimer() - lastClick) < 400) { pause_or_play(); } else { lastClick = getTimer(); } }; key_listen=new Object(); key_listen.onKeyDown = function() { switch (Key.getCode()) { case 32: pause_or_play(); break; case 37: previous_slide(); break; case 38: first_slide(); break; case 39: next_slide(); break; case 40: last_slide(); break; case 70: toogle_fullscreen(); break; } }; function check_time() { if (mode==1) { if (snd.position+220>sound_length) { snd.stop(); mode=2; if(Stage.displayState == "fullScreen"){ Stage.displayState="normal"; } } else { if ((snd.position>=times[position])&&(snd.positionmaxtimes) { snd.stop(); mode=2; } else { if (snd.position