Mouse Events are slow

Hello everyone,
I'm currently working on an standard as3 (1024x768) app that
is running inside a chromeless Air window to take advantage of the
transparency.
All my tests where done using windows XP professional and AIR
1.0 (the same problem existed in beta3).
The issue I'm having is related with Mouse Events. Somehow
the events take a lot of time to reach the swf file when the user
clicks inside the transparent window.
It's natural that the app runs slower inside a transparent
window (the framerate drops) but I wasn't expecting the clicks to
suffer from such delay (it takes sometimes 2-5sec).
The app is very CPU intensive and the transparencies make it
worse. Something inside the AIR framework is not dispatching the
events properly.
I say this because I tried using the virtualMouse class from
senocular together with a socket to simulate the mouse clicks and
that did the trick.
In conclusion:
Something in the AIR framework for windows XP is messing up
the dispatch of the Mouse events when the app is under heavy cpu
usage inside a chromeless window. I click on the window and it
takes 1-2sec to receive the click event.
However when I dispatch the MouseEvent.CLICK myself using
the virtual mouse class the application immediately receives the
event.
I know this is a strange bug and not many people will have
this problem, but I would like to know from someone with knowledge
of the runtime why this could be happening.
Thank you
Tiago Bilou

Hello everyone,
I'm currently working on an standard as3 (1024x768) app that
is running inside a chromeless Air window to take advantage of the
transparency.
All my tests where done using windows XP professional and AIR
1.0 (the same problem existed in beta3).
The issue I'm having is related with Mouse Events. Somehow
the events take a lot of time to reach the swf file when the user
clicks inside the transparent window.
It's natural that the app runs slower inside a transparent
window (the framerate drops) but I wasn't expecting the clicks to
suffer from such delay (it takes sometimes 2-5sec).
The app is very CPU intensive and the transparencies make it
worse. Something inside the AIR framework is not dispatching the
events properly.
I say this because I tried using the virtualMouse class from
senocular together with a socket to simulate the mouse clicks and
that did the trick.
In conclusion:
Something in the AIR framework for windows XP is messing up
the dispatch of the Mouse events when the app is under heavy cpu
usage inside a chromeless window. I click on the window and it
takes 1-2sec to receive the click event.
However when I dispatch the MouseEvent.CLICK myself using
the virtual mouse class the application immediately receives the
event.
I know this is a strange bug and not many people will have
this problem, but I would like to know from someone with knowledge
of the runtime why this could be happening.
Thank you
Tiago Bilou

Similar Messages

  • All buttons in all files are now showing error: Mouse events are permitted only for button instances.

    Somebody please help:
    I've taught myself enough with Flash to customize a
    fully-Flash template for my wife's website, and two of the buttons
    didn't do what I wanted them to in Actionscript. They then began
    giving me the message:
    **Error** Symbol=sub_butt1, layer=Layer 4, frame=1:Line 1:
    Mouse events are permitted only for button instances
    on (rollOver) {
    **Error** Symbol=sub_butt1, layer=Layer 4, frame=1:Line 4:
    Mouse events are permitted only for button instances
    on (releaseOutside, rollOut) {
    Total ActionScript Errors: 2 Reported Errors: 2
    Not only do I not know how to fix this, the same message
    comes up for every single button in the entire fla I had saved,
    plus earlier versions where I hadn't even messed with the buttons
    yet.
    Any suggestions?

    Hello Corbett,
    The error is saying that you are trying to apply a button
    action to something
    other than a button. Often this happens when you select the
    frame that the
    button is on instead of the actual button, thus applying the
    action to the
    frame instead of the button.
    Make sure you select the button on the stage and then apply
    the actions there.
    You'll probably have to remove the action from the frame
    before it will work
    (looks like it's on Layer 4 frame 1).
    Good luck!
    Jesse H.
    Adobe Community Expert
    My site:
    http://www.jharding.com
    Free Blog Radio:
    http://www.tornadostream.com
    > Somebody please help:
    > I've taught myself enough with Flash to customize a
    fully-Flash
    > template for
    > my wife's website, and two of the buttons didn't do what
    I wanted them
    > to in
    > Actionscript. They then began giving me the message:
    >
    > **Error** Symbol=sub_butt1, layer=Layer 4, frame=1:Line
    1: Mouse
    > events are
    > permitted only for button instances
    > on (rollOver) {
    > **Error** Symbol=sub_butt1, layer=Layer 4, frame=1:Line
    4: Mouse
    > events are
    > permitted only for button instances
    > on (releaseOutside, rollOut) {
    > Total ActionScript Errors: 2 Reported Errors: 2
    >
    > Not only do I not know how to fix this, the same message
    comes up for
    > every
    > single button in the entire fla I had saved, plus
    earlier versions
    > where I
    > hadn't even messed with the buttons yet.
    > Any suggestions?

  • How Keyboard & Mouse Events are handled in java?

    Hi
    How Keyboard & Mouse Events are handled in java?
    Kindly brief, how a key typed in the keyboard is sensed and it is entered in JTextField?
    or
    Pls. give me some links.
    Am going to send the events from external device (like keyboard) to OS and from that I need to capture that event in Java Swing?
    Pls. drop in a bit. So that it will be helpfull to me.
    Thanks in advance,
    bee

    Actualy am very much aware of using KeyListener and MouseListener. I am in need of internal details,
    how typing a key in keyboard is captured by KeyListener? How the event is passed to java swing and and it is fired to keylistener.
    Pls. help me.
    Thanks
    bee

  • When both plug-in objects and jQuery mouse events are present, Firefox re-starts the plug-in object (eg Flash movie) after a jQuery mouse event occurs. This doesn't happen in any other browser. How can I get around this?

    Please check http://www.syus.com for an example. There is a Flash movie underneath the main navigation. The main navigation has a jQuery mouse event, and when you mouse over a button in the main navigation, the Flash movie re-starts. I can confirm that this happens not only on Flash swf files, but on standard <object> YouTube embeds.

    Ok, I promise this is my last post without your help. I did some more troubleshooting and it only seems to happen when jQuery appends elements to the body that were previously invisible. In other words, I can simply change the css in jQuery from using element.css('display','inline'), but if I try to use something like slideDown or other jQuery tooltip functions that append and/or remove elements or style definitions it causes the "object restart" bug.
    It is impossible for any developer to eliminate this bug without changing the actual source of jQuery, which I can't do. My only other option is not to use sophisticated show/hide jQuery elements like drop-down menus and tooltips on the same page as an embedded object, but I don't want to do this since Safari, Chrome and even IE (dear God) users won't have a problem with this. I think this is a major major bug that should be fixed in Firefox 4 as more and more sites will be looking to use the latest jQuery plugins.

  • Lots of lags in basic finder operations - mouse events are not recognized

    Hi there,
    since 10.6.7 I'm experiencing lots of problems with my Mac mini 2,4Ghz Intel core duo / 4 GB RAM / 140GB free disc space. I recently updated to Lion which I hoped would fix some of this problems - turned out to be a dream. Some Time/Apps later all the problems show up again. I already searched the web for solutions and did the following:
    resetting PRAM, booting in safe mode, deleting startup items, complete new system installation, and apps, updating software, killing dashbord (read it somewhere), adjusting mouse preferences, checking with hardware test, removing RAM bars to check if there is a problem, memtest, used "lion cache cleaner" for optimizing RAM, deleting caches, switching vom 64 to 32 bit and vice versa,  etc. ... no effect!
    Activity monitor does not show any unusual peaks (as far as I can tell) in performance (cpu, ram, etc.)
    1) Basic finder operations often lag. E.g. opening an external USB drive, opening internal drive, opening upper registers(menues), etc. Sometimes up to 5 seconds delay, which can be really annoying during work. What is more, this happens in almost all Apps when I try to access the file system.
    2) iTunes videos from the store lag quite heavy. It's almost impossible to watch a movie due to the hangups
    3) Mouse clicks/moves sometimes/often are not (or very late) recognized by finder/apps. (e.g. CS5 Photoshop,when triing to move a layer I often need to use the arrow keys of the keyboard to have an effect, mouse is just ignored  & simple movement of files will only happen after I tried it 2-3 times)
    4) Entering text in form fields, like logins, community posts, ... is a real pain since it often takes some time until the text shows up. It's like typing and 5 seconds later you can see the machine work by putting letter after letter on the screen.
    Does anyone have an idea what the problem is?
    Could it be a hardware issue? Grafic-card?
    Any solutions?
    Would be nice hearing from you.
    Pero

    Found something... read, that it could be a mouse-usb problem when connected to the keyboard... so what I did was connecting the mouse directly to the mac... and ahhh first improvement... mouse-experienceis much better now... and I think, for what I can tell at this moment, finder operations seem better too.
    Never would have guessed that. I take my mini to the office every day where I have a second set of mouse and keyboard... had the same probs there... so probably it is a mac-usb-keyboard with attached mouse - problem.

  • JPanels are not reading Mouse Events

    I created a basic Tic Tac Toe game, with individual "TicPanel"s inside a JPanel inside a JFrame object, however, none of the mouse events are working? Is it because the JFrame is receiving and doing nothing with the MouseEvents?
        private class TicPanel extends JPanel implements MouseListener
            private int owner; //-1 = none, 0 = O, 1 = X
            private Graphics g;
            private int num;
            ActionListener listener;
             * Constructor
            public TicPanel(int num)
                this.num = num;
                g = getGraphics();
                owner = -1;
            public void setX()
                owner = 1;
                g.drawLine(0,0,getWidth(),getHeight());
            public void setO()
                owner = 0;
                g.drawOval(0,0,getWidth(),getHeight());
            public int getOwner()
                return owner;
            public void mousePressed(MouseEvent evt){}
            public void mouseReleased(MouseEvent evt){}
            public void mouseExited(MouseEvent evt){}
            public void mouseEntered(MouseEvent evt){}
            public void mouseClicked(MouseEvent evt)
                System.out.println("works");
                listener.actionPerformed(new ActionEvent(this, num, ""));
                setX();
            public void addActionListener(ActionListener listener)
                this.listener = listener;
        }   Edited by: TheWhiteLynx on Aug 10, 2009 2:16 PM

    TheWhiteLynx wrote:
    I created a basic Tic Tac Toe game, with individual "TicPanel"s inside a JPanel inside a JFrame object, however, none of the mouse events are working? Is it because the JFrame is receiving and doing nothing with the MouseEvents?I don't see anywhere that you are adding a MouseListener to anything. Usually this is done with the addMouseListener(...) method.
    Oh, and please read the Sun graphics tutorial as this is not the way to do graphics in Swing. You do not want to get the Graphics object via getGraphics method but instead do your painting in a paintComponent override method and get your Graphics object from the parameter passed to this method. The tutorials will explain all.
    Edited by: Encephalopathic on Aug 10, 2009 2:29 PM

  • Non modal PopUpManager blocking mouse events

    In our application we have a header, footer and center area.  We have a situation where we want to block the header and center area with a popup, but leave the footer area so it can be clicked on.  The code works fine and it all looks good, except the mouse events are blocked to the footer.  If we slightly resize the window (either with the mouse or programatically) it all "wakes up" and starts working.  I have tried all sorts of invalidateDisplayList, validateDisplayList, validateNow, etc.  I am throwing this out there to see if anyone else has had this problem and if there is something I am missing.  I can't easily share my code, but if I don't get a reply I'll put together a code example to see if I can recreate it.  Any ideas are very welcome.  Been scratching my head at this one for 3 days now. 

    I should point out that we are using "false" for the modal flag, just in case anyone was thinking that.  It all works fine once it "wakes up" through resizing, but I need to make that happen without the resizing.
    And we have tried all sorts of "callLater" behavior in conjuction with the invalidate/validate calls. 

  • Mouse events during Thread.sleep

    hi.
    I have an applet .
    I have a alghoritm simulator.
    Everytime I find a solution I call the method Thread.sleep .
    I want to pause the application and I create a JToggleButton Pause .
    When I press the Pause during sleep mouse event are managed at the end of alghoritm.
    How can I manage mouse events during sleep?

    All UI events (such as mouse events) occur on the event dispatch thread (EDT).
    That means if you sleep on the EDT, you lock up the UI. For this reason, you shouldn't be sleeping on the EDT.
    I'm not sure what your sleep is trying to do but you need to manage your threads a little more carefully. For instance, any time consuming process which is invoked as a result of a UI event needs to be fired on a new thread to prevent the UI freezing. The fun starts when you have to update the UI as a result of that process, because you should then hook back onto the EDT to avoid the risk of deadlock.
    Some utility classes are provided, such as SwingUtilities, and other example code is provided on Sun's site, such as SwingWorker - but if you do much UI work you'll probably end up with your own core set of threading tools and so on to make life easier.

  • Event case missing mouse events on active-x component

    I am using a Treeview and capturing selections in the tree using mouse events (event structure). I have a problem where approx 3 out of 15 mouse events are not actioned by the event structure - has anyone else had this problem or is there any suggestions?
    Thanks.

    Could you post a copy of your code that demonstates this?
    I have experimented with this control and its events.
    We may be able to help if we have soething to look at.
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Mouse event error

    I have this error message on a button that I am trying to
    apply this script to:
    on(release){
    gotoAndPlay("still1");
    **Error** Scene=Scene 1, layer=button1, frame=35:Line 1:
    Mouse events are permitted only for button instances
    on(release){
    Total ActionScript Errors: 1 Reported Errors: 1
    It is a button, it is on it's own layer, and nothing else is
    happening on that layer.
    So what is happening here?
    Kevin

    kevin raleigh wrote:
    > I have this error message on a button that I am trying
    to apply this script to:
    >
    > on(release){
    > gotoAndPlay("still1");
    > }
    > **Error** Scene=Scene 1, layer=button1, frame=35:Line 1:
    Mouse events are
    > permitted only for button instances
    > on(release){
    The action is applied to frame not button, make sure you
    select the right thing
    before applying your action, sometimes flash loses focus and
    accidentally you
    can select frame instead. The error actually clearly state
    that:
    You asing button action to Scene 1, layer named 'button' and
    frame 35.
    Best Regards
    Urami
    !!!!!!! Merry Christmas !!!!!!!
    Happy New Year
    <urami>
    If you want to mail me - DO NOT LAUGH AT MY ADDRESS
    </urami>

  • Working with mouse events in Strobe's Widget classes

    I'm adding a caption on/off toggle button (classname CaptionButton) to the ControlBar class of Strobe Media Playback 1.5.1, and I'm having a difficult time understanding how mouse events are passed to child widgets of a ButtonWidget. In my CaptionButton class (which extends ButtonWidget), I add an instance of another widget, ListWidget, that extends Widget, and I show/hide this ListWidget with a mouse click event in the CaptionButton. The ListWidget is a composite class with a List component from Flash CS5, and the cell renderers in the List component do not respond to mouse events (over, selected, etc). How do I enable this type of mouse interaction within a Widget class? With the VolumeWidget, it looks like all mouse events are recreated and then controls are manually positioned according to the event properties, but this would be rather difficult with a component that has a virtual layout like List component. Any suggestions would be greatly appreciated.
    -Robert

    Ok, found that WidgetHint sets mouseChildren = false, etc. But I have a new problem---how do I stop autoHide timer while the user is interacting with a child widget? I was looking at the VolumeWidget that is used from the MuteButton widget, but I don't see how it stops the autoHide timer from enacting.

  • Mouse event not working on JTable in JAVA 1.4.2

    mouse event is not recognised on empty table when using with java 1.4.2. Please specify if there is any chnge done for mouse event capture for table from java 1.3.1 to java 1.4.2.
    since mouse events are working fine for JTableHeader.
    if anybody have an idea please let me know.

    Hi
    JTable is there on JPanel . same code is working in JAVA 1.3.1
    actually its a bug in java 1.4.2 ( ref. bug_id=4940522 )
    here is the code reference..
    public class TableEditor extends JPanel
    �implements ListSelectionListener, Selector, Editor
    private JTable�myTable;
    private JPopupMenu myPopup;
    private Vector�myActions;
    private Vector�myListeners;

    public TableEditor(String anAssociation, Editor anEditor, int type)
    super(new GridLayout(1,1));

    myListeners = new Vector();
    myActions�= new Vector();
    myPopup�= new JPopupMenu();
    myTable�= new JTable();
    ��
    myTable.getSelectionModel().addListSelectionListener(this);
    myTable.addMouseListener(new MouseAdapter() {
    �public void mouseClicked(MouseEvent me)
    �{
    � if ((me.getModifiers() & MouseEvent.BUTTON3_MASK) != 0)
    � {
    ��// Update actions in case ListSelectionModel are out of sync.
    ��for (int i = 0; i < myActions.size(); i++)
    ��{
    Object o = myActions.elementAt(i);
    if (o instanceof SelectorAction)
    ((SelectorAction)o).check();
    ���}
    myPopup.show(myTable, me.getX(), me.getY());
    �}
    // Added mouse listener to JTableHeader
    // This is a temporary solution to open popup menu on blank table,
    // as in Java 1.4.2 no mouse event captured on blank table.
    // So for now we will capture the event from the table header.
    JTableHeader myTableHeader = myTable.getTableHeader();
    myTableHeader.addMouseListener(new MouseAdapter() {
    public void mouseClicked(MouseEvent me)
    �{
    if ((me.getModifiers() & MouseEvent.BUTTON3_MASK) != 0)
    // Update actions in case ListSelectionModel are out of sync.
    for (int i = 0; i < myActions.size(); i++)
    ��{
    Object o = myActions.elementAt(i);
    if (o instanceof SelectorAction)
    ((SelectorAction)o).check();
    ���}
    myPopup.show(me.getComponent(), me.getX(), me.getY());
    � }
    �});
    The solution given is temporary ( adding JTableHeader component)..
    we want to retain the same functionality .. mouse event should get captured on empty table only..

  • Catching external mouse event ??

    This is an old question written by imasud at [http://forums.sun.com/thread.jspa?forumID=3&threadID=140391]
    I which I know the answer
    In java, I have seen, mouse events are only triggered if we move mouse inside a container. But is it possible to catch a mouse event when mouse is not on our container? Example: - My java program is running. - I open notepad and drag mouse - Is it possible to send the event to my java program that mouse is dragged. I will really appreciate if any one can answer my question. Regards .
    My eventual goal is to implement copy paste thingy offered in lunix enviornment. Like if I drag mouse on any text, it should get copied.
    Thank u
    Imran
    "

    The new feature of the forums. Answering questions from the past.
    Let them know they weren't forgotten.
    In java, I have seen, mouse events are only triggered if we move >>mouse inside a container. But is it possible to catch a mouse event >>when mouse is not on our container? Example: - My java program is >>running. - I open notepad and drag mouse - Is it possible to send the >>event to my java program that mouse is dragged. ---------------------->>----------------- I will really appreciate if any one can answer my >>question. Regards .
    My eventual goal is to implement copy paste thingy offered in lunix >>enviornment. Like if I drag mouse on any text, it should get copied.
    Thank uHmm, very good question, I have no idea.
    Tune in next week for our second installmant of "Questions from the past."
    You answer guru - Steve

  • Capturing mouse events from a loaded module.

    I've defined a module and have it to were the mouse
    coordinates (through mouse events) are updating bindable, public
    variables in the module itself.
    In the app parent app (that's loaded the module), i want to
    display the coordinates from the loaded module as it moves around.
    Like I said, I'm close, to where I capture and handle the
    move event in the module itself, I just need to access that info
    from the parent app, etc...
    Any help is appreciated.
    -fd

    not that it matters now, but i figured it out.
    thanks anyway...
    -fd

  • Can i capture the the mouse events

    i am writting application in which i have to send the screen image to client as well as mouse events and keyboard events. i am successfull in doing screen image but mouse events are not traped
    please send me any suggestion about how i will do it.
    [email protected]

    Have you tried to implement MouseListener?

Maybe you are looking for

  • Problems setting logo - Forms 11g

    I've read the manuals, and followed instructions but still cannot get my company logo to appear in the top right hand section of the window bar for Forms 11g using just a image/icon of GIF/JPG file type in any of my directories on my Linux box. On th

  • Pesky pesky reoccuring "iTunes Setup assitant".

    what I have: -iTunes v. 7.6.0.29 -Windows vista -iPod touch I have the most recent iTunes build version 7.6.0.29 on my Vista Machine. No hacks, nothing unusual. Everything has worked fine until recently. I did not do anything that I can think in rega

  • Itunes burns all but purchased music

    I'm trying to burn a playlist of existing and purchased music, but each time it burns, it excludes the purchased music. I have never burned the purchased music before, so I haven't reached the 7 song limit, and I know I checked those boxes. The sugge

  • Power View returns incorrect totals on SSAS MD

    I have a very simple Power View report on top of SSAS MD. I have two measures - both not calculated: an average over time and a last-non-empty. When I slice the data, the totals are incorrect. For example, if I look at two months - June and July - th

  • Static LOV displays in Sorted order

    Hi Did anyone have come across using Static LOVs displays the display value in the Alphabetical sorted order for a radio button? Any resolution for this problem, I can change to Dynamic SQL using union with the dual table, just curious to know Cheers