Foros del Web » Creando para Internet » Flash y Actionscript »

Juego Crucigrama

Estas en el tema de Juego Crucigrama en el foro de Flash y Actionscript en Foros del Web. Hola, estoy trabajando en un Crucigrama hecho en flash... http://boxstr.com/files/4141/crucigrama_def2.fla y tengo un problema para agregar mas casilleros... despues del 18 no me deja agregar ...
  #1 (permalink)  
Antiguo 18/07/2007, 08:37
Avatar de nezu  
Fecha de Ingreso: junio-2007
Mensajes: 177
Antigüedad: 16 años, 10 meses
Puntos: 0
Busqueda Juego Crucigrama

Hola, estoy trabajando en un
Crucigrama hecho en flash...

http://boxstr.com/files/4141/crucigrama_def2.fla

y tengo un problema para agregar
mas casilleros... despues del 18 no me deja
agregar mas...

no entiendo que parte de codigo modificar para
solucionarlo!.

si alguien sabe!...gracias!
  #2 (permalink)  
Antiguo 18/07/2007, 08:45
Avatar de nezu  
Fecha de Ingreso: junio-2007
Mensajes: 177
Antigüedad: 16 años, 10 meses
Puntos: 0
Re: Juego Crucigrama

aqui el codigo:

Código:
textnum=new Array(1,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18);
FlagChar=false;
dragCharLocation_y=_root.charDrag._y;
dragCharLocation_x=_root.charDrag._x;
initilized();
counterWin=0;
//Prepare vars for level depth !!!

function initilized(){
 
 blockArray=new Array(0,0,0,0,0,0,13,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,1,2,3,4,5,6,7,8,9,10,11,12,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,17,18,19,20,0,0,0,0,0,0,0,18,0,19,0);
 winArray= new Array();
 
 //creat new array and chek how meny char in the game to get the win number
 for (i=0;i<blockArray.length;i++){
    if(blockArray[i]!=0){
      winArray.push( blockArray[i] );
    }
 }
 col =13;
 row=7;
 cellNum=col*row;
 xBase=5;
 yBase=50;
 xspace=empty._width*1.07;
 yspace=empty._height*1.07;
 c=1;
 for(i=0;i<=cellNum-1;i++){
  if(blockArray[i]!=0){
   newE=i;
   duplicateMovieClip ( "empty", newE, i );
   set (newE add ":numtxt", blockArray[i]);
  } else {
   newE="black"+i;
   duplicateMovieClip ( "black", newE, i );
  }
   setProperty ( newE, _x, xBase+(c*Number (getProperty ( newE,_width )))+1.5 );
   setProperty ( newE, _y, yBase+(c*newE._height)+1.5 );
   c+=1;
   if(c>col){
     yBase+=34;
     c=1;
   }
 } 
 PlaceChar();


}

function PlaceChar () {
  charArry=new Array("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z");
  n=0;
  c_char=1;
  y_char=340;
  while (n<charArry.length) {
    newchar=charArry[n];
    duplicateMovieClip ( "demochar", newchar, n+60 );
    set (newchar add ":char", charArry[n]);
    setProperty ( newchar, _x, 50+(c_char*Number (getProperty ( newchar,_width )))+1.5 );
    setProperty ( newchar, _y, y_char+(c_char*newchar._height)+1.5 );
    n+=1; 
    c_char+=1;
    if(c_char>(charArry.length/2)){
       y_char+=34;
       c_char=1;
     }
  }

}

function charChek(location,char,item,x,y){
  charPl = new Array("", "", "", "", "", "", "l", "", "", "", "", "", "", "", "", "", "", "", "", "e", "", "", "", "", "", "", "s", "a", "t", "i", "s", "f", "a", "c", "c", "i", "o", "n","");
  if(charPl[location].toUpperCase()==String (char)){
     
      set (item add ":ch", char);
     
      _root.counterWin+=1;
     //check if the game is over
        if( _root.counterWin>=winArray.length){
           _root.gotoAndPlay (3);

         }
     }
      stopDrag ();
      _root.charDrag._y=dragCharLocation_y;
      _root.charDrag._x=dragCharLocation_x;
       FlagChar=false;
  
     
   
}
  #3 (permalink)  
Antiguo 18/07/2007, 15:15
Avatar de nezu  
Fecha de Ingreso: junio-2007
Mensajes: 177
Antigüedad: 16 años, 10 meses
Puntos: 0
Re: Juego Crucigrama

a nadie se le ocurre que puede ser?
que parte del codigo es la que me permita modificar eso?

por favor, seria una gran ayuda!

ya no se donde mas buscar!.


saludos!!!!suerte!.
  #4 (permalink)  
Antiguo 18/07/2007, 18:09
Avatar de seyacat  
Fecha de Ingreso: agosto-2006
Mensajes: 382
Antigüedad: 17 años, 8 meses
Puntos: 0
Re: Juego Crucigrama

Que feo script y no se que tal este tu nivel de AS parahacer uno nuevo.

Cuando yo hice un crucigrama encontre un generador en PHP y solamente renderizaba en al flash, pero si tu ya tienes diseniado el crucigrama y no hace falta generarlo el script se reduce muy facil a un un par de for en un arreglo
  #5 (permalink)  
Antiguo 19/07/2007, 14:32
Avatar de nezu  
Fecha de Ingreso: junio-2007
Mensajes: 177
Antigüedad: 16 años, 10 meses
Puntos: 0
Re: Juego Crucigrama

si es horrendo.
por suerte pude conseguir otro.

http://boxstr.com/files/4141/crossword1.fla

quizas a alguien mas le sirva.
gracias de todos modos.

;)
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 21:46.