Passing array through flashvars

Hi,

I’m using a php script (this question really is about AS3) to output the following code:
card0: ‘7’, card1: ‘19’, card2: ‘17’, card3: ‘21’, card4: ‘18’
and pass these values into my flash. What I would like to get in the end however is an array with all these values – without knowing how many there are (could be card5, card6 …).
My question is whether it’s possible easily or if passing the following would be better:
cards: ‘7,19,17,21,18’,
Is there an automatic way to create an array from these values (which really is a string in fact) into broken values into an array something like this:

var flCards:Array = new Array(paramObj['cards']);
output:
flCards[0] = 7;
flCards[1] = 19;
etc...

I’ve been struggling with the first flashvars trying to figure out how many cardX there really are and I don’t know how to make a string of numbers delimited with commas into an array.
Shall I do a string replace, something similar, or is there an easier way?

Thanks for your help,