hey, i am trying to split some data from a database that is being pulled by php into separate arrays. I can bring all the information into a single array and trace its position in that array but i need to have the information split depending on the the php output.
for example:
&gallerytitle=imageone|imagetwo|imagethree|&galleryimages=img1.jpg|img2.jpg|img3.jpg
i need the gallerytitle to be one array and the galleryimages to be another array
any help would be amazing, thanks!
code
ActionScript Code:
[LEFT][COLOR=#0000FF]import[/COLOR] flash.[COLOR=#000080]events[/COLOR].[COLOR=#000080]Event[/COLOR];
[COLOR=#0000FF]import[/COLOR] flash.[COLOR=#000080]net[/COLOR].*;
[COLOR=#000000]var[/COLOR] myRequest:URLRequest = [COLOR=#000000]new[/COLOR] URLRequestCOLOR=#000000[/COLOR];
[COLOR=#000000]var[/COLOR] myLoader:URLLoader = [COLOR=#000000]new[/COLOR] URLLoaderCOLOR=#000000[/COLOR];
[COLOR=#000000]var[/COLOR] myVariables:URLVariables = [COLOR=#000000]new[/COLOR] URLVariablesCOLOR=#000000[/COLOR];
myRequest.[COLOR=#000080]method[/COLOR] = URLRequestMethod.[COLOR=#0000FF]GET[/COLOR];
myRequest.[COLOR=#0000FF]data[/COLOR] = myVariables;
[COLOR=#000000]function[/COLOR] onLoadedCOLOR=#000000[/COLOR]:[COLOR=#0000FF]void[/COLOR] [COLOR=#000000]{[/COLOR]
[COLOR=#000000]var[/COLOR] namearray:[COLOR=#0000FF]Array[/COLOR] = [COLOR=#000000]new[/COLOR] [COLOR=#0000FF]Array[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#000000]var[/COLOR] valuestring:[COLOR=#0000FF]String[/COLOR] = myLoader.[COLOR=#0000FF]data[/COLOR];
[COLOR=#0000FF]trace[/COLOR]COLOR=#000000[/COLOR];
namearray = valuestring.[COLOR=#0000FF]split[/COLOR]COLOR=#000000[/COLOR];
[COLOR=#0000FF]trace[/COLOR][COLOR=#000000]([/COLOR][COLOR=#FF0000]"here we get the data back: "[/COLOR]+namearray[COLOR=#000000][[/COLOR][COLOR=#000080]15[/COLOR][COLOR=#000000]][/COLOR][COLOR=#000000])[/COLOR];
[COLOR=#000000]}[/COLOR]
myLoader.[COLOR=#000080]addEventListener[/COLOR][COLOR=#000000]([/COLOR]Event.[COLOR=#000080]COMPLETE[/COLOR], onLoaded[COLOR=#000000])[/COLOR];
myLoader.[COLOR=#0000FF]load[/COLOR]COLOR=#000000[/COLOR];
[/LEFT]