views:

63

answers:

1

Hi, I have created a sprite as below:

var arrowHeadRight:Sprite = new Sprite();
with(arrowHeadRight.graphics){
    beginFill(0xDDDDDD, 1);
    moveTo(50,0);
    lineTo(0,50);
    lineTo(50,100);
    lineTo(50,0);
    endFill();
}

On Mouse Over, I wish to change the color of the fill on this shape?

Can this be done or do I have to re-draw the graphics with an updated beginFill line?

A: 

I figured it out.

I can use the ColorTransform class:

var newCol:ColorTransform = new ColorTransform();
function nextOver(e:MouseEvent):void {
    newCol.color=0x666666;
    btnNext.transform.colorTransform = newCol;
}
Daniel Hanly
The graphic arrowHeadRight is a child of btnNext.
Daniel Hanly