Skip to main content
Participating Frequently
Mar 4, 2012 4:28 PM UTC
Question

Mobile toggle button possible?

Dear all,

I need a very simple toggle enabled button and don't want to skin the not-mobile-optimized ToggleButton. Since I want to place it on ActionBar, the flat-style button seems good for me.

My purpose is simple: when user clicks the button, I want it stay down before user clicks again. I tried to make it by setting currentState but failed.

Would anyone give a simple way here? That is to control button state, the best.

Regards,

Felix

This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

Participating Frequently
Mar 5, 2012 12:41 AM UTC
yancaoshiAuthor
Participating Frequently
Mar 5, 2012 12:08 PM UTC

Sorry, but it's not I am looking for.

Let me explain from the beginning. I need a CalloutButton with contentBackgroundAppearance="none" which is inset style by default. Then I use Button to pop up a Callout. However, ordinary cannot keep down state.

Therefore, I need a simple way, no skin.

Hope so..

Regards,

Felix    

Translate
Participant
Sep 12, 2012 1:50 PM UTC

What I did was extended the CalloutButton and overrided the partAdded function to hide the callout window:

override protected function partAdded(partName:String, instance:Object):void{

                              if (partName == "dropDown"){

                                        instance.visible = false;

 

                              }

}

You also need to make it so the button's skin state stays in the down state stays down when you click off of the button.

Translate