[COLOR=#000000][FONT=verdana]I have a swf that works pretty good by itself, but when this swf is loaded for another one the collision doesn’t work…[/FONT][/COLOR]
[COLOR=#000000][FONT=verdana]It’s a game, the person need to shoot on the bottles, mira is the “aim” , when the person press spacebar the stone goes in direction where mira is…[/FONT][/COLOR]
[COLOR=#000000][FONT=verdana]the code is:[/FONT][/COLOR]
[COLOR=#000000][FONT=verdana]ActionScript Code:
[COLOR=#993300]if[/COLOR] ([COLOR=#993300]Key[/COLOR].[COLOR=#993300]isDown/COLOR && !chegou) { [COLOR=#993300]for[/COLOR] (i=0; i<4; i++) { [COLOR=#F000F0]//colisão com paredes do labirinto:[/COLOR] lcX = (mira._x-mira.[COLOR=#993300]width[/COLOR])+(mira.[COLOR=#993300]width[/COLOR]*2); lcY = (mira._y-mira.[COLOR=#993300]height[/COLOR])+(mira.[COLOR=#993300]height[/COLOR]*2); [COLOR=#993300]if[/COLOR] ([COLOR=#993300]_root[/COLOR][[COLOR=#0000FF]“pinga”[/COLOR]+i].[COLOR=#993300]hitTest[/COLOR](lcX, lcY, [COLOR=#993300]true[/COLOR]) && !chegou) { estourar = [COLOR=#0000FF]“nada”[/COLOR]; [COLOR=#993300]if[/COLOR] (i == escolhidoN) { estourar = [COLOR=#993300]_root[/COLOR][[COLOR=#0000FF]“pinga”[/COLOR]+i]; verificarFunct(i); } [COLOR=#993300]else[/COLOR] { [COLOR=#993300]trace/COLOR; estourar = [COLOR=#0000FF]""[/COLOR]; _level10.score -= 1; [COLOR=#993300]_root[/COLOR].scoreLocal -= 1; } chegou = [COLOR=#993300]true[/COLOR]; } } [COLOR=#993300]_root[/COLOR].donodobar.[COLOR=#993300]gotoAndPlay/COLOR; arma.mao.mao2.[COLOR=#993300]gotoAndPlay/COLOR; atirar = [COLOR=#993300]true[/COLOR]; }
[/FONT][/COLOR]