-- variables for sending coordinates to JSP page global gXcoord, gYcoord global gURL global gNetID global gClickCount global gCount -- channel number global gNum, gNum2 property xCoord, yCoord -- variable for puppet sprite on startmovie -- defining movedown scripts the mousedownscript = "saveCoord" the mouseupscript = "sendCoord" -- defining what channel to start from gNum = 13 --defining what gClickCount starts gClickCount = 0 gCount = 1 end ---------------- -- making a new puppet on mousedown on mousedown -----------------------puppet sprite for green blocks------------ -- opens channel for puppet puppetSprite gNum, TRUE --cycling through colored dots color = ["green", "gold dot", "gray square", "orange dot", "light gray" ] -- assigning member 1 to channel (gNum) sprite(gNum).member = member(color[gCount]) gCount = gCount + 1 --make colors in list start over if gCount = 6 then gCount = 1 -- calling member 1 and assigning script live to gNum sprite(gNum).scriptInstanceList.add(script("live").new(gNum)) sendsprite(gNum, #newIt, gNum) -- increment gNum so the next times it is trigger it goes into the next channel gNum = gNum + 2 ----------------------------------------------------------------- end ---------------- --on mousedown it saves the mouse location on saveCoord if gClickCount < 3 then gXcoord = the mouseH gYcoord = the mouseV put gXcoord put gYcoord end if end ----------------- on circlemember end ----------------- -- on mouseup it takes the mouse location and sends to jsp on sendCoord -- We also only want to send the first 3 coordinates. if gClickCount < 3 then gNetID = postNetText("http://walmart.ath.cx:8080/a19chen/RecordCoordinates.jsp", [#xCoord: gXcoord, #yCoord: gYcoord]) gClickCount = gClickCount + 1 if netDone(gNetID) then text = netTextResult(gNetID) put text end if end if end