bienvenido

   
  cronick
  pacman
 
CODIGO PACMAN
 
//movimiento a la derecha
on (keyPress "<Right>") {
this.gotoAndPlay(1)
_x = _x+10;
if (_x > 590){
_x = -80;
}
if (_root._this, hitTest(_root.muro1)) {
this._x = this._x-10;
}
if (_root._this, hitTest(_root.muro2)) {
this._x = this._x-10;
}
if (_root._this, hitTest(_root.muro3)) {
this._x = this._x-10;
}
if (_root._this, hitTest(_root.muro4)) {
this._x = this._x-10;
}
if (_root._this, hitTest(_root.muro5)) {
this._x = this._x-10;
}
if (_root._this, hitTest(_root.muro6)) {
this._x = this._x-10;
}
if (_root._this, hitTest(_root.muro7)) {
this._x = this._x-10;
}
if (_root._this, hitTest(_root.muro8)) {
this._x = this._x-10;
}
if (_root._this, hitTest(_root.muro9)) {
this._x = this._x-10;
}
if (_root._this, hitTest(_root.muro10)) {
this._x = this._x-10;
}
if (_root._this, hitTest(_root.muro11)) {
this._x = this._x-10;
}
if (_root._this, hitTest(_root.muro12)) {
this._x = this._x-10;
}
if (_root._this, hitTest(_root.muro13)) {
this._x = this._x-10;
}
if (_root._this, hitTest(_root.muro14)) {
this._x = this._x-10;
}
if (_root._this, hitTest(_root.muro15)) {
this._x = this._x-10;
}
if (_root._this, hitTest(_root.muro16)) {
this._x = this._x-10;
}
if (_root._this, hitTest(_root.muro17)) {
this._x = this._x-10;
}
if (_root._this, hitTest(_root.muro18)) {
this._x = this._x-10;
}
if (_root._this, hitTest(_root.muro19)) {
this._x = this._x-10;
}
}
//fin movimiento a la derecha
//inicio movimiento a la izquierda
on (keyPress "<Left>") {
this.gotoAndPlay(6)
_x = _x-10;
if (_x < -50){
_x = 550;
}
if (_root._this, hitTest(_root.muro1)) {
this._x = this._x+10;
}
if (_root._this, hitTest(_root.muro2)) {
this._x = this._x+10;
}
if (_root._this, hitTest(_root.muro3)) {
this._x = this._x+10;
}
if (_root._this, hitTest(_root.muro4)) {
this._x = this._x+10;
}
if (_root._this, hitTest(_root.muro5)) {
this._x = this._x+10;
}
if (_root._this, hitTest(_root.muro6)) {
this._x = this._x+10;
}
if (_root._this, hitTest(_root.muro7)) {
this._x = this._x+10;
}
if (_root._this, hitTest(_root.muro8)) {
this._x = this._x+10;
}
if (_root._this, hitTest(_root.muro9)) {
this._x = this._x+10;
}
if (_root._this, hitTest(_root.muro10)) {
this._x = this._x+10;
}
if (_root._this, hitTest(_root.muro11)) {
this._x = this._x+10;
}
if (_root._this, hitTest(_root.muro12)) {
this._x = this._x+10;
}
if (_root._this, hitTest(_root.muro13)) {
this._x = this._x+10;
}
if (_root._this, hitTest(_root.muro14)) {
this._x = this._x+10;
}
if (_root._this, hitTest(_root.muro15)) {
this._x = this._x+10;
}
if (_root._this, hitTest(_root.muro16)) {
this._x = this._x+10;
}
if (_root._this, hitTest(_root.muro17)) {
this._x = this._x+10;
}
if (_root._this, hitTest(_root.muro18)) {
this._x = this._x+10;
}
if (_root._this, hitTest(_root.muro19)) {
this._x = this._x+10;
}
}
//fin movimiento a la izquierda
//inicio movimiento hacia arriba
on (keyPress "<Up>") {
_y = _y-10;
if (_y < 0) {
_y = 550;
}
if (_root._this, hitTest (_root.muro1)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro2)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro3)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro4)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro5)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro6)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro7)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro8)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro9)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro10)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro11)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro12)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro13)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro14)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro15)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro16)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro17)){
this._y = this._y+10;
}
                if (_root._this, hitTest (_root.muro18)){
this._y = this._y+10;
}
                if (_root._this, hitTest (_root.muro19)){
this._y = this._y+10;
}
 
}
//fin movimiento hacia arriba
//inicio movimiento hacia abajo
on (keyPress "<Down>") {
_y = _y+10;
if (_y>790) {
_y = 10;
}
if (_root._this, hitTest (_root.muro1)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro2)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro3)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro4)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro5)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro6)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro7)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro8)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro9)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro10)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro11)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro12)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro13)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro14)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro15)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro16)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro17)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro18)){
this._y = this._y+10;
}
if (_root._this, hitTest (_root.muro19)){
this._y = this._y+10;
}
 
}
//fin movimiento hacia abajo
 
--------------------------------------------------------------------------------------------------------------------------------------------------
 
CODIGO MONEDAS
 
 
onClipEvent(load) {
a = 0;
}
onClipEvent (enterFrame) {
if (_root._this, hitTest(_root.pacman)){
this._visible = false;
if(a==0) {
a =1
_root.win += 1;
}
}
}
 
_____________________________________________________________________________________________
CODIGO PARA FANTASMAS
 
 
onClipEvent (enterFrame) {
if (_root._this, hitTest(_root.pacman)) {
_root.pacman._x = 261.1;
_root.pacman._y = 297.2;
_root.cont + 1;
}
if (_root.cont == 1) {
_root.vida3._visible = false;
}
if (_root.cont == 2) {
_root.vida2._visible = false;
}
if (_root.cont1 == 1) {
_root.vida1._visible = false;
}
}
__________________________________---------------------------------------------_______________________________
 
 
CODIGO PARA FANTASMAS
 
 
onClipEvent (enterFrame) {
if (_root._this, hitTest(_root.pacman)) {
_root.pacman._x = 261.1;
_root.pacman._y = 297.2;
_root.cont + 1;
}
if (_root.cont == 1) {
_root.vida3._visible = false;
}
if (_root.cont == 2) {
_root.vida2._visible = false;
}
if (_root.cont1 == 1) {
_root.vida1._visible = false;
}
}

 
   
 
Este sitio web fue creado de forma gratuita con PaginaWebGratis.es. ¿Quieres también tu sitio web propio?
Registrarse gratis