[Flashcoders] Converting a comma delimitted list to an array from MySql
Oi, All. I am recieving a comma delimitted list/String from MySql that looks like this: 0,0,0,26.361817121505737,10.903573036193848,7.390960305929184,24.12494868040085,21.304115653038025,6.756003946065903,11.561043560504913 I am trying to convert it into an Array. I used to do something like it in MM Director, but I cannot figure out how to do it in AS. Can someone help a brother out? Thank you! -- Carl Welch http://www.carlwelch.com [EMAIL PROTECTED] 805.403.4819 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Converting a comma delimitted list to an array from MySql
use the string.split method var my_array:Array = my_str.split(,); A Carl Welch wrote: Oi, All. I am recieving a comma delimitted list/String from MySql that looks like this: 0,0,0,26.361817121505737,10.903573036193848,7.390960305929184,24.12494868040085,21.304115653038025,6.756003946065903,11.561043560504913 I am trying to convert it into an Array. I used to do something like it in MM Director, but I cannot figure out how to do it in AS. Can someone help a brother out? Thank you! -- *Anthony Eden*: Inventor at Snepo http://www.snepo.com/ contact | [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] | 0411 5622 02 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Converting a comma delimitted list to an array from MySql
Thanks, though, I heard that the split function built into AS is notoriously slow. True? On 10/19/06, Arse @ Snepo [EMAIL PROTECTED] wrote: use the string.split method var my_array:Array = my_str.split(,); A Carl Welch wrote: Oi, All. I am recieving a comma delimitted list/String from MySql that looks like this: 0,0,0,26.361817121505737,10.903573036193848,7.390960305929184,24.12494868040085,21.304115653038025,6.756003946065903,11.561043560504913 I am trying to convert it into an Array. I used to do something like it in MM Director, but I cannot figure out how to do it in AS. Can someone help a brother out? Thank you! -- *Anthony Eden*: Inventor at Snepo http://www.snepo.com/ contact | [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] | 0411 5622 02 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- Carl Welch http://www.carlwelch.com [EMAIL PROTECTED] 805.403.4819 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Converting a comma delimitted list to an array from MySql
var my_str:String = P,A,T,S,Y; var my_array:Array = my_str.split(,); for (var i = 0; imy_array.length; i++) { trace(my_array[i]); } // output: P A T S Y easily found in the documentation. On 10/19/06, Carl Welch [EMAIL PROTECTED] wrote: Oi, All. I am recieving a comma delimitted list/String from MySql that looks like this: 0,0,0,26.361817121505737,10.903573036193848,7.390960305929184, 24.12494868040085,21.304115653038025,6.756003946065903,11.561043560504913 I am trying to convert it into an Array. I used to do something like it in MM Director, but I cannot figure out how to do it in AS. Can someone help a brother out? Thank you! -- Carl Welch http://www.carlwelch.com [EMAIL PROTECTED] 805.403.4819 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Converting a comma delimitted list to an array from MySql
Dod, Thanks! I just tried it and it wasn't really slow at all -- It returned an array length of close to 3000, and I didn't notice any slowdown I love you arse... Yes I am comfortable enough with my sexuallity that I can say that with out wincing... Cheers, -- Carl Welch http://www.carlwelch.com [EMAIL PROTECTED] 805.403.4819 On 10/19/06, Carl Welch [EMAIL PROTECTED] wrote: Thanks, though, I heard that the split function built into AS is notoriously slow. True? On 10/19/06, Arse @ Snepo [EMAIL PROTECTED] wrote: use the string.split method var my_array:Array = my_str.split(,); A ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Converting a comma delimitted list to an array from MySql
lol... be warned though... if you hit the 15 second barrier on larger strings the player will throw a script warning dialogue... which you may want to protect yourself from by using a custom method. a Carl Welch wrote: Dod, Thanks! I just tried it and it wasn't really slow at all -- It returned an array length of close to 3000, and I didn't notice any slowdown I love you arse... Yes I am comfortable enough with my sexuallity that I can say that with out wincing... Cheers, -- *Anthony Eden*: Inventor at Snepo http://www.snepo.com/ contact | [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] | 0411 5622 02 ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com