|
Christian
post date:
2007-04-18 18:28:35
|
I want to change the the gradient colors with actionscript, the demo file has en example of it but it all goes black.
This is in the demo file
initObj.gradColors= new Object();
initObj.gradColors.color=("#c62f38","#5C407A");
initObj.gradColors.alpha=("100","100");
initObj.gradColors.ratio="90";
But this is in the flash help panel
initObj.gradString = "3039231,100,1.27516753743,100,255";
None of them work, it's just black.
Every thing else work just great.
It's a great component.
But please tell me what to do with the color problem
Thanks up front
Christian
|
|
|
Romeo Copaciu [Extend Studio]
post date:
2007-04-20 06:22:14
|
Hello Christian
Indeed there was an error in the demo file.
Here is the correction
Replace the code:
initObj.gradColors= new Object();
initObj.gradColors.color=("#c62f38","#5C407A");
initObj.gradColors.alpha=("100","100");
initObj.gradColors.ratio="90";
with this code:
initObj.gradType = "Gradient";
initObj.gradString = "0x0000FF,100,0/0xFF0000,100,255";
initObj.gradAngle = 90;
The gradString variable works as an array of object which are separated by the /?, then every part of the string has elements separated by coma ,? The first elements represents the color value (hexa or decimal 0x0000FF is same as 255) , the second element represents the alpha value and the third element represents the color ratio. For more information on these check the beginGradientFill function in the Adobe Flash Help.
I hope this helped you and thanks for the feedback on our product.
Enjoy using it .
Romeo Copaciu
|
|