Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7966469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:26:06+00:00 2026-06-04T06:26:06+00:00

I need some input.. What would be the best (well, recommended) way to implement

  • 0

I need some input..
What would be the best (well, recommended) way to implement custom buttons inside Flash Builder?

What I mean by custom buttons, is that I need to show for example a building with 5 floors (in 3d view). The user can then click each of the floor, to update the main view to show the currently selected floor.

In previous examples I’ve simply added one invisible layer below the image, which contains one solid color for each button (each floor). Clicking the image triggers a function that checks what color is selected, and then triggers the action I want.

Are there any better ways of doing this?

Maybe importing an external SWF that communicates with the main app to send the floor-switching commands? (Not that I know how to communicate from an imported external SWF to the main app, only the other way around).

Any input would be great =)

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T06:26:08+00:00Added an answer on June 4, 2026 at 6:26 am

    EDIT

    After your question, I whipped up something quickly to show that buttons can be of any shape. If you want the floors to be selectable, then you probably want a ToggleButton, not a Button so I have re-worked my example a bit and the result is what you described

    enter image description here

    Why not use the Flex 4.0 Skinning capability? You get the behavior (and states) of the button component with your own look/feel:

    <s:ToggleButton skinClass="FloorButton" y="0"  />
    <s:ToggleButton skinClass="FloorButton" y="25" />
    <s:ToggleButton skinClass="FloorButton" y="50" />
    

    You define your button skin (FloorButton) with some images:

    <?xml version="1.0" encoding="utf-8"?>
    <s:SparkButtonSkin xmlns:fx="http://ns.adobe.com/mxml/2009" 
                       xmlns:s="library://ns.adobe.com/flex/spark" 
                       xmlns:fb="http://ns.adobe.com/flashbuilder/2009"
                       alpha.disabledStates="0.5">
    
        <fx:Metadata>
        <![CDATA[ 
            [HostComponent("spark.components.ToggleButton")]
        ]]>
        </fx:Metadata>
    
        <s:states>
            <s:State name="up" />
            <s:State name="over" stateGroups="overStates" />
            <s:State name="down" stateGroups="downStates" />
            <s:State name="disabled" stateGroups="disabledStates" />
            <s:State name="upAndSelected" stateGroups="selectedStates, selectedUpStates" />
            <s:State name="overAndSelected" stateGroups="overStates, selectedStates" />
            <s:State name="downAndSelected" stateGroups="downStates, selectedStates" />
            <s:State name="disabledAndSelected" stateGroups="selectedUpStates, disabledStates, selectedStates" />
        </s:states>
    
        <s:Path data="M 0 0 L 20 20 L 40 0 L 40 20 L 20 40 L 0 20">
            <s:fill>
                <s:SolidColor color="#AAAAAA" color.selectedStates="#000000" color.over="#777777" />
            </s:fill>
        </s:Path>
    
    </s:SparkButtonSkin>
    

    Of course, the path can be replaced with a PNG with transparency to achieve a similar effect.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble determining the best way to read some input in for a
I'm considering a design for a private messaging system and I need some input
I need some images as input for my tests. Where to locate the files
I need to expose some input fields based on what properties I find for
I have the following requirement: Based on some user input, I need to generate
I need to append some text to an input field...
I need to read some data from an input file and plot a graph
I need to make a bash script that takes user input and does some
Need some help to solve this. I have a gridview and inside the gridview
I need a modal dialog to gather some user input. I then need the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.