So...
function argbtohex(a:Number, r:Number, g:Number, b:Number) {
return (a << 24 | r << 16 | g << 8 | b);
}
createEmptyMovieClip("clip", 1);
with (clip) {
beginFill(argbtohex(255,128,128,128));
moveTo(0,0);
lineTo(100,0);
lineTo(100,100);
lineTo(0,100);
lineTo(0,0);
endFill();
}
It works...
On 12/2/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> In order to use the fillRect method you need to pass in the color as a Hex
> value.
>
> To start I want to fill with a 50% grey, which as an argb number would be
> 255,128,128,128
>
> I tried using the following function from Guy Watson's tutorial:
>
> function argbtohex(a:Number, r:Number, g:Number, b:Number)
> {
> return (a<<24 | r<<16 | g<<8 | b)
> }
>
>
> I get the value '-8355712'
>
> What am I doing wrong??
>
>
>
> [e] jbach at bitstream.ca
> [c] 416.668.0034
> [w] www.bitstream.ca
> --------------------------------------------
> "...all improvisation is life in search of a style."
> - Bruce Mau,'LifeStyle'
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders