A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Loading an array from PHP to flash.

Hybrid View

  1. #1
    Senior Member
    Join Date
    Apr 2001

    Loading an array from PHP to flash.

    Could someone please help me, I am loading an array into SWF using sendAndLoad. So I was wondering how to access the array. Mayeb this should be in Noobies cause I sure feel like one.

    so I load it in this way
    sendData = new loadVars();
    sendData.id = "blah blah";
    sendData.onLoad = function (success) {
    if (success) {
      trace("Error dummy head!");
    So how do I see the array now? The name of the Array is 'totaldates'
    Last edited by Andrue; 05-06-2003 at 04:37 PM.

  2. #2
    Danny Gomez Creations cosmiceye's Avatar
    Join Date
    Mar 2002
    under a palmtree in Jamaica waiting for psytopia 2005 to begin

    Re: Loading an array from PHP to flash.

    Originally posted by Andrue
    resultLoadVars=new LoadVars();
    sendData.sendAndLoad("http://<--file.php goes here",resultLoadVars goes here);

    flash takes name value pairs just like when you whant to transmit data from a php file to another you go link.php?name=value1&name=value2
    but instead of having it at the end of a link you print it out on the screen, thats what flash gets. I dunno about php but in jsp its:
    out.print("name=value") and in asp its: response.write(name=value), u know, the way you do when you want to display html within php.

    So if you whant to send an array, I suggest that you send a xml formatted string as one value. In flash you parse it to xml and loop throu the thing. Im supposing its a database resultset and you dont know how many of each it will hold, thats why I think that xml is the way to go. You can even set up a function for making a 2d array of the xml formatted resultset data and feed the datagrid component with it!
    Last edited by cosmiceye; 05-06-2003 at 07:09 PM.
    ..:: P S Y T O P I A 2 0 0 5 :::..
    . . . view the psytopia reels _____RIVEND REEL | GOMEZ REEL_____ . . . . . . . . . . .

  3. #3
    psx = new Moderator();
    Join Date
    Jan 2001
    Moved to the backend forum.


  4. #4
    Registered User
    Join Date
    Feb 2001

    find some information here:


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center