[Webpro] importing arrays into flash

Rebecca Wyatt rebecca at bellafly.com
Mon Apr 19 04:07:56 EDT 2004


Hello,

I'm importing a variable into Flash (using PHP) that consists of a list of arrays. How do I tell Flash that this 'variable' is actually a bunch of arrays? I tried looping through them using PHP before they get imported to Flash, but for some reason the arrays get quotes but around them (like any other variable I import)... 

Example PHP (before import): 

$myOriginalVariable="foo1=new Array(25,311,9062912,100,100,100,0,'foo',32);foo2=new Array(26,311,9062912,100,100,100,0,'foo',33)";"

$myArray=explode("\r\n", $myOriginalVariable);
foreach($myArray as $thisArray){
print "&$thisArray";
}

This code prints out something like this in Flash...

foo1="new Array(25,311,9062912,100,100,100,0,'foo',32)";
foo2="new Array(26,311,9062912,100,100,100,0,'foo',33)";

...which wouldn't be a problem except for the quotes (I think). There's got to be another way...

Thanks in advance for your help!!

Rebecca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://six.pairlist.net/pipermail/webpro/attachments/20040419/cbe7548c/attachment.htm


More information about the Webpro mailing list