ࡱ> Root EntryRoot Entryp|YrRASH #@ContentsZ&Page 1Symbol 173E  !"#$%&'()*+,-./0Symbol 3/Symbol 1&5Symbol 4 QSymbol 5  Symbol 11Symbol 13 !"#$%'()*+,-.01245678CPicPage CPicLayer CPicFrame CPicShape 3f3fsk0@p0@p0,s@s@p?Layer 1OCPicPage CPicLayer CPicFrame CPicSprite char? char? char CPicShapes0@? char s0@?Layer 1OCPicPage CPicLayer CPicFrameN0d0d0?Layer 1OCPicPage CPicLayer CPicFrameCPicText( @text_sans?Layer 1OCPicPage CPicLayer CPicFrame CPicShapesX0PX0P0? fff0pP0PXX3P0XpTV?Layer 1OCPicPage CPicLayer CPicFrame?Layer 1OCPicPage CPicLayer CPicFrame CPicShape,p0X0PX0P?Layer 1OCPicPage CPicLayer CPicFrame CPicSprite textoint( _parent.getBytesLoaded()/1000) add " KBYTES OF " add int(_parent.getBytesTotal() /1000) add " LOADED ..."4 _parent.getBytesTotal() == _parent.getBytesLoaded())_parent.gotoAndStop(2)? CPicButton4h4 3 CPicTextCEG TextField1_sansCLICK HERE TO START?   ) _root.work() )_root.getTarget() controller?assetsOO? allowscalefalseshowmenufalse?? allowscalefalse allowscalefalseour map is 2-dimensional arraymyMap1[[1, 1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 0, 1], [1, 0, 1, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 1, 0, 1], [1, 0, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1, 1]]#declare game object that holds infogame{tileW:30, tileH:30} walkable tile game.Tile0function () { }game.Tile0.prototype.walkabletruegame.Tile0.prototype.frame1 wall tile game.Tile1function () { }game.Tile1.prototype.walkablefalsegame.Tile1.prototype.frame2Cdeclare char object, xtile and ytile are tile where chars center ischar>{xtile:2, ytile:1, speed:2, moving:false, width:16, height:16}building the world%buildMapmapattach mouse cursor)&_root.attachMovie("mouse", "mouse", 2).attach empty mc to hold all the tiles and char)&_root.attachMovie("empty", "tiles", 1)(attach empty mc to hold background tiles)+_root.tiles.attachMovie("empty", "back", 0)declare clip in the game object game.clip _root.tiles game.clip._x150get map dimensions'mapWidth = map[0].length'mapHeight = map.lengthloop to place tiles on stage, var i = 0 iob.xtileob.dirx1ob.diry0leftGgame["t_"+ob.ytile+"_"+(ob.xtile-1)].walkable and game.targetxob.ytileob.dirx0ob.diry1downGgame["t_"+(ob.ytile-1)+"_"+ob.xtile].walkable and game.targetyC? Symbol 5startbutC?O? Symbol 11char f%?charևC@ Symbol 13 char_grph %?#'C@ hhhhh PublishRNWKProperties::speed256K0!PublishGifProperties::PaletteName"PublishHtmlProperties::StartPaused0%PublishFormatProperties::htmlFileName tut04.html PublishQTProperties::LayerOption PublishQTProperties::AlphaOption"PublishQTProperties::MatchMovieDim1PublishHtmlProperties::Loop1Vector::External Font Files0Vector::Generator EncodingVector::Debugging Permitted0PublishFormatProperties::jpeg0&PublishRNWKProperties::speedSingleISDN0&PublishRNWKProperties::singleRateAudio0PublishQTProperties::Width240$PublishPNGProperties::OptimizeColors1PublishHtmlProperties::Units0Vector::Generator Command%PublishRNWKProperties::mediaCopyright 2000#PublishRNWKProperties::flashBitRate1200PublishGifProperties::Smooth1&PublishFormatProperties::flashFileName tut04.swf%PublishFormatProperties::projectorMac0!PublishRNWKProperties::exportSMIL1 PublishRNWKProperties::speed384K0"PublishRNWKProperties::exportAudio1"PublishGifProperties::DitherOptionPublishHtmlProperties::Quality4(PublishHtmlProperties::VerticalAlignment1Vector::Generator Height180$PublishFormatProperties::pngFileName tut04.pngPublishFormatProperties::html1'PublishRNWKProperties::mediaDescription"PublishPNGProperties::FilterOption!PublishHtmlProperties::DeviceFont0Vector::Generator ColorVector::Override Sounds0PublishQTProperties::Flatten1PublishJpegProperties::DPI4718592PublishPNGProperties::BitDepth24-bit with AlphaPublishPNGProperties::Smooth1"PublishGifProperties::DitherSolids0PublishGifProperties::Interlace0"PublishHtmlProperties::DisplayMenu0*PublishHtmlProperties::HorizontalAlignment1Vector::Quality80Vector::Protect0*PublishFormatProperties::generatorFileName tut04.swtPublishFormatProperties::gif0Vector::Template$PublishRNWKProperties::mediaKeywords!PublishRNWKProperties::mediaTitlePublishRNWKProperties::speed28K1PublishGifProperties::Loop1PublishGifProperties::Width240#PublishFormatProperties::qtFileName tut04.mov$PublishRNWKProperties::speedDualISDN0$PublishRNWKProperties::realVideoRate100000PublishJpegProperties::Quality80"PublishPNGProperties::DitherOption#PublishGifProperties::PaletteOption#PublishGifProperties::MatchMovieDim1Vector::Generator LoadOrderVector::Generator Width240PublishFormatProperties::flash1$PublishJpegProperties::MatchMovieDim1#PublishPNGProperties::PaletteOption#PublishPNGProperties::MatchMovieDim1PublishHtmlProperties::Align0-PublishFormatProperties::projectorWinFileName tut04.exe#PublishQTProperties::PlayEveryFrame0"PublishJpegProperties::Progressive0"PublishPNGProperties::DitherSolids0PublishHtmlProperties::Height180PublishHtmlProperties::Width240Vector::Debugging PasswordVector::Omit Trace Actions0%PublishFormatProperties::jpegFileName tut04.jpgPublishJpegProperties::Size0PublishPNGProperties::Interlace0PublishGifProperties::Height180'PublishHtmlProperties::TemplateFileName/C:\PROGRA~1\MACROM~1\FLASH5~1\Html\Default.html!PublishHtmlProperties::WindowMode0Vector::TopDown0-PublishFormatProperties::projectorMacFileName tut04.hqxPublishFormatProperties::rnwk0PublishFormatProperties::png0PublishRNWKProperties::speed56K1PublishQTProperties::Height180%PublishPNGProperties::RemoveGradients0PublishGifProperties::MaxColors255'PublishGifProperties::TransparentOptionPublishGifProperties::LoopCountVector::Report0"PublishFormatProperties::generator"PublishRNWKProperties::audioFormat0$PublishGifProperties::OptimizeColors1Vector::Version5Vector::Event Format0Vector::Stream Compress7PublishFormatProperties::qt0 PublishRNWKProperties::speed512K0PublishJpegProperties::Height180PublishPNGProperties::Height180PublishPNGProperties::Width240%PublishGifProperties::RemoveGradients0PublishHtmlProperties::Scale0Vector::Event Compress7"PublishRNWKProperties::mediaAuthor(PublishRNWKProperties::speedCorporateLAN0&PublishRNWKProperties::showBitrateDlog1"PublishRNWKProperties::exportFlash1PublishQTProperties::Looping0*PublishQTProperties::UseQTSoundCompression0PublishJpegProperties::Width240!PublishPNGProperties::PaletteName!PublishPNGProperties::Transparent0&PublishGifProperties::TransparentAlpha128PublishGifProperties::Animated0Vector::Stream Format0$PublishFormatProperties::gifFileName tut04.gifPropSheet::ActiveTab1621"PublishQTProperties::PausedAtStart0%PublishQTProperties::ControllerOption0PublishPNGProperties::MaxColors255Vector::MatchMovieDim1Vector::Generator FPS12%PublishFormatProperties::rnwkFileName tut04.smil%PublishFormatProperties::projectorWin0%PublishFormatProperties::defaultNames1 CColorDef   3P fP0 PH P` Px 3 33( 3f<0 3CH 3F` 3Hx f0 f30 ff(0 f5H f<` f@x  3330  3 33x f3d0 3]H 3Z` 3Xx 33 3330 3f3PPH 33Px` 33Px 33P f30 f33PH ff3(PH f3<x` f3Cx f3F  fff`  f0 3f0 ffx0 fkH fd` f`x 3f0 33fPH 3ffxPH 3fdx` 3f]x 3fZ ff0 f3fPH fff` ffP0x ffPx ffP    H 3H fH xH ̙n` hx 3H 33x` 3fx` 3xx` 3̙kx 3d fH f3x` ff0x fx0x f̙dx f]    ` 3` f` ` x` px 3` 33x 3fx 3x 3xx 3n f` f3x ffx fx fxx fk    x 3x fx x x xx 3x 33 3f 3 3 3x fx f3 ff f f fx  x  H 3 H fH (H 2` 8x ` 3 ` f` ̙` (` 0x x 3x fx x  x (x  Px  3H 33x` f3x` 3(x` 35x 3< 3` 33x f3 x ̙3x 3(x 32 3x 33 f3 3 3 3(  x  fH 3fx` ff0x f(0x f<x fC f` 3fx ffx ̙fx f(x f5 fx 3f ff f f f(  (x  H 3x` f0x  ̙PP P ` 3x fx ̙P ̙(P < x 3 f  ̙ (  xx  ` 3x fx P xP d ` 3x fx ̙P  P x 3 f   (  x  x 3 f   x x 3 f ̙  x x 3 f          f`zf *](o"PublishQTProperties::QTSndSettingsCQTAudioSettings     f`zf *](o"Pu