Flash Advisor logo
:: Desktop Shortcut
:: Flash Help
Advice from Experts

Closed Thread
Results 1 to 2 of 2
  1. #1

    Default LoadVars Problems

    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:

    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());
    The trace always returns undefined.

    I would be really grateful if anyone can see what im doing wrong.

    Cheers

    dkeegh

  2. # ADS
    Join Date
    Always
    Posts
    Many
     
  3. #2
    Join Date
    May 2004
    Location
    U.S.A.
    Posts
    2,890

    Default

    Hi,

    Intersting idea. I developed a marina builder application that was incomplete but along the lines of what your describing. I recently lost most of my files to a lightning strike, but I remember how I did it. If I get some time over the coming weekend, I'll see what it would take to put it back together. It was not complete but might be useful for what your trying to achieve.

    Regards
    NTD
    A mind once stretched by a new idea never regains its original dimensions.
    - Oliver Wendell Holmes

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. FLV Possitioning Problems
    By liquidsword in forum Advanced Flash
    Replies: 8
    Last Post: 01-25-2006, 12:35 PM
  2. Preloader Problems. Help!!!
    By cknick in forum Flash Scripting
    Replies: 1
    Last Post: 11-08-2005, 03:03 PM
  3. URL Problems
    By liqidhed in forum General Flash
    Replies: 1
    Last Post: 06-24-2005, 02:15 AM
  4. loadVars() Problems
    By dfmes in forum Flash Scripting
    Replies: 2
    Last Post: 12-14-2004, 11:16 AM
  5. Loadvars()?
    By BigBeck in forum Advanced Flash
    Replies: 3
    Last Post: 05-28-2004, 06:24 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Sponsors
Create Speaking Characters for your website and Flash movies. 15 Day Free Trial