Splitting data
Ben Schwarz <[email protected]> Sun, 05 Oct 2003 04:15:49 +1000
| Newsgroups | gmane.comp.web.ming.general |
|---|---|
| Message-ID | <5.1.0.14.2.20031005041545.00b2ed78@localhost> |
Hi,
I was wondering if one of you can help me with this..
Its actually actionscript but since you guys have PHP knowledge as well
someone might know?
I want to do this PHP in Flash..
Say I have data that looks like this:
5, 235, 115, 0, 0, 0;5, 235, 115, 0, 0, 0;5, 235, 115, 0, 0, 0;5, 230, 110,
0, 0, 0;5, 230, 110, 0, 0, 0;5, 225, 110, 0, 0, 0;5, 225, 110, 0, 0, 0;5,
225, 110, 0, 0, 0;5, 220, 105, 0, 0, 0;5, 220, 105, 0, 0, 0;5, 215, 105, 0,
0, 0;5, 205, 100, 0, 0, 0;5, 205, 100, 0, 0, 0;5, 205, 100, 0, 0, 0;5, 190,
100, 0, 0, 0;5, 190, 100, 0, 0, 0;5, 190, 100, 0, 0, 0;5, 190, 100, 0, 0,
0;5, 190, 100, 0, 0, 0;5, 190, 100, 0, 0, 0;5, 190, 100, 0, 0, 0;5, 190,
100, 0, 0, 0;5, 190, 100, 0, 0, 0;5, 190, 100, 0, 0, 0;5, 185, 100, 0, 0,
0;5, 185, 100, 0, 0, 0;5, 185, 105, 0, 0, 0;5, 185, 105, 0, 0, 0;5, 185,
105, 0, 0, 0;5, 185, 105, 0, 0, 0;5, 185, 105, 0, 0, 0;5, 185, 105, 0, 0,
0;5, 185, 105, 0, 0, 0;5, 185, 110, 0, 0, 0;5, 185, 110, 0, 0, 0;5, 185,
110, 0, 0, 0;5, 185, 110, 0, 0, 0;5, 185, 110, 0, 0, 0;5, 185, 110, 0, 0,
0;5, 185, 110, 0, 0, 0;5, 185, 115, 0, 0, 0;5, 185, 115, 0, 0, 0;5, 185,
115, 0, 0, 0;5, 185, 115, 0, 0, 0;5, 185, 115, 0, 0, 0;5, 185, 115, 0, 0,
0;5, 185, 115, 0, 0, 0;5, 190, 115, 0, 0, 0;5, 190, 120, 0, 0, 0;5, 190,
120, 0, 0, 0;5, 190, 120, 0, 0, 0;5, 190, 120, 0, 0, 0;5, 190, 120, 0, 0,
0;5, 190, 120, 0, 0, 0;5, 190, 120, 0, 0, 0;5, 190, 120, 0, 0, 0;5, 190,
120, 0, 0, 0;5, 190, 125, 0, 0, 0;5, 195, 125, 0, 0, 0;5, 195, 125, 0, 0,
0;5, 195, 125, 0, 0, 0;5, 195, 125, 0, 0, 0;5, 195, 125, 0, 0, 0;5, 195,
125, 0, 0, 0;5, 195, 125, 0, 0, 0;5, 195, 125, 0, 0, 0;5, 195, 130, 0, 0,
0;5, 200, 130, 0, 0, 0;5, 200, 130, 0, 0, 0;5, 200, 130, 0, 0, 0;5, 200,
130, 0, 0, 0;5, 200, 130, 0, 0, 0;5, 200, 130, 0, 0, 0;5, 200, 130, 0, 0,
0;5, 200, 130, 0, 0, 0;5, 200, 130, 0, 0, 0;5, 200, 130, 0, 0, 0;5, 205,
130, 0, 0, 0;5, 205, 130, 0, 0, 0;5, 205, 130, 0, 0, 0;
...and I want to something like I've done here in php:
$data_array = explode(";",$data);
foreach($data_array as $newVal){
list($size,$x,$y,$r,$g,$b)=split(",", $newVal);
}
I think you can see what it does, each set of data before each ; is a block
in my drawing program, I'm trying to get it back into flash and recreate it :-)
so anyway I can't workout how to convert that to AS.. any ideas?
Thanks for reading.
__b