ࡱ> #RIRH%Contents-Z)Page 1Symbol 2&'()*+,$./0123456789:;<=>?@AR FContentsZ)Page 1Symbol 2  !"  !"#$%&'()*+,-./0123456789:;<=>?@ABCPicPage CPicLayer CPicFrame?2 Layer 1OOCPicPage CPicLayer CPicFrame?, /****************************/ /* Crossfading slide show */ /* Author: Todd Dominey */ /* http://whatdoiknow.org */ /* http://domineydesign.com */ /****************************/ // set random # variables - each must be 0 for first 'while' loop below var randomNum = 0; var randomNumLast = 0; // parent container var container_mc = this.createEmptyMovieClip("container",0); // movie clip containers container_mc.createEmptyMovieClip("loader1_mc",2); container_mc.createEmptyMovieClip("loader2_mc",1); // preload watcher this.createEmptyMovieClip("watcher_mc",100); // load xml images_xml = new XML(); images_xml.ignoreWhite=true; images_xml.onLoad = parse; images_xml.load("images.xml"); function parse(success) { if (success) { imageArray = new Array(); var root = this.firstChild; _global.numPause = Number(this.firstChild.attributes.timer * 1000); _global.order = this.firstChild.attributes.order; _global.fadetime = Number(this.firstChild.attributes.fadetime); _global.xpos = Number(this.firstChild.attributes.xpos); _global.ypos = Number(this.firstChild.attributes.ypos); var imageNode = root.lastChild; var s=0; while (imageNode.nodeName != null) { imageData = new Object; imageData.path = imageNode.attributes.path; imageArray[s]=imageData; imageNode = imageNode.previousSibling; s++; } // place parent container container_mc._x = _global.xpos; container_mc._y = _global.ypos; // parse array imageArray.reverse(); imageGen(imageArray); } else { trace('problem'); } } // depth swapping function swapPlace(clip,num) { eval(clip).swapDepths(eval("container_mc.loader"+num+"_mc")); } function loadImages(data,num) { if (i==undefined || i == 2) { i=2; createLoader(i,data,num); i=1; } else if (i==1) { createLoader(i,data,num); i=2; } } function createLoader(i,data,num) { thisLoader=eval("container_mc.loader"+i+"_mc"); thisLoader._alpha=0; thisLoader.loadMovie(data[num].path); watcher_mc.onEnterFrame=function () { var picLoaded = thisLoader.getBytesLoaded(); var picBytes = thisLoader.getBytesTotal(); if (isNaN(picBytes) || picBytes < 4) { return; } if (picLoaded / picBytes >= 1) { swapPlace("container_mc.loader2_mc",1); thisLoader.alpha(_global.fadeTime,100); timerInterval = setInterval(imageGen,_global.numPause,data); delete this.onEnterFrame; } } } function imageGen(data) { // random, or sequential? if (_global.order=="random") { // choose random # between 0 and total number of images while (randomNum == randomNumLast) { randomNum = Math.floor(Math.random() * data.length); trace(randomNum); } loadImages(data,randomNum); randomNumLast = randomNum; } else if (_global.order=="sequential") { // start at 0, increment to total number of images, then drop back to zero when done if (p==undefined || p == data.length) { p=0; } loadImages(data,p); p++; } else { trace ("order attribute in xml isn't correct - must specify either 'random' or 'sequential'"); } clearInterval(timerInterval); } stop(); AO?MovieClip.prototype.alpha = function(vel, to) { this.vel = vel; this.to = to; this.alpha_init = this._alpha; this.onEnterFrame = function() { updateAfterEvent(); if (this.to != undefined && this.vel != undefined) { if (this.to>this.alpha_init) { if (this._alpha<=100) { this._alpha += this.vel; } else { this.onEnterFrame = null; } } else { if (this._alpha>this.to) { this._alpha -= this.vel; } else { this.onEnterFrame = null; } } } else { } }; }; ProtoOO) CDocumentPagePage 1Scene 1&e@B ЄYA Symbol 2empty_mc@tSymbol 16!@!hhhhh!PublishGifProperties::PaletteName PublishRNWKProperties::speed256K0"PublishHtmlProperties::StartPaused0%PublishFormatProperties::htmlFileNameslideshow.html PublishQTProperties::LayerOption PublishQTProperties::AlphaOption"PublishQTProperties::MatchMovieDim1Vector::Debugging Permitted0PublishProfileProperties::nameFlash MX SettingsPublishHtmlProperties::Loop1PublishFormatProperties::jpeg0PublishQTProperties::Width432$PublishPNGProperties::OptimizeColors1&PublishRNWKProperties::speedSingleISDN0&PublishRNWKProperties::singleRateAudio0%PublishHtmlProperties::showTagWarnMsg1PublishHtmlProperties::Units04PublishHtmlProperties::UsingDefaultAlternateFilename1Vector::External PlayerPublishGifProperties::Smooth1%PublishRNWKProperties::mediaCopyright(c) 2000#PublishRNWKProperties::flashBitRate1200Vector::Compress Movie1&PublishFormatProperties::flashFileName slideshow.swf'PublishFormatProperties::gifDefaultName1%PublishFormatProperties::projectorMac0Vector::Package Paths"PublishGifProperties::DitherOption!PublishRNWKProperties::exportSMIL1 PublishRNWKProperties::speed384K0"PublishRNWKProperties::exportAudio1PublishHtmlProperties::Quality4(PublishHtmlProperties::VerticalAlignment1$PublishFormatProperties::pngFileName slideshow.pngPublishFormatProperties::html1Vector::FireFox0"PublishPNGProperties::FilterOption'PublishRNWKProperties::mediaDescriptionVector::Override Sounds0!PublishHtmlProperties::DeviceFont0-PublishFormatProperties::generatorDefaultName1PublishQTProperties::Flatten1PublishPNGProperties::BitDepth24-bit with AlphaPublishPNGProperties::Smooth1"PublishGifProperties::DitherSolids0PublishGifProperties::Interlace0PublishJpegProperties::DPI4718592Vector::Quality80Vector::Protect0"PublishHtmlProperties::DisplayMenu1*PublishHtmlProperties::HorizontalAlignment12PublishHtmlProperties::VersionDetectionIfAvailable0*PublishFormatProperties::generatorFileName slideshow.swt(PublishFormatProperties::rnwkDefaultName1(PublishFormatProperties::jpegDefaultName1PublishFormatProperties::gif0Vector::Template0PublishGifProperties::Loop1PublishGifProperties::Width432$PublishRNWKProperties::mediaKeywords!PublishRNWKProperties::mediaTitlePublishRNWKProperties::speed28K1#PublishFormatProperties::qtFileName slideshow.mov"PublishPNGProperties::DitherOption#PublishGifProperties::PaletteOption#PublishGifProperties::MatchMovieDim1$PublishRNWKProperties::speedDualISDN0$PublishRNWKProperties::realVideoRate100000PublishJpegProperties::Quality80PublishFormatProperties::flash1#PublishPNGProperties::PaletteOption#PublishPNGProperties::MatchMovieDim1$PublishJpegProperties::MatchMovieDim1!PublishProfileProperties::version1PublishHtmlProperties::Align0-PublishFormatProperties::projectorWinFileName slideshow.exe'PublishFormatProperties::pngDefaultName10PublishFormatProperties::projectorMacDefaultName1Vector::Package Export Frame1#PublishQTProperties::PlayEveryFrame0"PublishPNGProperties::DitherSolids0"PublishJpegProperties::Progressive0Vector::Debugging PasswordVector::Omit Trace Actions1PublishHtmlProperties::Height288PublishHtmlProperties::Width432%PublishFormatProperties::jpegFileName slideshow.jpg)PublishFormatProperties::flashDefaultName1PublishPNGProperties::Interlace0PublishGifProperties::Height288PublishJpegProperties::Size0Vector::TopDown0'PublishHtmlProperties::TemplateFileNamelMoses:Users:tdominey:Library:Application Support:Macromedia:Flash MX 2004:en:Configuration:Html:Default.html!PublishHtmlProperties::WindowMode02PublishHtmlProperties::UsingDefaultContentFilename1-PublishFormatProperties::projectorMacFileNameslideshow Projector(PublishFormatProperties::htmlDefaultName1PublishFormatProperties::rnwk0PublishFormatProperties::png0Vector::DeviceSound0PublishQTProperties::Height288%PublishPNGProperties::RemoveGradients0PublishGifProperties::MaxColors255'PublishGifProperties::TransparentOptionPublishGifProperties::LoopCountPublishRNWKProperties::speed56K1Vector::Report0+PublishHtmlProperties::OwnAlternateFilename(PublishHtmlProperties::AlternateFilenameslideshow_alternate.html&PublishHtmlProperties::ContentFilenameslideshow_content.html"PublishFormatProperties::generator0$PublishGifProperties::OptimizeColors1"PublishRNWKProperties::audioFormat0Vector::Version6Vector::Event Format0Vector::Stream Compress7PublishFormatProperties::qt0legacyLineSpacing0PublishPNGProperties::Height288PublishPNGProperties::Width432%PublishGifProperties::RemoveGradients0 PublishRNWKProperties::speed512K0PublishJpegProperties::Height288Vector::Event Compress7PublishHtmlProperties::Scale00PublishFormatProperties::projectorWinDefaultName1Vector::ActionScriptVersion1PublishQTProperties::Looping0*PublishQTProperties::UseQTSoundCompression0!PublishPNGProperties::PaletteName!PublishPNGProperties::Transparent0&PublishGifProperties::TransparentAlpha128PublishGifProperties::Animated0"PublishRNWKProperties::mediaAuthor(PublishRNWKProperties::speedCorporateLAN0&PublishRNWKProperties::showBitrateDlog1"PublishRNWKProperties::exportFlash1PublishJpegProperties::Width432Vector::Stream Format0"PublishHtmlProperties::VersionInfo87,0,0,0;6,0,0,0;5,0,0,0;4,0,0,0;3,0,0,0;2,0,0,0;1,0,0,0;$PublishFormatProperties::gifFileName slideshow.gif&PublishFormatProperties::qtDefaultName1"PublishQTProperties::PausedAtStart0%PublishQTProperties::ControllerOption0PublishPNGProperties::MaxColors255,PublishHtmlProperties::UsingOwnAlternateFile0%PublishFormatProperties::rnwkFileNameslideshow.smil%PublishFormatProperties::projectorWin0%PublishFormatProperties::defaultNames1PropSheet::ActiveTab7641 CColorDef3PfP0PHP`Px333(3f<03CH3F`3Hxf0f30ff(0f5Hf<`f@x3330333xf3d03]H3Z`3Xx3333303f3PPH33Px`33Px33Pf30f33PHff3(PHf3<x`f3Cxf3Ffff`f03f0ffx0fkHfd`f`x3f033fPH3ffxPH3fdx`3f]x3fZff0f3fPHfff`ffP0xffPxffPH3HfHxH̙n`hx3H33x`3fx`3xx`3̙kx3dfHf3x`ff0xfx0xf̙dxf]`3`f``x`px3`33x3fx3x3xx3nf`f3xffxfxfxxfkx3xfxxxxx3x333f333xfxf3fffffxxH3 HfH(H2`8x`3 `f`̙`(`0xx3xfxx x(xPx3H33x`f3x`3(x`35x3<3`33xf3 x̙3x3(x323x33f3 333(xfH3fx`ff0xf(0xf<xfCf`3fxffx̙fxf(xf5fx3ffff ff((xH3x`f0x̙PPP`3xfx̙P̙(P<x3f̙(xx`3xfxPxPd`3xfx̙PPx3f(xx3fxx3f̙xx3ff`zf*]B(<"PublishQTProperties::QTSndSettingsCQTAudioSettingsh  !"#$%&'()*+,-./0123456789:;<=>?@ABCse { if (this._alpha>this.to) { this._alpha -= this.vel; } else { this.onEnterFrame = null; } } } else { } }; }; ProtoOOCPicPage CPicLayer CPicFrame?2 Layer 1OOCPicPage CPicLayer CPicFrame?XHQ /****************************/ /* Crossfading slide show */ /* Author: Todd Dominey */ /* http://whatdoiknow.org */ /* http://domineydesign.com */ /****************************/ // set random # variables - each must be 0 for first 'while' loop below var randomNum = 0; var randomNumLast = 0; // parent container var container_mc = this.createEmptyMovieClip("container",0); // movie clip containers container_mc.createEmptyMovieClip("loader1_mc",2); container_mc.createEmptyMovieClip("loader2_mc",1); // preload watcher this.createEmptyMovieClip("watcher_mc",100); // load xml images_xml = new XML(); images_xml.ignoreWhite=true; images_xml.onLoad = parse; images_xml.load("images.xml"); function parse(success) { if (success) { imageArray = new Array(); var root = this.firstChild; _global.numPause = Number(this.firstChild.attributes.timer * 1000); _global.order = this.firstChild.attributes.order; _global.looping = this.firstChild.attributes.looping; _global.fadetime = Number(this.firstChild.attributes.fadetime); _global.xpos = Number(this.firstChild.attributes.xpos); _global.ypos = Number(this.firstChild.attributes.ypos); var imageNode = root.lastChild; var s=0; while (imageNode.nodeName != null) { imageData = new Object; imageData.path = imageNode.attributes.path; imageArray[s]=imageData; imageNode = imageNode.previousSibling; s++; } // place parent container container_mc._x = _global.xpos; container_mc._y = _global.ypos; // parse array imageArray.reverse(); imageGen(imageArray); } else { trace('problem'); } } // depth swapping function swapPlace(clip,num) { eval(clip).swapDepths(eval("container_mc.loader"+num+"_mc")); } function loadImages(data,num) { if (i==undefined || i == 2) { i=2; createLoader(i,data,num); i=1; } else if (i==1) { createLoader(i,data,num); i=2; } } function createLoader(i,data,num) { thisLoader=eval("container_mc.loader"+i+"_mc"); thisLoader._alpha=0; thisLoader.loadMovie(data[num].path); watcher_mc.onEnterFrame=function () { var picLoaded = thisLoader.getBytesLoaded(); var picBytes = thisLoader.getBytesTotal(); if (isNaN(picBytes) || picBytes < 4) { return; } if (picLoaded / picBytes >= 1) { swapPlace("container_mc.loader2_mc",1); thisLoader.alpha(_global.fadeTime,100); timerInterval = setInterval(imageGen,_global.numPause,data); delete this.onEnterFrame; } } } function imageGen(data) { // random, or sequential? if (_global.order=="random") { // choose random # between 0 and total number of images while (randomNum == randomNumLast) { randomNum = Math.floor(Math.random() * data.length); trace(randomNum); } loadImages(data,randomNum); randomNumLast = randomNum; } else if (_global.order=="sequential") { // start at 0, increment to total number of images, then drop back to zero when done if (p==undefined || p==data.length && _global.looping=="yes") { p=0; } else { break; } loadImages(data,p); p++; } else { trace ("order attribute in xml isn't correct - must specify either 'random' or 'sequential'"); } clearInterval(timerInterval); } stop(); AO? RMovieClip.prototype.alpha = function(vel, to) { this.vel = vel; this.to = to; this.alpha_init = this._alpha; this.onEnterFrame = function() { updateAfterEvent(); if (this.to != undefined && this.vel != undefined) { if (this.to>this.alpha_init) { if (this._alpha<=100) { this._alpha += this.vel; } else { this.onEnterFrame = null; } } el) CDocumentPagePage 1Scene 1&e@B YA Symbol 2empty_mc@tSymbol 16!@!hhhhh%PublishFormatProperties::htmlFileNameslideshow.html"PublishHtmlProperties::StartPaused0 PublishRNWKProperties::speed256K0!PublishGifProperties::PaletteNamePublishFormatProperties::jpeg0PublishHtmlProperties::Loop1PublishProfileProperties::nameFlash MX SettingsVector::Debugging Permitted0"PublishQTProperties::MatchMovieDim1 PublishQTProperties::AlphaOption PublishQTProperties::LayerOption4PublishHtmlProperties::UsingDefaultAlternateFilename1PublishHtmlProperties::Units0%PublishHtmlProperties::showTagWarnMsg1&PublishRNWKProperties::singleRateAudio0&PublishRNWKProperties::speedSingleISDN0$PublishPNGProperties::OptimizeColors1PublishQTProperties::Width432Vector::External Player%PublishFormatProperties::projectorMac0'PublishFormatProperties::gifDefaultName1&PublishFormatProperties::flashFileName slideshow.swfVector::Compress Movie1#PublishRNWKProperties::flashBitRate1200%PublishRNWKProperties::mediaCopyright(c) 2000PublishGifProperties::Smooth1Vector::Package PathsPublishFormatProperties::html1$PublishFormatProperties::pngFileName slideshow.png(PublishHtmlProperties::VerticalAlignment1PublishHtmlProperties::Quality4"PublishRNWKProperties::exportAudio1 PublishRNWKProperties::speed384K0!PublishRNWKProperties::exportSMIL1"PublishGifProperties::DitherOptionVector::FireFox0-PublishFormatProperties::generatorDefaultName1!PublishHtmlProperties::DeviceFont0Vector::Override Sounds0'PublishRNWKProperties::mediaDescription"PublishPNGProperties::FilterOptionPublishFormatProperties::gif0(PublishFormatProperties::jpegDefaultName1(PublishFormatProperties::rnwkDefaultName1*PublishFormatProperties::generatorFileName slideshow.swt2PublishHtmlProperties::VersionDetectionIfAvailable0*PublishHtmlProperties::HorizontalAlignment1"PublishHtmlProperties::DisplayMenu1Vector::Protect0Vector::Quality80PublishJpegProperties::DPI4718592PublishGifProperties::Interlace0"PublishGifProperties::DitherSolids0PublishPNGProperties::Smooth1PublishPNGProperties::BitDepth24-bit with AlphaPublishQTProperties::Flatten1Vector::Template0#PublishFormatProperties::qtFileName slideshow.movPublishRNWKProperties::speed28K1!PublishRNWKProperties::mediaTitle$PublishRNWKProperties::mediaKeywordsPublishGifProperties::Width432PublishGifProperties::Loop1PublishFormatProperties::flash1PublishJpegProperties::Quality80$PublishRNWKProperties::realVideoRate100000$PublishRNWKProperties::speedDualISDN0#PublishGifProperties::MatchMovieDim1#PublishGifProperties::PaletteOption"PublishPNGProperties::DitherOption0PublishFormatProperties::projectorMacDefaultName1'PublishFormatProperties::pngDefaultName1-PublishFormatProperties::projectorWinFileName slideshow.exePublishHtmlProperties::Align0!PublishProfileProperties::version1$PublishJpegProperties::MatchMovieDim1#PublishPNGProperties::MatchMovieDim1#PublishPNGProperties::PaletteOptionVector::Package Export Frame1)PublishFormatProperties::flashDefaultName1%PublishFormatProperties::jpegFileName slideshow.jpgPublishHtmlProperties::Width432PublishHtmlProperties::Height288Vector::Omit Trace Actions1Vector::Debugging Password"PublishJpegProperties::Progressive0"PublishPNGProperties::DitherSolids0#PublishQTProperties::PlayEveryFrame0PublishFormatProperties::png0PublishFormatProperties::rnwk0(PublishFormatProperties::htmlDefaultName1-PublishFormatProperties::projectorMacFileNameslideshow Projector2PublishHtmlProperties::UsingDefaultContentFilename1!PublishHtmlProperties::WindowMode0'PublishHtmlProperties::TemplateFileNamelMoses:Users:tdominey:Library:Application Support:Macromedia:Flash MX 2004:en:Configuration:Html:Default.htmlVector::TopDown0PublishJpegProperties::Size0PublishGifProperties::Height288PublishPNGProperties::Interlace0Vector::DeviceSound0"PublishFormatProperties::generator0&PublishHtmlProperties::ContentFilenameslideshow_content.html(PublishHtmlProperties::AlternateFilenameslideshow_alternate.html+PublishHtmlProperties::OwnAlternateFilenameVector::Report0PublishRNWKProperties::speed56K1PublishGifProperties::LoopCount'PublishGifProperties::TransparentOptionPublishGifProperties::MaxColors255%PublishPNGProperties::RemoveGradients0PublishQTProperties::Height288PublishFormatProperties::qt0Vector::Stream Compress7Vector::Event Format0Vector::Version6"PublishRNWKProperties::audioFormat0$PublishGifProperties::OptimizeColors1legacyLineSpacing00PublishFormatProperties::projectorWinDefaultName1PublishHtmlProperties::Scale0Vector::Event Compress7PublishJpegProperties::Height288 PublishRNWKProperties::speed512K0%PublishGifProperties::RemoveGradients0PublishPNGProperties::Width432PublishPNGProperties::Height288Vector::ActionScriptVersion1&PublishFormatProperties::qtDefaultName1$PublishFormatProperties::gifFileName slideshow.gif"PublishHtmlProperties::VersionInfo87,0,0,0;6,0,0,0;5,0,0,0;4,0,0,0;3,0,0,0;2,0,0,0;1,0,0,0;Vector::Stream Format0PublishJpegProperties::Width432"PublishRNWKProperties::exportFlash1&PublishRNWKProperties::showBitrateDlog1(PublishRNWKProperties::speedCorporateLAN0"PublishRNWKProperties::mediaAuthorPublishGifProperties::Animated0&PublishGifProperties::TransparentAlpha128!PublishPNGProperties::Transparent0!PublishPNGProperties::PaletteName*PublishQTProperties::UseQTSoundCompression0PublishQTProperties::Looping0%PublishFormatProperties::defaultNames1%PublishFormatProperties::projectorWin0%PublishFormatProperties::rnwkFileNameslideshow.smil,PublishHtmlProperties::UsingOwnAlternateFile0PublishPNGProperties::MaxColors255%PublishQTProperties::ControllerOption0"PublishQTProperties::PausedAtStart0PropSheet::ActiveTab7641 CColorDef3PfP0PHP`Px333(3f<03CH3F`3Hxf0f30ff(0f5Hf<`f@x3330333xf3d03]H3Z`3Xx3333303f3PPH33Px`33Px33Pf30f33PHff3(PHf3<x`f3Cxf3Ffff`f03f0ffx0fkHfd`f`x3f033fPH3ffxPH3fdx`3f]x3fZff0f3fPHfff`ffP0xffPxffPH3HfHxH̙n`hx3H33x`3fx`3xx`3̙kx3dfHf3x`ff0xfx0xf̙dxf]`3`f``x`px3`33x3fx3x3xx3nf`f3xffxfxfxxfkx3xfxxxxx3x333f333xfxf3fffffxxH3 HfH(H2`8x`3 `f`̙`(`0xx3xfxx x(xPx3H33x`f3x`3(x`35x3<3`33xf3 x̙3x3(x323x33f3 333(xfH3fx`ff0xf(0xf<xfCf`3fxffx̙fxf(xf5fx3ffff ff((xH3x`f0x̙PPP`3xfx̙P̙(P<x3f̙(xx`3xfxPxPd`3xfx̙PPx3f(xx3fxx3f̙xx3ff`zf*]B(<"PublishQTProperties::QTSndSettingsCQTAudioSettingsh