-
go blues !
Cant load in colour variable from either flast text file or database.
eg:
say I want use setRGB and so load in 0xFF6600 , no matter what I try this will not work.
The question therefore is , how do I explode this string into a readable number.
?????????????????????????????????????????????????? ?????
I know its stupidly easy but it just wont work.
-
Hi,
I think
Number(rgbval.substr(2), 16)
should work.
Musicman
-
go blues !
Thanks musicman,
Ithought about that one but because i'm using 0xRRGGBB setRGB system it will not evaluate it to a number. I presume that if I set the color using the full setTransform method it would do it because these only use numbers. I really wanted to do it with the 0xRRGGBB system.
The call just wont work inside any "" or text fields.
I figured this must be a way for MM to disallow the process. ( Or am I overly SUS),
Any other ideas-- normally a good ole eval should do the trick but Nay.
-
Hi,
it should really work this way...
I just checked with the F5 manual, and there it is parseInt()
so split off the 0x, and then use parseInt('RRGGBB', 16)
I believe MX accepts the number base on both Number and parseInt functions
Musicman
-
go blues !
Thanks Music man
This sounds like it
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|