SitePoint Sponsor |
|
User Tag List
Results 1 to 4 of 4
Thread: arrays from php to flash
-
Mar 11, 2003, 15:53 #1
- Join Date
- Mar 2002
- Location
- New York, NY
- Posts
- 170
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
arrays from php to flash
could anyone give me a basic idea of how you would take a stored array in php and then load it into flash (ver. 6, i'm using MX)?
thanks in advance
zing
-
Mar 11, 2003, 17:05 #2
- Join Date
- Feb 2003
- Location
- mars
- Posts
- 17
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by zing
&somevariablename=value1§value2§value3......
(§ sign is used as a delimiter because later you will need to explode that string)
in flash:
temp = new LoadVars();
temp.load(http://URL to PHP script);
temp.onLoad = function(){
myArray = new Array();
myArray = temp.somevariablename.split("§");
}
and then you can access values in myArray in this form myArray[number]
-
Mar 11, 2003, 18:57 #3
- Join Date
- Mar 2002
- Location
- New York, NY
- Posts
- 170
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
thats what i had thought... i just had wondered if there was any simpler way..
thanks anyway
-
Mar 11, 2003, 19:28 #4
- Join Date
- Aug 2000
- Location
- San Diego, CA
- Posts
- 5,460
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally Posted by zing
Use Flash Remoting
http://amfphp.sourceforge.net
It will ocnvert PHP data types to Flash data types. Other than that what leom suggested is the easiest way.
Bookmarks