аЯрЁБс>ўџ ўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџRoot Entryџџџџџџџџ pЊ|YЊrЯƒRASHаыnГх=Р€*ContentsџџџџџџџџWPage 1џџџџџџџџџџџџJ%Symbol 2џџџџз§џџџџџџџџџџџ#,$) ўџџџџџџџ !"[&%-ўџџџџџџџ+8џџџџ.ўџџџ0/61(џџџџџџџџџџџџџџџџ79<:џџџџ=>?@ўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ\]^ўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџRoot Entryџџџџџџџџ pЊ|YЊrЯƒRASHА™G‰х=Р€*ContentsџџџџџџџџPPage 1џџџџџџџџџџџџ2J%Symbol 2џџџџзџџџџџџџџ*§џџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ$џџџџџџџџџџџџџџџџџџџџ&%-ўџџџ,+8#.ўџџџ0/61(345A79<:;)=>?@ўџџџBCDEFGHIJKLMNOўџџџQRSTUVWXYZўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџSymbol 3џџџџџџџџџџџџFSymbol 4џџџџџџџџ}Symbol 6џџџџџџџџџџџџ‡1Symbol 5 џџџџбs  ўџџџ ўџџџўџџџ !"#$%&'()*+,-./01234ўџџџ6789:;<=>?@ABCDEFGHIўџџџKLMNOPQRSTUVWXYZ[\]^ўџџџ`abcdefghojklmnўџџџpqr€tuvwўџџџyz{|}~ўџџџџџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicSpriteџџџџ €€2џџџ?џџ€€џџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicShaџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџtion to change residue amount // based on slider handle position // this function is called by the release event of the drag Handle function setNewFactor () { var newPos = _x; var џџџџ €€џџџ?џџ€€Layer 1џџџџO€џџ€€ўўЁ9-residueDragBarџџCPicPageџџ CPicLayerџџ CPicFrame€€ џџхџџЬџћ(џyш 4F4F8џ•X8џ#8tа<6})0 U0аС0`Њ8џ5иџџџ?џџ€€ backgroundџџџџџџOџ€€€€3"џџ™3џг–Xг9й08Ѕ0ѕ0ШZ'№№ ѓВџѕ№ џџџ?џџ€€ activeZoneџџџџO€џџ€€џџ CPicSpriteЌљџџЌљџџdџ trailerParent€€џџџ?џџ€€ trailerParentџџџџ™3Ьџ€€џџCPicText€€hz)„@ШArial™™3џ"ьџthis trailer engine adds a configurable alpha transparency and size factor to the objects in the trail. as each object grows older, we set its size and alpha to reflect its age. as a matter of practicality, we also add an "active zone" for the trail so it can be contaied. €ЊяЊяџџџџ€€€ц&;…лџџф@XШArialџФ@џ"Ќўwhen executed in test movie mode, this movie will look choppy due to the trace functions€€џџџ?џџ€€ explanationџџџџOџџџ€€€€€h+ф@ ШArialџЬџ"ьџspawnRate€€€Є+ђф@ШArialџЬџ"ьџlifespan€€€'+Ыф@ШArialџЬџ"ьџresidue€€€H ф@ШArialџЬџ"ьџalpha€€€ јф@ШArialџЬџ"ьџscale€€€pц ’@hArialџъ­џ" ўms€€€Јђ ’@hArialџъ­џ" ўms€€€ъО D’@hArialџъ­џ" ў%€€€"Ъ D’@hArialџъ­џ" ў%€€џџџ?џџ€€uiџџџџ€€€џ€€€€€{$Wџџџ…лџџЈ@=РArialџъ­џ" ўduplicateMovieClip,spawnRate,lifespan_alpha._xscale.trailZone€€€f$—…лџџ0@РArialџФ@џ"Ќўdeluxe trailer engine€€џџџ?џџ€€titleџџџџOџOџ€€ €ЌљџџЬЌљџџЬџџџџ2onClipEvent (enterFrame) { _root.doTrail(); } processClip€€џџџ?џџ€€processџџџџџOџџ€€€€џџџ?џџџ‡ // -=-==-=-=-=-=-=-=-=-=-=-==-=--==-- // moock deluxe trailer engine // version 1.0.1 // =-==-=-==-=-=-=-==-=-=-=-=-=-=-=-= // ############# // user settings // ############# var spawnRate = 100; // how often to add an object to the trail (milliseconds) var defaultLifespan = 600; // the default lifespan of each trail object (milliseconds) var leaderX = function() { return _xmouse; }; // store the leader's coords in functions so the leader var leaderY = function() { return _ymouse; }; // can be changed easily. we might not be following the mouse! var trailResidue = 0; // number of objects in the trail to leave on screen when leader is idling var resizeFactor = 20; // percentage size of object at its death, compared to library definition // eg: 0 == don't resize; 2 == 2 times bigger; -2 == 2x smaller var alphaFactor = 10; // alpha of each object just before it dies (0-100) var trailZone = new Object(); // holds the coordinates of the active zone for the trail trailZone.minX = 1; trailZone.maxX = 550; trailZone.minY = 300; trailZone.maxY = 370; // ############################# // system follows. do not modify // ############################# // internal globals var trailers = new Array(); // a list of trail objects var lastSpawn = 0; // the time we last added an object to the trail var currentTime = 0; // the current time var trailerID = 0; // unique id assigned to each trailer (increases with each spawn) var oldestTrailer = 0; // ID of the oldest trailer on screen // use currentLeaderPos and lastLeaderPos to track whether or // not the leader is moving var currentLeaderPos = { x:leaderX(), y:leaderY() }; var lastLeaderPos = { x:leaderX(), y:leaderY() }; // creates a new trail clip function makeTrailer() { duplicateMovieClip(trailerParent, "trailer" + trailerID , trailerID); trailers[trailerID] = _root["trailer" + trailerID]; trailers[trailerID].birth = getTimer(); trailers[trailerID].lifespan = defaultLifeSpan; } // place any trail clip function placeTrailer(trailerID, x, y) { trailers[trailerID]._x = x; trailers[trailerID]._y = y; } // remove a specified trail clip function killTrailer(trailerID) { removeMovieClip(trailers[trailerID]); // kill the appropriate clip delete trailers[trailerID]; // get rid of the reference in the array // find new oldest trailer for (var i = oldestTrailer; i < trailers.length; i++) { if (trailers[i] != undefined) { oldestTrailer = i; break; } } trace(" trailer " + trailerID + " killed. new oldest trailer is: " + oldestTrailer + ""); } // make a trail of clips that follows a moving x and y coordinate function doTrail() { trace ("doTrail called"); // get the leader's latest location currentLeaderPos.x = leaderX(); currentLeaderPos.y = leaderY(); // set a flag stating whether or not leader has moved var leaderHasMoved = currentLeaderPos.x != lastLeaderPos.x || currentLeaderPos.y != lastLeaderPos.y; // check if the leader is out of the active trail zone if ((leaderX() > trailZone.maxX || leaderY() > trailZone.maxY) || (leaderX() < trailZone.minX) || (leaderY() < trailZone.minY)) { var outOfZone = true; } // check when we last added to the trail currentTime = getTimer(); var timeSinceLastSpawn = currentTime - lastSpawn; // add to the trail if enough time has passed, the leader has moved lately, and the leader's in the active zone if ((timeSinceLastSpawn >= spawnRate) && leaderHasMoved && !outOfZone) { trailerID++; makeTrailer(); placeTrailer(trailerID, leaderX(), leaderY()); lastSpawn = currentTime; trace(" made trailer: " + trailerID); } // kill any trail objects that have exceeded their lifespan, and add effects to those that are still alive for(var i = trailerID - trailResidue; i >= oldestTrailer; i--) { if(trailers[i] != undefined) { // don't bother checking gaps in the trail... if (getTimer() - trailers[i].birth >= trailers[i].lifespan) { killTrailer(i); } else { doEffects(i); } } } // record the location of the leader so we can check against it next time lastLeaderPos.x = currentLeaderPos.x; lastLeaderPos.y = currentLeaderPos.y; } // adds visual effects to the trail objects function doEffects(trailerID) { // first, figure out how old this object is as a percentage of its lifespan var agePercent = 100 * (getTimer() - trailers[trailerID].birth) / trailers[trailerID].lifespan; // do transparency (but only if we're in legal range) if (alphaFactor < 100 && alphaFactor >= 0) { var newAlpha = 100 - (100 - alphaFactor) * (agePercent / 100); trailers[trailerID]._alpha = newAlpha; } // do sizing (but only if we're in legal range) if (resizeFactor >= 0) { var newScale = 100 - (100 - resizeFactor) * (agePercent / 100); trailers[trailerID]._xscale = newScale; trailers[trailerID]._yscale = newScale; } } // ####################################### // DEMO INTERFACE CODE // this is not part of the trailer engine // ####################################### _root.attachMovie("spawnDragBar", "spawnDragBar", 10000000); spawnDragBar._x = 76; spawnDragBar._y = 226; _root.attachMovie("lifeDragBar", "lifeDragBar", 10000001); lifeDragBar._x = 255; lifeDragBar._y = 226; _root.attachMovie("residueDragBar", "residueDragBar", 10000002); residueDragBar._x = 427; residueDragBar._y = 226; _root.attachMovie("fadeOutDragBar", "fadeOutDragBar", 10000003); fadeOutDragBar._x = 76; fadeOutDragBar._y = 161; _root.attachMovie("resizeDragBar", "resizeDragBar", 10000004); resizeDragBar._x = 255; resizeDragBar._y = 161; €€scriptsџџџџO€џџ€€ range) if (resizeFactor >= 0) { var newScale = 100 - (100 - resizeFactor) * (agePercent / 100); trailers[trailerID]._xscale = newScale; trailers[trailerID]._yscale = newSc џџ CDocumentPage Page 1Scene 1Й?+9Œаѕ9€ Symbol 11spinner 5ьЂ9(iэЂ9€ Symbol 10 sliderBar _аѕ9Ф%‡Ђ9Ђ%‡Ђ9€ Symbol 7 dragHandleMC_аѕ9ФъЁ9ёЮѕ9€ Symbol 6 spawnDragBar_аѕ9ФїЁ9) spawnDragBarЭˆЂ9€ Symbol 9residueDragBar _аѕ9ФўўЁ9-residueDragBarХ“Ђ9€ Symbol 12fadeOutDragBar _аѕ9Ф6љЂ95fadeOutDragBar_њЂ9€ Symbol 13 resizeDragBar _аѕ9Ф{ћЂ97 resizeDragBar*аѕ9€ Symbol 8 lifeDragBar_аѕ9ФџїЁ9+ lifeDragBar{ŠЂ9€ Symbol 5 dragHandle_аѕ9ФdщЁ9џџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicSpriteџџџџ €€2џџџ?џџ€€џџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicShaџџCPicPageџџ CPicLayerџџ CPicFrame€€џџџ?џџџˆЂ9€ Symbol 2 process clip@+9@+9€ Symbol 3 trailerParentдЫЁ9щьЂ9€ Symbol 4 little circle“ЭЁ9~пЁ9ј*@h…hhhhџџхџРРРџ(ДVector::Template"PublishFormatProperties::generatorџџџџшџџ CColorDefџ€3џPя€fџPя0€™џPяH€ЬџPя`€џџPяx€3џя€33џ(я€3fџ<я0€3™џCяH€3ЬџFя`€3џџHяx€3џ я€33џxя€f3џdя0€™3џ]яH€Ь3џZя`€џ3џXяx€33џШя€333џ0€3f3џPPH€3™3џPx`€3Ь3џPx€3џ3џPя€fџ я0€3fџŒя0€ffџxя0€™fџkяH€Ьfџdя`€џfџ`яx€3fџДя0€33fџ PH€3ffџxPH€3™fџdx`€3Ьfџ]x€3џfџZя€™џ яH€3™џ“яH€f™џ…яH€™™џxяH€Ь™џnя`€џ™џhяx€3™џ­яH€33™џ x`€3f™џŒx`€3™™џxx`€3Ь™џkx€3џ™џdя€Ьџ я`€3Ьџ–я`€fЬџŒя`€™Ьџ‚я`€ЬЬџxя`€џЬџpяx€3ЬџЊя`€33Ьџ x€3fЬџ“x€3™Ьџ…x€3ЬЬџxx€3џЬџnя€џџ яx€3џџ˜яx€fџџяx€™џџˆяx€Ьџџ€яx€џџџxяx€3џџЈяx€33џџ я€3fџџ–я€3™џџŒя€3Ьџџ‚я€3џџџxя€fџя0€f3џя0€ffџ(я0€f™џ5яH€fЬџ<я`€fџџ@яx€™џяH€™3џ яH€™fџяH€™™џ(яH€™Ьџ2я`€™џџ8яx€f3џмя0€f33џPH€ff3џ(PH€f™3џ<x`€fЬ3џCx€fџ3џFя€™3џуяH€™33џx`€™f3џx`€™™3џ(x`€™Ь3џ5x€™џ3џ<я€ffџШя0€f3fџШPH€fffџ`€f™fџP0x€fЬfџPx€fџfџPяЈ€™fџеяH€™3fџмx`€™ffџ0x€™™fџ(0x€™Ьfџ<x€™џfџCяЈ€f™џЛяH€f3™џДx`€ff™џ 0x€f™™џx0x€fЬ™џdx€fџ™џ]яЈ€™™џШяH€™3™џШx`€™f™џШ0x€™™™џ€™Ь™џPPЈ€™џ™џPяР€fЬџДя`€f3Ьџ­x€ffЬџ x€f™ЬџŒx€fЬЬџxx€fџЬџkяЈ€™ЬџОя`€™3ЬџЛx€™fЬџДx€™™Ьџ PЈ€™ЬЬџxPЈ€™џЬџdяР€fџџАяx€f3џџЊя€ffџџ яЈ€f™џџ“яЈ€fЬџџ…яЈ€fџџџxяЈ€™џџSymbol 7 џџџџ CSymbol 8џџџџџџџџџџџџBSymbol 9џџџџџџџџ_?Symbol 10 џџџџiU€€Layer 1џџџџO€џџ€€pe€€јџџqтџџ™™3џW€x€;уыЧыьЯуџ\у€ЮЃы2€ыЧ#1€м€1Чы1ЧыЯуЮы€€џџџ?џџ€€Layer 1џџџџO€џџ€€џџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicShape€€Rљџџ8ѕџџџЬџ™™fџs€€ Xpў<0Ф€€џџџ?џџ€€€€Rљџџ8ѕџџџЬџ™™fџs€€ Xpў<0Ф€€џџџ?џџ€€€€Rљџџ8ѕџџџЬџ™™fџs€€ Xpў<Symbol 11џџџџџџџџџџџџxмSymbol 12 џџџџJ)Symbol 13џџџџџџџџџџџџ59џџџџџџџџџџџџs  ўџџџ ўџџџўџџџ !"#$%&'()*+,-./01234ўџџџ6789:;<=>?@ABCDEFGHIўџџџKLMNOPQRSTUVWXYZ[\]^ўџџџ`abcdefghojklmnўџџџpqr€tuvwўџџџyz{|}~ўџџџfaultLifeSpan = newLifeSpan; sliderOutput = newLifeSpan; } } dragHandle€€џџџ?џџ€€handleџџџџџOOџ€€ion to change residue amount // based on slider handle positџџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicSpriteџџџџ  sliderBar€€џџCPicPageџџ CPicLayerџџ CPicFrame€€ѓџ–џџн}џеЌ€Є™%…єT€є5_д#љњъ€ю€и0т˜Ы€З€Ы9еЗ€4fіщ№$f4P€ h49€4IшџА*€Ы€HИ№Ь€п)љ)€ю€'0т№4€З59е№џЗЫeі@я№машље€эЫ0тЫ€З9е5ЗбЂє+€эзfь p' Xьџ„0ѓ€WжjЁ€˜бэџЌєђЪзђЅ8Э€Єџџџ?џџ€€Layer 1џџџџO€џџ€€the leader's coords in functions so Symbol 3џџџџџџџџџџџџFSymbol 4џџџџџџџџ}Symbol 6џџџџџџџџџџџџ‡1Symbol 5 џџџџбџџџ?џџ€€barџџџџO€џџ€€€џџџџџЯonClipEvent (load) { // set maximum number of trailers left on screen var maxResize = 1200; // set location of drag Handle var resizePercent = (_root.resizeFactor) / maxResize; _x = resizePercent * _parent._width; sliderOutput = _root.resizeFactor; // func‚ƒ„…†ўџџџˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸўџџџЁЂЃЄЅІЇЈЉўџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџџ0Ф€€џџџ?џџ€€€€r:сzёџџ №џџџЬџ™™fџs€€ Xpў<0Ф€€џџџ?џџ€€Layer 1џџџџO€џџ€€th; function setNewFactor () { stopDraџџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicSprtion to change residue amount // based on slider handle position // this function is called by the release event of the drag Handle function setNewFactor () { var newPos = _x; var endPos = _parent.sliderBar._width; var handlePercent = newPos/endPos; var newResize = Math.round(maxResize * handlePercent); if (newResize < 0) { newResize = 0; } _root.resizeFactor = newResize; sliderOutput = newResize; } } dragHandle€€џџџ?џџ€€handleџџџџџOOџ€€ џџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicSpriteџџџџ  sliderBar€€џџџ?џџ€€barџџџџO€џџ€€€iteџџџџ  sliderBar€€џџџ?џџ€€barџџџџO€џџ€€€џџџџџиonClipEvent (load) { // set maximum life span var maxLifeSpan = 7000; // set location of drag Handle var lifeSpanPercent = _root.defaultLifeSpan / maxLifeSpan; _x = lifeSpanPercent * _parent._width; sliderOutput = _root.defaultLifeSpan; // function to change residue amount // based on slider handle position // this function is called by the release event of the drag Handle function setNewFactor () { var newPos = _x; var endPos = _parent.sliderBar._width; var handlePercent = newPos/endPos; var newLifeSpan = Math.round(maxLifeSpan * handlePercent); if (newLifeSpan <= 5) { newLifeSpan = 5; } _root.deџџCPicPageџџ CPicLayerџџ CPicFrame€€ џџхџџЬџћ(џyш 4F4F8џ•X8џ#8tа<6})0 U0аС0`Њ8џ5иџџџ?џџ€€ backgroundџџџџџџOџ€€€€3"џџ™3џг–Xг9й08Ѕ0ѕ0ШZ'№№ ѓВџѕ№ џџџ?џџ€€ activeZoneџџџџO€џџ€€џџ CPicSpriteЌљџџЌљџџdџ trailerParent€€џџџ?џџ€€ trailerParentџџџџ™3Ьџ€€џџCPicText€€hz)„@ШArial™™3џ"ьџthis trailer engine adds a configurable alpha transparency and size factor to the objects in the trail. as each object grows older, we set its size and alpha to reflect its age. as a matter of practicality, we also add an "active zone" for the trail so it can be contaied. €ЊяЊяџџџџ€€€ц&;…лџџф@XШArialџФ@џ"Ќўwhen executed in test movie mode, this movie will look choppy due to the trace functions€€џџџ?џџ€€ explanationџџџџOџџџ€€€€€h+ф@ ШArialџЬџ"ьџspawnRate€€€Є+ђф@ШArialџЬџ"ьџlifespan€€€'+Ыф@ШArialџЬџ"ьџџџџџџПonClipEvent (load) { // set maximum number of trailers left on screen var maxAlpha = 100; // set location of drag Handle var alphaPercent = _root.alphaFactor / maxAlpha; _x = alphaPercent * _parent._width; sliderOutput = _root.alphaFactor; // function to change residue amount // based on slider handle position // this function is called by the release event of the drag Handle function setNewFactor () { var newPos = _x; var endPos = _parent.sliderBar._width; var handlePercent = newPos/endPos; var newAlpha = Math.round(maxAlpha * handlePercent); if (newAlpha < 0) { newAlpha = 0; } _root.alphaFactor = newAlpha; sliderOutput = newAlpha; } } dragHandle€€џџџ?џџ€€handleџџџџџOOџ€€ } _root.spawnRate =џџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicSprendPos = _parent.sliderBar._width; var handlePercent = newPos/endPos; var newResidue = Math.round(maxResidue * handlePercent); if (newResidue < 0) { newResidue = 0; } _root.trailResidue = newResidue; sliderOutput = newResidue; } } dragHandle€€џџџ?џџ€€handleџџџџџOOџ€€џџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicSpriteџџџџ  sliderBar€€џџџ?џџ€€barџџџџO€џџ€€€џџџџџеonClipEvent (load) { // set maximum number of trailers left on screen var maxResidue = 20; // set location of drag Handle var residuePercent = _root.trailResidue / maxResidue; _x = residuePercent * џџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicShape€€ю§џџџъ­џ™™fџq€ьHP€€(0Иїи€€џџџ?џџ€€Layer 1џџџџO€џџ€€xx €fџЬџkяЈ €™ЬџОя` €™3Ь_parent._width; sliderOutput = _root.trailResidue; // function to change residue amount // based on slider handle position // this function is called by the release event of the drag Handle function setNewFactor () { var newPos = _x; var џџџџ €€џџџ?џџ€€Layer 1џџџџO€џџ€€ўўЁ9-residueDragBariteџџџџ  sliderBar€€џџџ?џџ€€barџџџџO€џџ€€€џџџџџЧonClipEvent (load) { // set maximum spawn rate var maxSpawnRate = 1100; // set location of spawn Handle var spawnPercent = _root.spawnRate / maxSpawnRate; _x = spawnPercent * _parent._width; sliderOutput = _root.spawnRate; function setNewFactor () { var newPos = _x; var endPos = _parent.sliderBar._width; var handlePercent = newPos/endPos; var newSpawnRate = Math.round(maxSpawnRate * handlePercent); trace ("newPos:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::" + newPos); trace ("endPos:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::" + endPos); trace ("handlePercent:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::" + handlePercent); trace ("newSpawnRate:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::" + newSpawnRate); if (newSpawnRate <= 5) { newSpawnRate = 5; } _root.spawnRate = newSpawnRate; sliderOutput = newSpawnRate; } } dragHandle€€џџџ?џџ€€handleџџџџџOOџ€€€€џџCPicPageџџ CPicLayerџџ CPicFrameџџ CPicButton€€џџџџvon (press) { this.startDrag(5,0,0,_parent.sliderBar._width); } on (release) { stopDrag(); setNewFactor(); }џџCPicText€€ ќџџt;Ѓ sliderOutputфArialџъ­џ"(0000€€џџџ?џџ€€Layer 1џџџџO€џџ€€tion // this function is called by the release event of the drag Handle function setNewFactor () { var newPos = _x; var endPos = _parent.sliderBar._width; var handlePercent = newPos/endPos; var newResize = Math.round(maxResize * handlePercent); if (newResize < 0) { newResize = 0; } _root.resizeFactor = newResize; sliderOutput = newResize; } } dragHandle€€residue€€€H ф@ШArialџЬџ"ьџalpha€€€ јф@ШArialџЬџ"ьџscale€€€pц ’@hArialџъ­џ" ўms€€€Јђ ’@hArialџъ­џ" ўms€€€ъО D’@hArialџъ­џ" ў%€€€"Ъ D’@hArialџъ­џ" ў%€€џџџ?џџ€€uiџџџџ€€€џ€€€€€{$Wџџџ…лџџЈ@=РArialџъ­џ" ўduplicateMovieClip,spawnRate,lifespan_alpha._xscale.trailZone€€€f$—…лџџ0@РArialџФ@џ"Ќўdeluxe trailer engine€€џџџ?џџ€€titleџџџџOџOџ€€ €ЌљџџЬЌљџџЬџџџџ2onClipEvent (enterFrame) { _root.doTrail(); } processClip€€џџџ?џџ€€processџџџџџOџџ€€€€џџџ?џџџ‡ // -=-==-=-=-=-=-=-=-=-=-=-==-=--==-- // moock deluxe trailer engine // version 1.0.1 // =-==-=-==-=-=-=-==-=-=-=-=-=-=-=-= // ############# // user settings // ############# var spawnRate = 100; // how often to add an object to the trail (milliseconds) var defaultLifespan = 600; // the default lifespan of each trail object (milliseconds) var leaderX = function() { return _xmouse; }; // store the leader's coords in functions so the leader var leaderY = function() { return _ymouse; }; // can be changed easily. we might not be following the mouse! var trailResidue = 0; // number of objects in the trail to leave on screen when leader is idling var resizeFactor = 20; // percentage size of object at its death, compared to library definition // eg: 0 == don't resize; 2 == 2 times bigger; -2 == 2x smaller var alphaFactor = 10; // alpha of each object just before it dies (0-100) var trailZone = new Object(); // holds the coordinates of the active zone for the trail trailZone.minX = 1; trailZone.maxX = 550; trailZone.minY = 300; trailZone.maxY = 370; // ############################# // system follows. do not modify // ############################# // internal globals var trailers = new Array(); // a list of trail objects var lastSpawn = 0; // the time we last added an object to the trail var currentTime = 0; // the current time var trailerID = 0; // unique id assigned to each trailer (increases with each spawn) var oldestTrailer = 0; // ID of the oldest trailer on screen // use currentLeaderPos and lastLeaderPos to track whether or // not the leader is moving var currentLeaderPos = { x:leaderX(), y:leaderY() }; var lastLeaderPos = { x:leaderX(), y:leaderY() }; // creates a new trail clip function makeTrailer() { duplicateMovieClip(trailerParent, "trailer" + trailerID , trailerID); trailers[trailerID] = _root["trailer" + trailerID]; trailers[trailerID].birth = getTimer(); trailers[trailerID].lifespan = defaultLifeSpan; } // place any trail clip function placeTrailer(trailerID, x, y) { trailers[trailerID]._x = x; trailers[trailerID]._y = y; } // remove a specified trail clip function killTrailer(trailerID) { removeMovieClip(trailers[trailerID]); // kill the appropriate clip delete trailers[trailerID]; // get rid of the reference in the array // find new oldest trailer for (var i = oldestTrailer; i < trailers.length; i++) { if (trailers[i] != undefined) { oldestTrailer = i; break; } } trace(" trailer " + trailerID + " killed. new oldest trailer is: " + oldestTrailer + ""); } // make a trail of clips that follows a moving x and y coordinate function doTrail() { trace ("doTrail called"); // get the leader's latest location currentLeaderPos.x = leaderX(); currentLeaderPos.y = leaderY(); // set a flag stating whether or not leader has moved var leaderHasMoved = currentLeaderPos.x != lastLeaderPos.x || currentLeaderPos.y != lastLeaderPos.y; // check if the leader is out of the active trail zone if ((leaderX() > trailZone.maxX || leaderY() > trailZone.maxY) || (leaderX() < trailZone.minX) || (leaderY() < trailZone.minY)) { var outOfZone = true; } // check when we last added to the trail currentTime = getTimer(); var timeSinceLastSpawn = currentTime - lastSpawn; // add to the trail if enough time has passed, the leader has moved lately, and the leader's in the active zone if ((timeSinceLastSpawn >= spawnRate) && leaderHasMoved && !outOfZone) { trailerID++; makeTrailer(); placeTrailer(trailerID, leaderX(), leaderY()); lastSpawn = currentTime; trace(" made trailer: " + trailerID); } // kill any trail objects that have exceeded their lifespan, and add effects to those that are still alive for(var i = trailerID - trailResidue; i >= oldestTrailer; i--) { if(trailers[i] != undefined) { // don't bother checking gaps in the trail... if (getTimer() - trailers[i].birth >= trailers[i].lifespan) { killTrailer(i); } else { doEffects(i); } } } // record the location of the leader so we can check against it next time lastLeaderPos.x = currentLeaderPos.x; lastLeaderPos.y = currentLeaderPos.y; } // adds visual effects to the trail objects function doEffects(trailerID) { // first, figure out how old this object is as a percentage of its lifespan var agePercent = 100 * (getTimer() - trailers[trailerID].birth) / trailers[trailerID].lifespan; // do transparency (but only if we're in legal range) if (alphaFactor < 100 && alphaFactor >= 0) { var newAlpha = 100 - (100 - alphaFactor) * (agePercent / 100); trailers[trailerID]._alpha = newAlpha; } // do sizing (but only if we're in legal range) if (resizeFactor >= 0) { var newScale = 100 - (100 - resizeFactor) * (agePercent / 100); trailers[trailerID]._xscale = newScale; trailers[trailerID]._yscale = newScale; } } // ####################################### // DEMO INTERFACE CODE // this is not part of the trailer engine // ####################################### _root.attachMovie("spawnDragBar", "spawnDragBar", 10000000); spawnDragBar._x = 76; spawnDragBar._y = 226; _root.attachMovie("lifeDragBar", "lifeDragBar", 10000001); lifeDragBar._x = 255; lifeDragBar._y = 226; _root.attachMovie("residueDragBar", "residueDragBar", 10000002); residueDragBar._x = 427; residueDragBar._y = 226; _root.attachMovie("fadeOutDragBar", "fadeOutDragBar", 10000003); fadeOutDragBar._x = 76; fadeOutDragBar._y = 161; _root.attachMovie("resizeDragBar", "resizeDragBar", 10000004); resizeDragBar._x = 255; resizeDragBar._y = 161; €€scriptsџџџџO€џџ€€ ); residueDragBar._x = 427; residueDragBar._y = 226; _root.attachMovie("fadeOutDragBar", "fadeOutDragBar", 10000003); fadeOutDragBar._x = 76; fadeOutDragBar._y = 161; _ro џџ CDocumentPage Page 1Scene 1Й?+9 аѕ9€ Symbol 11spinner 5ьЂ9(iэЂ9€ Symbol 10 sliderBar %‡Ђ9Ђ%‡Ђ9€ Symbol 7 dragHandleMCъЁ9ёЮѕ9€ Symbol 6 spawnDragBarїЁ9) spawnDragBarЭˆЂ9€ Symbol 9residueDragBar ўўЁ9-residueDragBarХ“Ђ9€ Symbol 12fadeOutDragBar 6љЂ95fadeOutDragBar_њЂ9€ Symbol 13 resizeDragBar {ћЂ97 resizeDragBar*аѕ9€ Symbol 8 lifeDragBarџїЁ9+ lifeDragBar{ŠЂ9€ Symbol 5 dragHandledщЁ9џˆЂ9€ Symbol 2 process clip@+9@+9€ Symbol 3 trailerParentдЫЁ9щьЂ9€ Symbol 4 little circle“ЭЁ9~пЁ9ј*@h…hhhhџџхџРРРџ(ДVector::Template"PublishFormatProperties::generatorџџџџшџџ CColorDefџ€3џPя€fџPя0€™џPяH€ЬџPя`€џџPяx€3џя€33џ(я€3fџ<я0€3™џCяH€3ЬџFя`€3џџHяx€3џ я€33џxя€f3џdя0€™3џ]яH€Ь3џZя`€џ3џXяx€33џШя€333џ0€3f3џPPH€3™3џPx`€3Ь3џPx€3џ3џPя€fџ я0€3fџŒя0€ffџxя0€™fџkяH€Ьfџdя`€џfџ`яx€3fџДя0€33fџ PH€3ffџxPH€3™fџdx`€3Ьfџ]x€3џfџZя€™џ яH€3™џ“яH€f™џ…яH€™™џxяH€Ь™џnя`€џ™џhяx€3™џ­яH€33™џ x`€3f™џŒx`€3™™џxx`€3Ь™џkx€3џ™џdя€Ьџ я`€3Ьџ–я`€fЬџŒя`€™Ьџ‚я`€ЬЬџxя`€џЬџpяx€3ЬџЊя`€33Ьџ x€3fЬџ“x€3™Ьџ…x€3ЬЬџxx€3џЬџnя€џџ яx€3џџ˜яx€fџџяx€™џџˆяx€Ьџџ€яx€џџџxяx€3џџЈяx€33џџ я€3fџџ–я€3™џџŒя€3Ьџџ‚я€3џџџxя€fџя0€f3џя0€ffџ(я0€f™џ5яH€fЬџ<я`€fџџ@яx€™џяH€™3џ яH€™fџяH€™™џ(яH€™Ьџ2я`€™џџ8яx€f3џмя0€f33џPH€ff3џ(PH€f™3џ<x`€fЬ3џCx€fџ3џFя€™3џуяH€™33џx`€™f3џx`€™™3џ(x`€™Ь3џ5x€™џ3џ<я€ffџШя0€f3fџШPH€fffџ`€f™fџP0x€fЬfџPx€fџfџPяЈ€™fџеяH€™3fџмx`€™ffџ0x€™™fџ(0x€™Ьfџ<x€™џfџCяЈ€f™џЛяH€f3™џДx`€ff™џ 0x€f™™џx0x€fЬ™џdx€fџ™џ]яЈ€™™џШяH€™3™џШx`€™f™џШ0x€™™™џ€™Ь™џPPЈ€™џ™џPяР€fЬџДя`€f3Ьџ­x€ffЬџ x€f™ЬџŒx€fЬЬџxx€fџЬџkяЈ€™ЬџОя`€™3ЬџЛx€™fЬџДx€™™Ьџ PЈ€™ЬЬџxPЈ€™џЬџdяР€fџџАяx€f3џџЊя€ffџџ яЈ€f™џџ“яЈ€fЬџџ…яЈ€fџџџxяЈ€™џџИяx€™3џџДя€™fџџ­яЈ€™™џџ яР€™ЬџџŒяР€™џџџxяР€Ьџя`€Ь3џ я`€Ьfџя`€Ь™џя`€ЬЬџ(я`€Ьџџ0яx€џџяx€џ3џяx€џfџяx€џ™џяx€џЬџ яx€џџџ(яx€Ь3џця`€Ь33џx€Ьf3џ x€Ь™3џx€ЬЬ3џ(x€Ьџ3џ2я€џ3џшяx€џ33џя€џf3џ я€џ™3џя€џЬ3џя€џџ3џ(я€Ьfџмя`€Ь3fџуx€Ьffџx€Ь™fџx€ЬЬfџ(x€Ьџfџ5яЈ€џfџряx€џ3fџця€џffџяЈ€џ™fџ яЈ€џЬfџяЈ€џџfџ(яЈ€Ь™џвя`€Ь3™џеx€Ьf™џмx€Ь™™џPЈ€ЬЬ™џ(PЈ€Ьџ™џ<яР€џ™џияx€џ3™џмя€џf™џуяЈ€џ™™џяР€џЬ™џяР€џџ™џ(яР€ЬЬџШя`€Ь3ЬџШx€ЬfЬџШx€Ь™ЬџШPЈ€ЬЬЬџР€ЬџЬџPяи€џЬџаяx€џ3Ьџвя€џfЬџеяЈ€џ™ЬџмяР€џЬЬџяи€џџЬџ(яи€ЬџџРяx€Ь3џџОя€ЬfџџЛяЈ€Ь™џџДяР€ЬЬџџ яи€Ьџџџxяи€џџџШяx€џ3џџШя€џfџџШяЈ€џ™џџШяР€џЬџџШяи€џџџџ№€џ€333џ0€fffџ`€™™™џ€ЬЬЬџР€џџџџ№€џџяx€џџPяx€џџ яx€џџџ(яx€џџџxяx€џџџШяx€џџхџ(яф€џъ­џяЪ€УрYџ1Ѕ”€џн}џяГ€џџџџџџџ€џџџџџџџ€џџџџџ€џџџџџ€џџџџџ€џџџ*џџџ]џџџџџЊџџдџџџџџџ(s“џџџh(яx€џџџxяx€џџџШяx€џџхџ(яф€џъ­џяЪ€УрYџ1Ѕ”€џн}џяГ€џџџџџџџ€џџџџџџџ€џИяx€™3џџДя€™fџџ­яЈ€™™џџ яР€™ЬџџŒяР€™џџџxяР€Ьџя`€Ь3џ я`€Ьfџя`€Ь™џя`€ЬЬџ(я`€Ьџџ0яx€џџяx€џ3џяx€џfџяx€џ™џяx€џЬџ яx€џџџ(яx€Ь3џця`€Ь33џx€Ьf3џ x€Ь™3џx€ЬЬ3џ(x€Ьџ3џ2я€џ3џшяx€џ33џя€џf3џ я€џ™3џя€џЬ3џя€џџ3џ(я€Ьfџмя`€Ь3fџуx€Ьffџx€Ь™fџx€ЬЬfџ(x€Ьџfџ5яЈ€џfџряx€џ3fџця€џffџяЈ€џ™fџ яЈ€џЬfџяЈ€џџfџ(яЈ€Ь™џвя`€Ь3™џеx€Ьf™џмx€Ь™™џPЈ€ЬЬ™џ(PЈ€Ьџ™џ<яР€џ™џияx€џ3™џмя€џf™џуяЈ€џ™™џяР€џЬ™џяР€џџ™џ(яР€ЬЬџШя`€Ь3ЬџШx€ЬfЬџШx€Ь™ЬџШPЈ€ЬЬЬџР€ЬџЬџPяи€џЬџаяx€џ3Ьџвя€џfЬџеяЈ€џ™ЬџмяР€џЬЬџяи€џџЬџ(яи€ЬџџРяx€Ь3џџОя€ЬfџџЛяЈ€Ь™џџДяР€ЬЬџџ яи€Ьџџџxяи€џџџШяx€џ3џџШя€џfџџШяЈ€џ™џџШяР€џЬџџШяи€џџџџ№€џ€333џ0€fffџ`€™™™џ€ЬЬЬџР€џџџџ№€џџяx€џџPяx€џџ яx€џџџ(яx€џџџxяx€џџџШяx€џџхџ(яф€џъ­џяЪ€УрYџ1Ѕ”€џн}џяГ€џџџџџџџ€џџџџџџџ€џџџџџ€џџџџџ€џџџџџ€џџџ*џџџ]џџџџџЊџџдџџџџџџ(s“interface widgets_аѕ9Фџџџh