on (press)
{
_global.cogrot[1];
_global.cogarray = new Array(5,6);
_global.matflag = new Array(1);
}
on (releaseOutside)
{
var madvar=1000;
var num1;
var num2;
overpeg=0;
//stopDrag();
for (num1=1; num1<=4; num1++)
{ for (num2=1; num2<=5; num2++)
{ if (this._x>((73.5*num1)+105.3))
{ if (this._x<((73.5*num1)+105.3+16))
{ if (this._y>((73.5*num2)+20.2))
{ if (this._y<((73.5*num2)+20.2+16))
{ this._x=(num1*73.5)+105.3+8;
this._y=(num2*73.5)+20.2+8;
trace(1000000);
for (num3=0; num3<=5; num3++)
{ for (num4=0; num4<=6; num4++)
{ trace(_global.cogarray[num3,num4]);
}
}
trace(1000000);
This line is causing the problem....
----------->_global.cogarray[num1,num2]=1;
- on (press)
- {
- _global.cogrot[1];
- _global.cogarray = new Array(5,6);
- _global.matflag = new Array(1);
- }
- on (releaseOutside)
- {
- var madvar=1000;
- var num1;
- var num2;
- overpeg=0;
- //stopDrag();
- for (num1=1; num1<=4; num1++)
- { for (num2=1; num2<=5; num2++)
- { if (this._x>((73.5*num1)+105.3))
- { if (this._x<((73.5*num1)+105.3+16))
- { if (this._y>((73.5*num2)+20.2))
- { if (this._y<((73.5*num2)+20.2+16))
- { this._x=(num1*73.5)+105.3+8;
- this._y=(num2*73.5)+20.2+8;
- trace(1000000);
- for (num3=0; num3<=5; num3++)
- { for (num4=0; num4<=6; num4++)
- { trace(_global.cogarray[num3,num4]);
- }
- }
- trace(1000000);
- This line is causing the problem....
- ----------->_global.cogarray[num1,num2]=1;
Da una salida en el sistema que se parece a.....
/ / 0 0 0 0 0 0............................. 0 0 0 0 0 0
/ / 1 1 1 1 1 1............................. 0 0 0 0 0 0
/ / 0 0 0 0 0 0............o.............. 0 0 0 0 0 0
/ / 0 0 0 0 0 0............................. 0 0 0 0 0 0
/ / 0 0 0 0 0 0............................. 1 1 1 1 1 1
/ / 0 0 0 0 0 0............................. 0 0 0 0 0 0
/ / 0 0 0 0 0 0............................. 0 0 0 0 0 0
/ / dependiendo del lugar donde el objeto ha sido eliminado...
/ / Como puede ver, en lugar de establecer una única célula de la matriz que establece una línea completa ..
/ / Que realmente no tienen ni idea de lo que podría ser el problema con este único
/ / línea de código, pero este es definitivamente donde está el problema!
trace(1000000);
for (num3=0; num3<=5; num3++)
{ for (num4=0; num4<=6; num4++)
{ trace(_global.cogarray[num3,num4]);
}
}
trace(1000000);
_global.num1glob=num1;
_global.num2glob=num2;
overpeg=1;
oddeven=(num1+num2)%2
checkmatrix(num1,num2);
if (_global.matflag[1]>0){
if (oddeven<1)
{
_global.cogrot[1]=-5;
}
if (oddeven>0)
{
_global.cogrot[1]=5;
}}
_global.matflag[1]=0;
}
}
}
}
}
}
if (overpeg<1)
{
this._x=initx;
this._y=inity;
}
}
- trace(1000000);
- for (num3=0; num3<=5; num3++)
- { for (num4=0; num4<=6; num4++)
- { trace(_global.cogarray[num3,num4]);
- }
- }
- trace(1000000);
-
- _global.num1glob=num1;
- _global.num2glob=num2;
- overpeg=1;
- oddeven=(num1+num2)%2
-
- checkmatrix(num1,num2);
-
-
-
- if (_global.matflag[1]>0){
- if (oddeven<1)
- {
- _global.cogrot[1]=-5;
- }
- if (oddeven>0)
- {
- _global.cogrot[1]=5;
- }}
- _global.matflag[1]=0;
- }
- }
- }
- }
- }
- }
- if (overpeg<1)
- {
- this._x=initx;
- this._y=inity;
- }
- }