Comunidad de diseño web y desarrollo en internet online

decifrar codigo de crucigrama ayuda

Citar            
MensajeEscrito el 24 May 2007 09:55 am
Hola...encontre este crucigrama http://actionscript.org/showMovie.php?id=782 e intento hacer uno parecido solo que con 13 casillas mas y en su totalidad 75 letras. lo que no encuentro es el clip de el tablero para escoger la letra respectiva a la pregunta. quedandome el crucigrama todo desfazado y encima del tablero.

este es mi codigo

textnum=new Array(1,2,4,9,15,22,28,37,45,68);
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(1,0,0,0,2,3,4,5,6,7,8,0,9,10,0,0,0,0,0,11,0,0,0,0,0,12,13,0,0,0,0,0,14,0,0,0,15,0,16,17,0,0,0,0,0,18,0,0,0,19,0,20,21,0,0,0,0,22,23,24,0,0,25,0,26,27,0,28,0,0,0,29,0,0,0,30,0,31,32,0,33,0,0,0,34,0,0,0,35,0,36,37,38,39,40,41,42,43,44,45,0,46,0,47,48,0,49,0,0,0,50,0,51,0,52,0,53,54,0,55,0,0,0,56,0,0,0,57,0,58,59,0,60,0,0,0,61,0,0,0,62,0,63,64,0,65,0,0,0,0,0,0,0,0,0,66,67,0,0,0,68,69,70,71,72,73,74,75,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=13;
cellNum=col*row;
xBase=50;
yBase=50;
xspace=empty._width*1.5;
yspace=empty._height*1.5;
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+=33;
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=270;
while (n<charArry.length) {
newchar=charArry[n];
duplicateMovieClip ( "demochar", newchar, n+80 );
set (newchar add ":char", charArry[n]);
setProperty ( newchar, _x, 70+(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+=33;
c_char=1;
}
}

}

function charChek(location,char,item,x,y){
charPl=new Array("h","","","","b","i","g","b","a","n","g","","e","e","","","","","","e","","","","","","s","l","","","","","","o","","","","l","","t","i","","","","","","c","","","","a","","","a","o","","","","","t","e","o","","","s","","c","c","b","","","","n","","","","m","","i","e","","i","","","","t","","","","a","","o","n","e","b","u","l","a","r","e","s","","r","","n","t","","l","","","","i","","i","","e","","a","r","","i","","","","c","a","","","","s","","i","a","","","","u","n","i","v","e","r","s","o");
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;



}

si me pueden ayudar ha ver cual es mi error se lo agradeceria muchisimo. ^^ :wink:

Por fexa

10 de clabLevel



 

msie
Citar            
MensajeEscrito el 24 May 2007 05:59 pm
Usá las etiquetas [ code ] y [ /code ] (sin espacios) para postear tu código.

Por HernanRivas

Claber

3416 de clabLevel

26 tutoriales

 

Argentina

firefox
Citar            
MensajeEscrito el 18 Jul 2007 03:11 pm
Yo estaba buscando un crucigrama y encontré el mismo.
Pero el problema que tengo yo es que no puedo agregar
mas casilleros que 18...
y no encuentro la parte del codigo para modificar esto.

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;
  
     
   
}


aqui, mi fla. por ahi a la persona que abrio el post, le puede
servir algo de lo que hice.

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

si alguien puede ayudarme, muchas gracias!

saludos y suerte.

Por nezu

10 de clabLevel



 

Argentina

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.