views:

857

answers:

3

How to create rounded & good looking "OK" and "CANCEL" buttons from AS3 ?

I dont want to use any images for these, just draw them?

+1  A: 

There are many ways to do that.

If I were you - if a button is all you need. Make yourself a button class. If you need more Layout & GUI elements, consider using the Flex Framework or something like ASwing

In Flex either learn how to skin a component or do it yourself. Just create a canvas, box, label or whatever with a picture in it and make it behave like a button.

monkee
+1  A: 

Further to monkee's answer, if using Flex you can create very simple rounded Buttons by setting the cornerRadius style.

igkuk7
+2  A: 

I'd use a Shape or a Sprite, and draw on it using the graphics proerty something like

var s:Shape = new Shape();
s.graphics.beginFill(0x123123, 1);
s.graphics.drawRoundRect(...);
s.graphics.endFill();

or using a Sprite if you want to attach additional elements on it (like a label)

kajyr