Not sure about the performance question, but a simple conversion of
the String to a Number should work:

var yello:String = "0xffcc00";
object.material = new ColorMaterial(Number(yello));

On Mar 18, 9:08 am, Pierre Karadia <[email protected]> wrote:
> Dear Away3Ders,
>
> Quick question on performance:
>
> Is there any difference between loading a bitmap as a solid color or
> using a colorMaterial??
>
> eg. if i have multiple planes of colours and at the moment they use a
> colorMaterial if I replaced this colorMateiral with a BitmapMaterial
> using a bitmap of the same color reference would I experience any slow
> down?? or does the colorMaterial class effectively render a bitmap of
> the colorRef that is passed to it.
>
> Also if I have color references as strings, ie "ffcc00", what is the
> best way to pass that into the colorMaterial object:
>
> var yello:String = "0xffcc00";
>
> object.material = new ColorMaterial(yello);
>
> seems to give me errors..
>
> Any thoughts would be most appreciated
>
> tia

Reply via email to