I don't knowif it will help but here is some code that I used for a java portfolio I had to do as part of my studies last year.

It has a three deep array structure that worked without problems.  If you have any questions, I can try get the site up somewhere so that you can see it in action.

[EMAIL PROTECTED] wrote:

Hi EveryBody

I have also try the following script for DynAPI 2.53

but it gave the same result.

"DynAPI reported an Error

Message; luff[...] is not an Object"

I also attach the script and gif image files.

Verry Thankfull for tip or advice.

Sincerely

Urban Avierfjärd

ICQ#69907743

Homepage http://w1.201.telia.com/~u20100003

<HTML>

<HEAD>

<META NAME="KEYWORDS" CONTENT="MY FILE">

<META NAME="DESCRIPTION" CONTENT="MY FILE">

<META NAME="JAVASCRIPT GENERATOR" CONTENT="jsEditor">

<title>DynAPI Distribution: Create Example</title>

<script language="Javascript" src="../src/dynapi.js"></script>

<script language="Javascript">

DynAPI.setLibraryPath('../src/lib/');

DynAPI.include('dynapi.api.*');

DynAPI.include('dynapi.event.*');

DynAPI.include('dynapi.gui.dynimage.js');

</script>

<script language="Javascript">

var luff = new Array(25);

     for (i=0;i<25; i++){

     luff[i]= new Array(25);

}

var luffParent = new Array();

var luffChild01 = new Array();

var luffChild02 = new Array();

var luffChild03 = new Array();

var luffChild04 = new Array();

var luffChild05 = new Array();

var luffChild06 = new Array();

var luffChild07 = new Array();

var luffChild08 = new Array();

var luffChild09 = new Array();

var luffChild10 = new Array();

var luffChild11 = new Array();

var luffChild12 = new Array();

var luffChild13 = new Array();

var luffChild14 = new Array();

var luffChild15 = new Array();

var luffChild16 = new Array();

var luffChild17 = new Array();

var luffChild18 = new Array();

var luffChild19 = new Array();

var luffChild20 = new Array();

var luffChild21 = new Array();

var luffChild22 = new Array();

var luffChild23 = new Array();

var luffChild24 = new Array();

var luffChild25 = new Array();

luffParent[luffParent.length] = luffChild01;

luffParent[luffParent.length] = luffChild02;

luffParent[luffParent.length] = luffChild03;

luffParent[luffParent.length] = luffChild04;

luffParent[luffParent.length] = luffChild05;

luffParent[luffParent.length] = luffChild06;

luffParent[luffParent.length] = luffChild07;

luffParent[luffParent.length] = luffChild08;

luffParent[luffParent.length] = luffChild09;

luffParent[luffParent.length] = luffChild10;

luffParent[luffParent.length] = luffChild11;

luffParent[luffParent.length] = luffChild12;

luffParent[luffParent.length] = luffChild13;

luffParent[luffParent.length] = luffChild14;

luffParent[luffParent.length] = luffChild15;

luffParent[luffParent.length] = luffChild16;

luffParent[luffParent.length] = luffChild17;

luffParent[luffParent.length] = luffChild18;

luffParent[luffParent.length] = luffChild19;

luffParent[luffParent.length] = luffChild20;

luffParent[luffParent.length] = luffChild21;

luffParent[luffParent.length] = luffChild22;

luffParent[luffParent.length] = luffChild23;

luffParent[luffParent.length] = luffChild24;

luffParent[luffParent.length] = luffChild25;

alert(luffParent.length);

function Calculate(){

      c=a+40

      d=b+40

}

function getAB(e){

        A=e.getX()

        B=e.getY()

}

function myarray(){

                var H=0;

                for (i=0;i<=480; i=i+20){

                        H=H+1

                        for (j=0;j<=20;j++){

                        if (i+j==A){

                        a=i

}

}

}

var V=0;

for (k=0;k<=480;k=k+20){

V=V+1

for (l=0;l<=20;l++){

   if (k+l==B){

   b=k

}

}

}

if (luff[H][V]==91){

a=0;

b=0;

}



else {

 luff[H][V]=87;

}

}

 function layout() {

        myLayer = new DynLayer()

        myLayer.setSize(500,500)

        myLayer.setBgColor('purple')

        myLayer.moveTo(5,50)

                myListener = new EventListener(DynAPI.document)

                myListener. {

                        myLayer.setBgColor('pink')

                }

                myListener. {

                        myLayer.setBgColor('deeppink')

                }

                myListener. {

                        getAB(e);

                        myarray();

                        myChild2 = new DynLayer(null,a,b,20,20,'violet')

                        myChild2.setHTML('<img src="Animation2.gif">')

                        myLayer.addChild(myChild2)

                        Calculate();

                        myChild2 = new DynLayer(null,c,d,20,20,'violet')

                        myChild2.setHTML('<img src="Animation1.gif">')

                        myLayer.addChild(myChild2)

                }

         myLayer.addEventListener(myListener)

             for (i=19;i<480; i=i+20){

             myChild = new DynLayer(null,i,0,2,500,'black');

             myLayer.addChild(myChild);

}

            for (i=19;i<480; i=i+20){

            myChild = new DynLayer(null,0,i,500,2,'black')

            myLayer.addChild(myChild)

}

DynAPI.document.addChild(myLayer)

}

DynAPI. {

layout();

}

function newgame() {

 layout();

}

</script>

</head>

<BODY>

<BODY BGCOLOR="lime">

<H1>Five in a Row</H1>

<PRE>





























































</PRE>

<FORM><INPUT TYPE="button" VALUE="New Game" ></FORM>

</BODY>

</HTML>

 







Five in a Row






























--
Michael Pemberton
[EMAIL PROTECTED]
ICQ: 12107010
 

samplecode.zip

Reply via email to