FWDʲMdB>&Actions for tile1: Frame 1 of Layer Name ASstop(); Actions for [No instance name assigned] (mark)onClipEvent(enterFrame){ this.gotoAndStop(_root.yellowtileframe); }W v ~)Actions for Scene 1: Frame 1 of Layer Name Layer 1tiles = {}; sw = 550; sh = 600; yellowtileframe = 1; // change this to make all yellow tiles goto a different frame#HActions for orig4 (tile4)onClipEvent(load){ bad = "orig4"; names = "tile4"; } onClipEvent(mouseDown){ if(this.hitTest(_root._xmouse,_root._ymouse,true) && !_root.final){ if(_name == bad){ _root.n++; this.duplicateMovieClip(names+"_"+_root.n,_root.n); _parent[names+"_"+_root.n].dragging = true; } else{ delete _root.tiles[_name]; this.removeMovieClip(); } } } onClipEvent(mouseUp){ if(dragging && !_root.final){ if(_root.grid.hitTest(_x,_y,true)){ dragging = false; _x = Math.round((_x-10)/20)*20+10; _y = Math.round((_y-10)/20)*20+10; _root.tiles[_name] = {x:_x,y:_y,t:names}; } else{ this.removeMovieClip(); } } } onClipEvent(enterFrame){ if(dragging && !_root.final){ _x = _root._xmouse; _y = _root._ymouse; } if (_root.final == true) { _visible = false; } }gActions for but (Build)onClipEvent (enterFrame) { if (_root.final == true) { _visible = false; } } onClipEvent (mouseDown) { if (this.hitTest(_root._xmouse, _root._ymouse, true) && !_root.final) { _root.built = true; p = old_p; for (i in _root) { if (i.substring(0, 4) == "draw") { _root[i].removeMovieClip(); } } miny = 9999999999; minx = 9999999999; maxx = 0; maxy = 0; for (i in _root.tiles) { if (_root.tiles[i].xmaxy) { maxy = _root.tiles[i].y; } if (_root.tiles[i].x>maxx) { maxx = _root.tiles[i].x; } } dw = maxx-minx+20; dh = maxy-miny+20; if (dw*5>_root.sw-_root.mark._x) { dh *= ((_root.sw-_root.mark._x)/5)/dw; dw = (_root.sw-_root.mark._x)/5; } for (x=0; x<5; x++) { for (y=0; y<1; y++) { _root.n++; _root.createEmptyMovieClip("draw"+_root.n, _root.n); s = 0; for (i in _root.tiles) { s++; _root["draw"+_root.n].attachMovie(_root.tiles[i].t, _root.tiles[i].t+"_"+s, s); _root["draw"+_root.n][_root.tiles[i].t+"_"+s]._x = _root.tiles[i].x-minx; _root["draw"+_root.n][_root.tiles[i].t+"_"+s]._y = _root.tiles[i].y-miny; } _root["draw"+_root.n]._x = x*dw+(_root.sw/2-(dw*5)/2); _root["draw"+_root.n]._y = y*dh+_root.mark._y; _root["draw"+_root.n]._width = dw; _root["draw"+_root.n]._height = dh; } } old_p = n; } } rActions for grid (grid)onClipEvent (enterFrame) { if (_root.final == true) { _visible = false; } } IActions for [No instance name assigned] (Finalize) onClipEvent (mouseDown) { if (this.hitTest(_root._xmouse, _root._ymouse, true) && _root.built) { _root.final = true; _visible = false; for (i in _root) { if (i.substring(0, 4) == "draw") { _root[i]._y = _root.sh/2-(_root.but.dh/2); } } _root.n++; _root.createEmptyMovieClip("draw"+_root.n, _root.n); s = 0; for (i in _root.tiles) { s++; _root["draw"+_root.n].attachMovie(_root.tiles[i].t, _root.tiles[i].t+"_"+s, s); _root["draw"+_root.n][_root.tiles[i].t+"_"+s]._x = _root.tiles[i].x-_root.but.minx; _root["draw"+_root.n][_root.tiles[i].t+"_"+s]._y = _root.tiles[i].y-_root.but.miny; } _root["draw"+_root.n]._x = _root.sw-_root.but.dw*1.2-20; _root["draw"+_root.n]._y = _root.sh-_root.but.dh*1.2-20; _root["draw"+_root.n]._width = _root.but.dw; _root["draw"+_root.n]._height = _root.but.dh; _root["draw"+_root.n].lineStyle(3,0x000000); _root["draw"+_root.n].moveTo(-12,-12); _root["draw"+_root.n].lineTo(_root.but.dw-8,-12); _root["draw"+_root.n].lineTo(_root.but.dw-8,_root.but.dh-8); _root["draw"+_root.n].lineTo(-12,_root.but.dh-8); _root["draw"+_root.n].lineTo(-12,-12); _root["draw"+_root.n]._width *= 1.4; _root["draw"+_root.n]._height *= 1.4; } } onClipEvent (enterFrame) { if (!_root.built && !_root.final) { _visible = false; } if (_root.built && !_root.final) { _visible = true; } } ZActions for orig1 (tile1)onClipEvent(load){ bad = "orig1"; names = "tile1"; } onClipEvent(mouseDown){ if(this.hitTest(_root._xmouse,_root._ymouse,true) && !_root.final){ if(_name == bad){ _root.n++; this.duplicateMovieClip(names+"_"+_root.n,_root.n); _parent[names+"_"+_root.n].dragging = true; } else{ delete _root.tiles[_name]; this.removeMovieClip(); } } } onClipEvent(mouseUp){ if(dragging && !_root.final){ if(_root.grid.hitTest(_x,_y,true)){ dragging = false; _x = Math.round((_x-10)/20)*20+10; _y = Math.round((_y-10)/20)*20+10; _root.tiles[_name] = {x:_x,y:_y,t:names}; } else{ this.removeMovieClip(); } } } onClipEvent(enterFrame){ if(dragging && !_root.final){ _x = _root._xmouse; _y = _root._ymouse; } if (_root.final == true) { _visible = false; } }.Actions for orig2 (tile2)onClipEvent(load){ bad = "orig2"; names = "tile2"; } onClipEvent(mouseDown){ if(this.hitTest(_root._xmouse,_root._ymouse,true) && !_root.final){ if(_name == bad){ _root.n++; this.duplicateMovieClip(names+"_"+_root.n,_root.n); _parent[names+"_"+_root.n].dragging = true; } else{ delete _root.tiles[_name]; this.removeMovieClip(); } } } onClipEvent(mouseUp){ if(dragging && !_root.final){ if(_root.grid.hitTest(_x,_y,true)){ dragging = false; _x = Math.round((_x-10)/20)*20+10; _y = Math.round((_y-10)/20)*20+10; _root.tiles[_name] = {x:_x,y:_y,t:names}; } else{ this.removeMovieClip(); } } } onClipEvent(enterFrame){ if(dragging && !_root.final){ _x = _root._xmouse; _y = _root._ymouse; } if (_root.final == true) { _visible = false; } }<Actions for orig3 (tile3)onClipEvent(load){ bad = "orig3"; names = "tile3"; } onClipEvent(mouseDown){ if(this.hitTest(_root._xmouse,_root._ymouse,true) && !_root.final){ if(_name == bad){ _root.n++; this.duplicateMovieClip(names+"_"+_root.n,_root.n); _parent[names+"_"+_root.n].dragging = true; } else{ delete _root.tiles[_name]; this.removeMovieClip(); } } } onClipEvent(mouseUp){ if(dragging && !_root.final){ if(_root.grid.hitTest(_x,_y,true)){ dragging = false; _x = Math.round((_x-10)/20)*20+10; _y = Math.round((_y-10)/20)*20+10; _root.tiles[_name] = {x:_x,y:_y,t:names}; } else{ this.removeMovieClip(); } } } onClipEvent(enterFrame){ if(dragging && !_root.final){ _x = _root._xmouse; _y = _root._ymouse; } if (_root.final == true) { _visible = false; } } 9Actions for [No instance name assigned] (change)on(release){ _root.yellowtileframe = 2; })8)P)`)p#H#H#H#H#Hj#H#H #H #H $#HT#Hp#H#H#H #HR#H]#H#H #Hk#H"#H##H$#H%#H'#H()gw g g g g g g g g g A gf gx g g g g g gg?g^gggg!g" g#%g$Zg%g'g(g)g*+g+^g,pg-g.g/g0vg2g3<g4{g5g8rRrZr|III II/IOI I I II*IPI]II<III[IIII1I|II% I] I I# I$!I%