Hi,
a friend wrote me an API located here:
http://www.wshosting.com.au/~wscms/...cations_API.php
basically, you enter in a MarinaID value and it will display three bits of information. an X and Y coordinate var, and a rotation variable.
e.g. (http://www.wshosting.com.au/~wscms/....php?MarinaID=1)
going to this page means that "xCoord=100&yCoord=100&rotation=0" is printed to the page.
now, i've heard you can do this using LoadVars and .sendAndLoad, however i just cant get it to work for some reason.
basically i have some objects on the stage that i want an admin to move around, and then click save which stores the "marina" locations into the mysql database. Then users can just view another flash file which displays all the marina locations.
I was wondering if anyone could give me some help on this, or point me into the direction of a tute for something similar.
The code i am using is here:
The trace always returns undefined.Code:api_url = "http://www.wshosting.com.au/~wscms/preview/EBC/marina_locations_API.php" var marinaOut:LoadVars = new LoadVars(); var marinaIn:LoadVars = new LoadVars(); function mar1():Void{ marinaOut.MarinaID = "1"; marinaOut.sendAndLoad(api_url, marinaIn, "POST"); } marinaIn.onLoad = function(){ arrMarinaX[i] = this.xCoords; arrMarinaY[i] = this.yCoords; arrMarinaRotation[i] = this.rotation; msg.text = "Rotation = "+this.rotation; trace(this.rotation) } btnb.addEventListener("click", mar1());
I would be really grateful if anyone can see what im doing wrong.
Cheers
dkeegh






Bookmarks