Well, I came up with this question working on this: I wanna write a function where I can pass the hexadeximal colour number e.g.
Code:
function colorme(CCADFF);
And the function 'colorme' being something like:
Code:
function colorme(mystring:String) {
trace ("0x"+mystring);
}
To form a 0xCCAD00 number which I can pass to a colortransform function.
But CCADFF would now be seen as a variable off course and transfer as 'undefined'.
I would have to add quotes
Code:
function colorme("CCADFF");
or the complete hex number
Code:
function colorme(0xCCADFF);
But to make it simple I would just want to pass the name
Code:
function colorme(CCADFF);
That's why I was looking for a function which would prevent this to be seen as a variable and instead turn it into a string.
Possible or not?