 
			
				24/12/2010, 18:04
			
			
			     |  
      |    |    |    Fecha de Ingreso: marzo-2010  
						Mensajes: 78
					  Antigüedad: 15 años, 8 meses Puntos: 0     |        |  
  |      Como hacer un minijuego Flash Facil y Rapido [VIDEO]        Con el video lograras hacer un mini juego en flash! saludos, espero que logren cosas grandes xD  
en el video salen algunos codigos:    Cita:  onClipEvent (load) { 
	power = 2; 
	radius = 6; 
} 
onClipEvent (enterFrame) { 
	/*...*/ 
	} 
}      Cita:  
					Iniciado por onClipEvent  /* mover personaje */ 
	if (Key.isDown(Key.LEFT)) { 
		_x -= power; 
	} 
	if (Key.isDown(Key.RIGHT)) { 
		_x += power; 
	} 
	if (Key.isDown(Key.UP)) { 
		_y -= power; 
	} 
	if (Key.isDown(Key.DOWN)) { 
		_y += power; 
	}   
/* wall anti choques */ 
	while (_root.mc_wall.hitTest(_x, _y+radius, true)) { 
		_y--; 
	} 
	while (_root.mc_wall.hitTest(_x, _y-radius, true)) { 
		_y++; 
	} 
	while (_root.mc_wall.hitTest(_x-radius, _y, true)) { 
		_x++; 
	} 
	while (_root.mc_wall.hitTest(_x+radius, _y, true)) { 
		_x--; 
	}   
/* cop (villano) */ 
	if ((_root.mc_cop.mc_visor.hitTest(_x, _y+radius, true)) or (_root.mc_cop.mc_visor.hitTest(_x, _y-radius, true)) or (_root.mc_cop.mc_visor.hitTest(_x+radius, _y, true)) or (_root.mc_cop.mc_visor.hitTest(_x-radius, _y, true))) { 
		_x = 75; 
		_y = 75; 
	} 
	if ((_root.mc_cop.mc_head.hitTest(_x, _y+radius, true)) or (_root.mc_cop.mc_head.hitTest(_x, _y-radius, true)) or (_root.mc_cop.mc_head.hitTest(_x+radius, _y, true)) or (_root.mc_cop.mc_head.hitTest(_x-radius, _y, true))) { 
		_root.mc_cop.gotoAndStop(2); 
	}   
/* teletransportador */ 
	if ((_root.mc_test.hitTest(_x, _y+radius, true)) or (_root.mc_test.hitTest(_x, _y-radius, true)) or (_root.mc_test.hitTest(_x+radius, _y, true)) or (_root.test.hitTest(_x-radius, _y, true))) { 
		_x = 332; 
		_y = 74; 
	}   
/* cambio de nivel */ 
	if ((_root.mc_nivel.hitTest(_x, _y+radius, true)) or (_root.mc_nivel.hitTest(_x, _y-radius, true)) or (_root.mc_nivel.hitTest(_x+radius, _y, true)) or (_root.mc_nivel.hitTest(_x-radius, _y, true))) { 
		_root.mc_cop.gotoAndStop(5); 
	} 
}     video verlo en  http://www.videobb.com/video/k0wYkojrgXRb            |