Link to home
Start Free TrialLog in
Avatar of alamflex
alamflex

asked on

How to make line image as a selectable button with up and down skins?

How to make line images as a selectable button with up and down skins?
Once a user selects a line it should look like a pressed button.
If possible provide me with sample code.Here i am using flex sdk 3.5

Thanks,
Alam.
Avatar of dgofman
dgofman
Flag of United States of America image

What the problems use Button class and icon attribute

http://livedocs.adobe.com/flex/3/html/help.html?content=controls_04.html
Avatar of alamflex
alamflex

ASKER

Here i am attaching the screenshot of my application.

How to make line images as a selectable button with up and down skins?
Once a user selects a line it should look like a pressed button.

Thanks
Alam.
Demo.doc
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
      <mx:VBox>
            <mx:Button icon="@Embed(source='Images/box.png')"
                           width="110" height="110"/>
            <mx:Button icon="@Embed(source='Images/circle.png')"
                           width="75" height="75"/>
            <mx:Button icon="@Embed(source='Images/rectangle.png')"
                           width="130" height="130"/>
      </mx:VBox>
</mx:Application>
Then how can we change the cursor similar to paint brush.
In Paintbrush suppose when i select line button it should highlight that line button is selected if you select other icons it should highlight that button. Also i need to change cursor when user selects line button and trying to draw in drawing area.

I hope you got my requirement.

Using CursorManager class you can customize cursor. I will give u example later
ASKER CERTIFIED SOLUTION
Avatar of dgofman
dgofman
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial