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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:22:35+00:00 2026-05-26T14:22:35+00:00

I have a custom UIComponent that is basically just this: public class WhiteboardUIComponent extends

  • 0

I have a custom UIComponent that is basically just this:

public class WhiteboardUIComponent extends UIComponent
{
    public function WhiteboardUIComponent() {
        super();
        this.addEventListener(MouseEvent.MOUSE_DOWN, mouseBeginListener);
    }
    public function mouseBeginListener(event:MouseEvent):void {
        trace("Mouse!");
    }
}

I am adding it to my view like so:

<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
    xmlns:s="library://ns.adobe.com/flex/spark"
    xmlns:mh="*"
    actionBarVisible="false" mouseChildren="true" enabled="true" mouseEnabled="true" >

    <mh:WhiteboardUIComponent id="whiteboard" x="0" y="0" width="100%" height="100%"/>  
</s:View>

This is absolutely the simplest that I could make the example. The s:View is gobbling up my mouse events – if I add a handler in the MXML to the View, I get mouse events just fine. When adding a handler programmatically in my subclass’ constructor, I get nothing. I thought maybe the layout was wrong, so I explicitly set the dimensions of my UIComponent and stuck it in a border just to be sure it was where it was supposed to be – same deal. No events. What’s going on here?

  • 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-26T14:22:35+00:00Added an answer on May 26, 2026 at 2:22 pm

    You need to draw something inside your UIComponent. Try the following within your custom WhiteBoard :

    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
    {
        super.updateDisplayList(unscaledWidth, unscaledHeight);
    
        graphics.clear();
    
        graphics.beginFill(0xFFFFFF, 0.0000001);
    
        graphics.drawRect(0, 0, unscaledWidth, unscaledHeight);
    
        graphics.endFill();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have custom exceptions in my django project that look like this: class CustomFooError(Exception):
I have a custom converter which is this : @ManagedBean @RequestScoped public class MeasureConverter
I have a custom converter like this: @Override public Object getAsObject(FacesContext facesContext, UIComponent component,
I have custom ImageView: public class ShadowedImageView extends ImageView { private Paint mPaint; public
i have custom cell with 2 buttons(the function of these buttons is just to
I have custom assembly that is loaded on runtime. at this point i have
I have custom control: public class TestTextBox : TextBox { public TestTextBox() { Text
I have custom classes that I currently instantiate within App.xaml as resources. I want
I have a few models that need to have custom find conditions placed on
hi i would like to create a custom calendar, this calendar will have custom

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.