╨╧рб▒с>■   ■                                                                                                                                                                                                                                                                                                                                                                                                                                                   Root Entry        pк|Yкr╧ГRASH└* Ў8 ┴Contents        4ЇPage 1            ИSymbol 2            8¤               ■           $    ■                                               ■    !"/    %                                    0123■   56789:;<=■                                                                                                                                                                                                                                                                           Root Entry        pк|Yкr╧ГRASH╨W с8 ┴Contents        #ЇPage 1            CSymbol 2            8        ¤   ■        $ ■    ■                       ■                   &%'()*+,-.■                                                                                                                                                                                                                                                                                                                                       Symbol 1    гSymbol 3        4▀                        Symbol 1    гSymbol 3        4▀                          CPicPage   CPicLayer   CPicFrame  CPicTextАА{$k   Е█  РX@G└Arialf╠Щ "ф¤thisFollower.assignNextDest = function () {if (this.destList.length>0) ААА╩)3Е█  ║0@└ArialЩ Щ "м■follow a list of pointsАААx ▀$X@ArialЩ Щ "(the ball in this movie is created by the makeFollower() function. makeFollower() gives a clip methods that move it sequentially through a list of points. the ball starts with two points in its follow list; you can click this movie to create new points for the ball to follow.ААЩ╠f ёаU00>0`к8 j· ищ8 Ў (╪   ?  ААbg      O АА   CPicSpritep■  ╘■  p■  ╘■    CPicPage   CPicLayer   CPicFrameАА╠╠f ╠╠╠ (ўиX■XX░и4|P и4иXX■░4ДX■P 4ииP X■4Д░X■4XииP 4|и░   ?  ААgraphics    OА  АА   CPicSprite    8onClipEvent (enterFrame) { _parent.gotoNextDest(); }АА     №onClipEvent(mouseDown) { // Add the mouse coords to the point list. _root.ball.addDest(_root._xmouse, _root._ymouse); pcount++; _root.attachMovie("point", "point" + pcount, 1000 + pcount); _root["point" + pcount]._x = _root._xmouse; _root["point" + pcount]._y = _root._ymouse; // If the ball is finished following all the points, // start it back up again... if (_root.ball.currentDest == null) { _root.ball.assignNextDest(); _root.ball ■           ■                                                                                                                                           567■                                                                                                                                                                                                                                                                                                   .lastTick = getTimer(); } }АААh■  ■ 8@Arial "(mouse handler clipАА  (є0и¤r№╧ 4\| :4┐B╞■Д4д─■| 4┐┐~ ╞■4дВ─■4B┐<~ 4\:В4°9°9В   ?  ААscript clip (mouse handler)     O  АААА   ?  ▌// Create a follower named ball... makeFollower("ball", 0, 0, 130); // Add a point to the destination list. ball.addDest(100, 300); ball.addDest(150, 270); // Start the follower following. ball.assignNextDest();ААscripts: general    Щ3╠ АААА   ?   @/* ******************************* *** FUNCTION makeFollower() *** ******************************* > VERSION: 1.0.2 > DESCRIPTION: Creates a movie clip and assigns it methods for managing a list of points and moving towards each point sequentially. This function is effectively (though not technically) a constructor function that generates clip-object instances. > PARAMETERS: name The instance name of the new clip. x Starting horizontal location of the clip. x Starting vertical location of the clip. speed Distance the clip travels, in pixels per second. */ function makeFollower (name, x, y, speed) { // Keep a count so each follower gets a unique id. followerCount++; // Make the new follower clip. this.attachMovie("follower", name, followerCount); // Store a convenient reference to the new follower. var thisFollower = this[name]; // Position the new follower clip. thisFollower._x = x; thisFollower._y = y; // Set up some basic properties for the follower... thisFollower.destList = new Array(); // The list of points to follow thisFollower.speed = speed; // The speed of the follower thisFollower.currentDest = null; // The follower's current destination. thisFollower.reachedDest = false; // Flag set when each dest is reached. thisFollower.lastTick = getTimer(); // The time the follower last moved. // ======== Follower Methods ========= // Next we assign the follower clip // functions that act as methods. // *** addDest() *** // Adds a destination point to the end of the point list. thisFollower.addDest = function (x, y) { // Create a new point object. var newDest = { x: x, y: y }; // Tack it onto the end of the list. this.destList.push(newDest); } // *** assignNextDest() *** // Sets the next point (currentDest) towards which // the follower will move (the oldest point on the list). thisFollower.assignNextDest = function () { if (this.destList.length > 0) { this.currentDest = this.destList.shift(); this.reachedDest = false; } else { this.currentDest = null; } } // *** gotoNextDest() *** // Moves the follower towards currentDest according to // the follower's speed. thisFollower.gotoNextDest = function () { // trace("Moving towards: " + this.currentDest.x + ", " + this.currentDest.y); // If there's an active current destination... if (this.currentDest != null) { // If the clip hasn't arrived on either axis of the destination... if ((this._x != this.currentDest.x || this._y != this.currentDest.y) || !this.reachedDest) { // ...measure time elapsed since the last move this.thisTick = getTimer(); this.elapsedSeconds = (this.thisTick - this.lastTick) / 1000; this.lastTick = this.thisTick; // Calculate distance to move based on time passed and speed. this.moveDist = this.speed * this.elapsedSeconds; // Determine distance between clip and destination var deltaX = this._x - this.currentDest.x; var deltaY = this._y - this.currentDest.y; var dist = Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)); // If the clip has enough speed to overshoot the destination, // just go to the destination. Otherwise move according to // the clip's speed. if (this.moveDist >= dist) { this._x = this.currentDest.x; this._y = this.currentDest.y; // Note that we've arrived... this.reachedDest = true; // ...and then go to the next point on // the list. this.assignNextDest(); } else { // Allocate speed between x and y axes var moveX = this.moveDist * (deltaX / dist); var moveY = this.moveDist * (deltaY / dist); // Move follower towards the destination. this._x -= moveX; this._y -= moveY; } } } } }ААscripts: makeFollower()     OO ААFo;eWq;А Symbol 3 emptyClip╗o;  emptyClip╗o;А Symbol 2pointСo;point ]o;А Symbol 1follower To; followerЮXo;°*@hЕhhhhЩЩ3 └└└ ┤Vecto  CPicPage   CPicLayer   CPicFrame   CPicShapeААЩ╠f qАаU00>0`к8 j· ищ8 Ў (╪  CPicTextАА{$k   Е█  РX@G└Arialf╠Щ "ф¤thisFollower.assignNextDest = function () {if (this.destList.length>0) ААА╩)3Е█  ║0@└ArialЩ Щ "м■follow a list of points АААx ▀$X@ArialЩ Щ "(the ball in this movie is created by the makeFollower() function. makeFollower() gives a clip methods that move it sequentially through a list of points. the ball starts with two points in its follow list; you can click this movie to create new points for the ball to follow.АА   ?  ААbg      O АА   CPicSpritep■  ╘■  p■  ╘■       №onClipEvent(mouseDown) { // Add the mouse coords to the point list. _root.ball.addDest(_root._xmouse, _root._ymouse); pcount++; _root.attachMovie("point", "point" + pcount, 1000 + pcount); _root["point" + pcount]._x = _root._xmouse; _root["point" + pcount]._y = _root._ymouse; // If the ball is finished following all the points, // start it back up again... if (_root.ball.currentDest == null) { _root.ball.assignNextDest(); _root.ball.lastTick = getTimer(); } } АААh■  ■ 8@Arial "(mouse handler clipАА  (є0и¤r№╧ 4\| :4┐B╞■Д4д─■| 4┐┐~ ╞■4дВ─■4B┐<~ 4\:В4°9°9В   ?  ААscript clip (mouse handler)     O  АААА   ?  ▌// Create a follower named ball... makeFollower("ball", 0, 0, 130); // Add a point to the destination list. ball.addDest(100, 300); ball.addDest(150, 270); // Start the follower following. ball.assignNextDest();ААscripts: general    Щ3╠ АААА   ?   @/* ***************************   ?   1 function makePerson (name, x, y, speed) { personCount++; this.attachMovie("person", name, personCount); this[name]._x = x; this[name]._y = y; this[name].destList = new Array(); this[name].speed = speed; this[name].currentDest = null; this[name].lastTick = getTimer(); // ======== Person Methods ========= // *** ADD A DESTINATION *** this[name].addDest = function (x, y) { var newDest = { x: x, y: y }; this.destList.push(newDest); } // *** ASSIGN THE NEXT DESTINATION *** this[name].assignNextDest = function () { if (this.destList.length > 0) { currentDest = this.destList.shift(); } else { currentDest = null; } } // *** MOVE TOWARDS THE CURRENT DESTINATION *** this[name].gotoNextDest = function () { // trace(this.currentDest.x + ", " + this.currentDest.y); if (this.currentDest != null) { // If the clip hasn't arrived on either axis... if (this._x != currentDest.x || this._y != currentDest.y) { // Measure time since last move this.thisTick = getTimer(); this.elapsedSeconds = (this.thisTick - this.lastTick) / 1000; this.lastTick = this.thisTick; this.moveDist = this.speed * this.elapsedSeconds; // ...determine distance between clip and destination var deltaX = this._x - currentDest.x; var deltaY = this._y - currentDest.y; var dist = Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)); // if the clip has enough speed to overshoot the destination, // just go to the destination. otherwise move according to // the clip's speed if (this.moveDist >= dist) { this._x = currentDest.x  CPicPage   CPicLayer   CPicFrameАА   ?  ААLayer 1    OА  ААr   CPicFrameАА**** *** FUNCTION makeFollower() *** ******************************* > VERSION: 1.0.2 > DESCRIPTION: Creates a movie clip and assigns it methods for managing a list of points and moving towards each point sequentially. This function is effectively (though not technically) a constructor function that generates clip-object instances. > PARAMETERS: name The instance name of the new clip. x Starting horizontal location of the clip. x Starting vertical location of the clip. speed Distance the clip travels, in pixels per second. */ function makeFollower (name, x, y, speed) { // Keep a count so each follower gets a unique id. followerCount++; // Make the new follower clip. this.attachMovie("follower", name, followerCount); // Store a convenient reference to the new follower. var thisFollower = this[name]; // Position the new follower clip. thisFollower._x = x; thisFollower._y = y; // Set up some basic properties for the follower... thisFollower.destList = new Array(); // The list of points to follow thisFollower.speed = speed; // The speed of the follower thisFollower.currentDest = null; // The follower's current destination. thisFollower.reachedDest = false; // Flag set when each dest is reached. thisFollower.lastTick = getTimer(); // The time the follower last moved. // ======== Follower Methods ========= // Next we assign the follower clip // functions that act as methods. // *** addDest() *** // Adds a destination point to the end of the point list. thisFollower.addDest = function (x, y) { // Create a new point object. var newDest = { x: x, y: y }; // Tack it onto the end of the list. this.destList.push(newDest); } // *** assignNextDest() *** // Sets the next point (currentDest) towards which // the follower will move (the oldest point on the list). thisFollower.assignNextDes    CDocumentPage Page 1Scene 1Fo;XЕq;А Symbol 3 emptyClip╗o;  emptyClip╗o;А Symbol 2pointСo;point ]o;А Symbol 1follower To; followerЮXo;°*@hЕhhhhЩЩ3 └└└ ┤Vecto  CPicPage   CPicLayer   CPicFrameААЩ Щ UА%ъ є є р эрєєєєрэ р є є    ?  ААLayer 1    OА  АА   ?   stop(); this.removeMovieClip();ААLayer 1    OА     ?  ААprocess: call gotoNextDest()     OO ААdMove); test.addMove(0, 0); ААage   CPicLayer   CPicFrameАА   ?  qstop(); makePerson("boy", 400, 50, 30); boy.addDest(100, 300); boy.addDest(30, 50); boy.assignNextDest();ААscripts: general    Щ3╠ ААААr::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Аf я0Аf3 я0Аff (я0АfЩ 5яHАf╠ <я`Аf  @яxА А333 0А А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яРАf3 ▄я0Аf33 PHАff3 (PHАfЩ3 <x`Аf╠3 CРxАf 3 FяРА Аfff `А А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яРАff ╚я0Аf3f ╚PHАfff `АfЩf P0xАf╠f PxРАf f PяиА АЩЩЩ РА АЩ аяHА3Щ УяHАfЩ ЕяHАЩЩ xяHА╠Щ nя`А Щ hяxА3Щ няHА33Щ аx`А3fЩ Мx`А3ЩЩ xx`А3╠Щ kРxА3 Щ dяРАfЩ ╗яHАf3Щ ┤x`АffЩ а0xАfЩЩ x0xАf╠Щ dxРАf Щ ]яиА А╠╠╠ └А А╠ ая`А3╠ Ця`Аf╠ Мя`АЩ╠ Вя`А╠╠ xя`А ╠ pяxА3╠ кя`А33╠ аРxА3f╠ УРxА3Щ╠ ЕРxА3╠╠ xРxА3 ╠ nяРАf╠ ┤я`Аf3╠ нРxАff╠ аxРАfЩ╠ МxРАf╠╠ xxРАf ╠ kяиА А    ЁА А  аяxА3  ШяxАf  РяxАЩ  ИяxА╠  АяxА   xяxА3  ияxА33  аяРА3f  ЦяРА3Щ  МяРА3╠  ВяРА3   xяРАf  ░яxАf3  кяРАff  аяиАfЩ  УяиАf╠  ЕяиАf   xяиА А  яxА АЩ яHАЩ3  яHАЩf яHАЩЩ (яHАЩ╠ 2я`АЩ  8яxА╠ я`А╠3  я`А╠f я`А╠Щ я`А╠╠ (я`А╠  0яxА  яxА 3 яxА f яxА Щ яxА ╠  яxА   (яxА А  PяxА АЩ3 уяHАЩ33 x`АЩf3 x`АЩЩ3 (x`АЩ╠3 5РxАЩ 3 <яРА╠3 ця`А╠33 РxА╠f3  РxА╠Щ3 РxА╠╠3 (РxА╠ 3 2яРА 3 шяxА 33 яРА f3  яРА Щ3 яРА ╠3 яРА  3 (яРА А  аяxА АЩf ╒яHАЩ3f ▄x`АЩff 0xАЩЩf (0xАЩ╠f <xРАЩ f CяиА╠f ▄я`А╠3f уРxА╠ff xРА╠Щf xРА╠╠f (xРА╠ f 5яиА f ряxА 3f цяРА ff яиА Щf  яиА ╠f яиА  f (яиА А   (яxА АЩЩ ╚яHАЩ3Щ ╚x`АЩfЩ ╚0xАЩЩЩ РАЩ╠Щ PPиАЩ Щ Pя└А╠Щ ╥я`А╠3Щ ╒РxА╠fЩ ▄xРА╠ЩЩ PиА╠╠Щ (PиА╠ Щ <я└А Щ ╪яxА 3Щ ▄яРА fЩ уяиА ЩЩ я└А ╠Щ я└А  Щ (я└А А   xяxА АЩ╠ ╛я`АЩ3╠ ╗РxАЩf╠ ┤xРАЩЩ╠ аPиАЩ╠╠ xPиАЩ ╠ dя└А╠╠ ╚я`А╠3╠ ╚РxА╠f╠ ╚xРА╠Щ╠ ╚PиА╠╠╠ └А╠ ╠ Pя╪А ╠ ╨яxА 3╠ ╥яРА f╠ ╒яиА Щ╠ ▄я└А ╠╠ я╪А  ╠ (я╪А А   ╚яxА АЩ  ╕яxАЩ3  ┤яРАЩf  няиАЩЩ  ая└АЩ╠  Мя└АЩ   xя└А╠  └яxА╠3  ╛яРА╠f  ╗яиА╠Щ  ┤я└А╠╠  ая╪А╠   xя╪А   ╚яxА 3  ╚яРА f  ╚яиА Щ  ╚я└А ╠  ╚я╪А    ЁА А       А       А     А     А     А f¤ `    z    АЩf к ╠      А   *   ]     к  ╘      PL|ь  h.gotoNextDest = function () { // trace("Moving towards: " + this.currentDest.x + ", " + this.currentDest.y); // If there's an active current destination... if (this.currentDest != null) { // If the clip hasn't arrived on either axis of the destt = function () { if (this.destList.length > 0) { this.currentDest = this.destList.shift(); this.reachedDest = false; } else { this.currentDest = null; } } // *** gotoNextDest() *** // Moves the follower towards currentDest according to // the follower's speed. thisFollower.gotoNextDest = function () { // trace("Moving towards: " + this.currentDest.x + ", " + this.currentDest.y); // If there's an active current destination... if (this.currentDest != null) { // If the clip hasn't arrived on either axis of the destination... if ((this._x != this.currentDest.x || this._y != this.currentDest.y) || !this.reachedDest) { // ...measure time elapsed since the last move this.thisTick = getTimer(); this.elapsedSeconds = (this.thisTick - this.lastTick) / 1000; this.lastTick = this.thisTick; // Calculate distance to move based on time passed and speed. this.moveDist = this.speed * this.elapsedSeconds; // Determine distance between clip and destination var deltaX = this._x - this.currentDest.x; var deltaY = this._y - this.currentDest.y; var dist = Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)); // If the clip has enough speed to overshoot the destination, // just go to the destination. Otherwise move according to // the clip's speed. if (this.moveDist >= dist) { this._x = this.currentDest.x; this._y = this.currentDest.y; // Note that we've arrived... this.reachedDest = true; // ...and then go to the next point on // the list. this.assignNextDest(); } else { // Allocate speed between x and y axes var moveX = this.moveDist * (deltaX / dist); var moveY = this.moveDist * (deltaY / dist); // Move follower towards the destination. this._x -= moveX; this._y -= moveY; } } } } }ААscripts: makeFollower()     OO АА    CDocumentPage Page 1Scene 1Fo;ЛЖq;А Symbol 3 emptyClip╗o;  emptyClip╗o;А Symbol 2pointСo;point ]o;А Symbol 1follower To; followerЮXo;°*@hЕhhhhЩЩ3 └└└ ┤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Аf я0Аf3 я0Аff (я0АfЩ 5яHАf╠ <я`Аf  @яxА А333 0А А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яРАf3 ▄я0Аf33 PHАff3 (PHАfЩ3 <x`Аf╠3 CРxАf 3 FяРА Аfff `А А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яРАff ╚я0Аf3f ╚PHАfff `АfЩf P0xАf╠f PxРАf f PяиА АЩЩЩ РА АЩ аяHА3Щ УяHАfЩ ЕяHАЩЩ xяHА╠Щ nя`А Щ hяxА3Щ няHА33Щ аx`А3fЩ Мx`А3ЩЩ xx`А3╠Щ kРxА3 Щ dяРАfЩ ╗яHАf3Щ ┤x`АffЩ а0xАfЩЩ x0xАf╠Щ dxРАf Щ ]яиА А╠╠╠ └А А╠ ая`А3╠ Ця`Аf╠ Мя`АЩ╠ Вя`А╠╠ xя`А ╠ pяxА3╠ кя`А33╠ аРxА3f╠ УРxА3Щ╠ ЕРxА3╠╠ xРxА3 ╠ nяРАf╠ ┤я`Аf3╠ нРxАff╠ аxРАfЩ╠ МxРАf╠╠ xxРАf ╠ kяиА А    ЁА А  аяxА3  ШяxАf  РяxАЩ  ИяxА╠  АяxА   xяxА3  ияxА33  аяРА3f  ЦяРА3Щ  МяРА3╠  ВяРА3   xяРАf  ░яxАf3  кяРАff  аяиАfЩ  УяиАf╠  ЕяиАf   xяиА А  яxА АЩ яHАЩ3  яHАЩf яHАЩЩ (яHАЩ╠ 2я`АЩ  8яxА╠ я`А╠3  я`А╠f я`А╠Щ я`А╠╠ (я`А╠  0яxА  яxА 3 яxА f яxА Щ яxА ╠  яxА   (яxА А  PяxА АЩ3 уяHАЩ33 x`АЩf3 x`АЩЩ3 (x`АЩ╠3 5РxАЩ 3 <яРА╠3 ця`А╠33 РxА╠f3  РxА╠Щ3 РxА╠╠3 (РxА╠ 3 2яРА 3 шяxА 33 яРА f3  яРА Щ3 яРА ╠3 яРА  3 (яРА А  аяxА АЩf ╒яHАЩ3f ▄x`АЩff 0xАЩЩf (0xАЩ╠f <xРАЩ f CяиА╠f ▄я`А╠3f уРxА╠ff xРА╠Щf xРА╠╠f (xРА╠ f 5яиА f ряxА 3f цяРА ff яиА Щf  яиА ╠f яиА  f (яиА А   (яxА АЩЩ ╚яHАЩ3Щ ╚x`АЩfЩ ╚0xАЩЩЩ РАЩ╠Щ PPиАЩ Щ Pя└А╠Щ ╥я`А╠3Щ ╒РxА╠fЩ ▄xРА╠ЩЩ PиА╠╠Щ (PиА╠ Щ <я└А Щ ╪яxА 3Щ ▄яРА fЩ уяиА ЩЩ я└А ╠Щ я└А  Щ (я└А А   xяxА АЩ╠ ╛я`АЩ3╠ ╗РxАЩf╠ ┤xРАЩЩ╠ аPиАЩ╠╠ xPиАЩ ╠ dя└А╠╠ ╚я`А╠3╠ ╚РxА╠f╠ ╚xРА╠Щ╠ ╚PиА╠╠╠ └А╠ ╠ Pя╪А ╠ ╨яxА 3╠ ╥яРА f╠ ╒яиА Щ╠ ▄я└А ╠╠ я╪А  ╠ (я╪А А   ╚яxА АЩ  ╕яxАЩ3  ┤яРАЩf  няиАЩЩ  ая└АЩ╠  Мя└АЩ   xя└А╠  └яxА╠3  ╛яРА╠f  ╗яиА╠Щ  ┤я└А╠╠  ая╪А╠   xя╪А   ╚яxА 3  ╚яРА f  ╚яиА Щ  ╚я└А ╠  ╚я╪А    ЁА А       А       А     А     А     А f¤ `    z    АЩf к ╠      А   *   ]     к  ╘      PL|ь  h