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 982933
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T04:46:34+00:00 2026-05-16T04:46:34+00:00

I need some help with sending info from a component. I’m not sure how

  • 0

I need some help with sending info from a component. I’m not sure how to proceed.

I’m using Alex Uhlmann’s flip card class (Distortion Effects). I’ve got a card that has 3 faces. When the user clicks the button, it fires a change event, and in the main application, the change event calls a function, flipTo, that flips the card. The component is below:

    <?xml version="1.0" encoding="utf-8"?>
    <mx:Panel 
        xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" 
        width="500"
        height="400">

        <mx:Metadata>
            [Event("change", type="mx.events.Event")]
        </mx:Metadata>


        <mx:Script>
            <![CDATA[
                [Bindable]
                public var backCaption:String;
            ]]>
        </mx:Script>


            <mx:Text id="myAnswer" htmlText="{backCaption}"  width="100%" />

        <mx:ControlBar height="40"  width="100%" >
                <mx:Button 
                             x="20" y="400" 
                             label="Flip" 
                             click="dispatchEvent( new Event( Event.CHANGE ) );" />
        </mx:ControlBar>

    </mx:Panel>

The main application looks like:

<mx:Canvas id="homeStack"   >
        <mx:ViewStack id="flipViewStack2"  x="200" y="150"  >

            <sides:FlipFace 
            id="frontFace2" 
            title="Newport"
            change="flipTo(frontFace2, backFace2, DistortionConstants.LEFT, DistortionConstants.RIGHT);" />     


            <sides:FlipReverse  
            id="backFace2" 
            title="Newport: Answer"  
            change="flipTo(backFace2, anotherFace2, DistortionConstants.LEFT, DistortionConstants.LEFT);" />    

            <sides:FlipAnotherSide  
            id="anotherFace2" 
            title="Other Stuff"  
            change="flipTo(anotherFace2, frontFace2, DistortionConstants.RIGHT, DistortionConstants.LEFT);"/>

        </mx:ViewStack>
    </mx:Canvas>

    <mx:Canvas id="OtherStack" >
        (more code)
    </mx:Canvas>

The flipTo function in the main application takes 4 parameters: the starting side, the ending side, and then two parameters that determine the direction of the flip.

Everything works great. If I hit the button, I can flip through all of the sides. But, I’d like to add a comboBox, so that the user can flip directly to the side that they want instead of having to cycle through all of the sides. (This is important as I plan to add more sides).

In the main application, please note that the sides have the number 2 in their ids. For example, frontFace2. I’ve got multiple sets of cards each with a different number, frontFace3, frontFace4, etc. The number determines which data is pulled from the database. (I’ve simplified the code for brevity).

How can I add a comboBox in the component that causes the card to flip to the selected side?

Do I need a custom event? (Unfortunately, I don’t know anything about custom events). Is there a way to have the comboBox set a public variable and then somehow access that variable in the main application and call flipTo with the comboBox’s chosen side? Other possibilities?

Any suggestions?

Thank you.

-Laxmidi

  • 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-05-16T04:46:35+00:00Added an answer on May 16, 2026 at 4:46 am

    oh, yeah, you will need a custom event.
    the custom event is your inheritance to the Event class which on it you can load more data, params, views and more.

    in your case, things are a bit more simple but you will need to see what “face” the user selected and flip to it.

    steps
    1. create a custom event (inherit from event)
    2. add a var to the event class that’s called face
    3. when the user selects the value from the combo, fill the face var with value and dispatch the event
    4. listen to the event in the application level and then flipTo the relevant face.

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

Sidebar

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.