Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Flash]problems :|

Newbie Spellweaver
Joined
Sep 20, 2004
Messages
35
Reaction score
0
Righty, first I have this bit:
Code:
case 6 :
			//exit
			_root.tiles.unloadMovie();
			lev++;
			teeLevel(lev);
			break;

If the player touches the exit, it should delete the current level and build the next level.

Code:
function teeLevel(number) {
	level = new Array();
	switch (number) {
		case 1 :
			_root.xspawn = 0;
			_root.yspawn = 0;
			level[0] = new Array(1, 1, 1, 1, 6);
			level[1] = new Array(1, 1, 1, 1, 6);
			break;

		case 2 :
			_root.xspawn = 0;
			_root.yspawn = 0;

			level[0] = new Array(9, 1, 1, 0);
			level[1] = new Array(0, 0, 1, 0);
			level[2] = new Array(0, 1, 1, 0);
			level[3] = new Array(0, 1, 0, 0);
			level[4] = new Array(0, 6, 0, 0);
			break;

		case 3 :
			_root.xspawn = 0;
			_root.yspawn = 0;

			level[0] = new Array(9, 1, 1, 0);
			level[1] = new Array(0, 0, 1, 0);
			level[2] = new Array(1, 1, 1, 0);
			level[3] = new Array(1, 0, 0, 0);
			level[4] = new Array(1, 1, 1, 6);
	}
}

The
Code:
_root.tiles.unloadMovie();
works fine, the current level disappears, but on the new level, the tiles are invisible.How can I fix this :(?


SEE WHAT I MEAN HERE:
This is the code that builds the level:
Code:
_root.createEmptyMovieClip("tiles",2);
tiles._x = 240-(80*xspawn);
tiles._y = 220-(80*yspawn);
for (y=0; y<=12; y++) {
	for (x=0; x<=12; x++) {
		if (level[y][x]>0) {
			depth = y*12+x;
			ehita = tiles.attachMovie("tile", "tile_"+depth, tiles.getNextHighestDepth(), {_x:x*80, _y:y*80});
			ehita.gotoAndStop(level[y][x]);
		}
	}
}
 
hello
Loyal Member
Joined
Jun 24, 2004
Messages
726
Reaction score
158
im not an AS expert, but does the function createEmptyMovieClip() makes the created movieclip automatically loaded on scene ?
 
Newbie Spellweaver
Joined
Sep 20, 2004
Messages
35
Reaction score
0
Huh?I'm kind a confused of what you are asking.
 
hello
Loyal Member
Joined
Jun 24, 2004
Messages
726
Reaction score
158
well the only thing that concers me that you are actually attachingMovie to itself
Code:
tiles.attachMovie("tile", "tile_"+depth, tiles.getNextHighestDepth(), {_x:x*80, _y:y*80})
 
Newbie Spellweaver
Joined
Sep 20, 2004
Messages
35
Reaction score
0
How am I attaching it to itself?One movieclip is "tiles" the other one is "tile"
=P
 
Back
Top