Mouse object X & Y coordinates

Mouse object X and Y data members report the coordinates relative to
computer screen.
Is there a way to get mouse X and Y coordinates relative to Lookout
window similar to Panel object x and y data members?
Sergei

Hi John,
Unfortunately Mouse1.X & Y values will change when
you resize/move/drag the Lookout window.
In other words the mouse object x & y
members are relative to computer screen
while Panel object x and y members are
relative to Lookout window.
I don't think its very wise having
two different coordinate systems in Lookout.
At least there should be a way to get the Lookout
window position (offset) within the computer screen
to make any practical use of these different coordinate
systems.
Sergei
John Dunlop wrote:
> Hi,
>
> You could use an expression like :
>
> Mouse1.X-Panel1.X
>
> which puts it relative to the panel. But there isnt a Lookout system
> XY datamember. The panel XY members take this into account.
>
> John
>

Similar Messages

  • Find object's edge coordinates in After Effects

    Hello,
    first of all, I'm sorry if the answer to my question is already posted somewhere … I'm a bit confused I didn't just find one somewhere in the web already—don't know if I perhaps look for the wrong terms or if it's really such a special question I have …
    Anyway, my question is: how can I get the coordinates of all four edges from objects (images) in a three dimensional composing in After Effects? And also, is there a way to see the actual coordinates of the camera that I have moved by several parented objects?
    In case, this might be of interest, here's a more detailed description of my situation: I have made a little three dimensional composing in After Effects with scaled and rotated images an a moving camera. I want to show the composing within a tablet app and my first plan was to render it and put the movie into the app, but now my programmer and I think it might be better to generate the composing directly within the app. So my programmer needs the said coordinates to rebuild the composing in his code (as far as I know, he uses Xcode and writes the app in Objective-C).
    Hope you guys can help me …
    Cheers!
    Theo
    (I use After Effects CC on Mac OS X 10.9.)

    Edges/ lines are determined by the coordinates of their end points - basic planar geometry. You can get those by using the  toWorld() method and filling in the corner point coordinates relative to the layer anchor point, e.g.:
    TopRight2D=[50,-50];
    TopRight3D=thisLayer.toWorld(TopRight2D)
    Easy as Pi (or pie if you prefer).
    Mylenium

  • Mouse Drag Box & get coordinates

    Hi, is there a API to do this. If you click the mouse button and drag it I want a box to appear on the screen. When they release I want to get the coordinates of the box. I have seen it commonly done in programs like Photoshop and even in java applets on the web. I want to know if theres a API to do this before writing it myself. Thanks.

    should be possible using moue and mousemotion listeners.
    You check if currently a dragging happens and if so drawrect.
    It could get slow and make jumps if you have lots of graphic behind since you have to redraw that every time.

  • Is it possible to generate a mouse click at specific coordinates on the stage?

    Let's say x = 100 and y = 100. So, I have my main swf file that contains an external swf file with a button. Would it be possible to generate a mouse click on that button?
    Any help would be greately appreciated.

    You don't do it that way - you'd just tell the button to dispatch a CLICK MouseEvent and anything listening for the click would get it... something like:
    myButton.dispatchEvent(new Event(MouseEvent.CLICK));

  • How to query objects intersecting the coordinates

    Hi all,
    I am an Oracle Spatial Newbie. I made a search on the Google but could not find a simple answer for a simple question. I migrated my database from PostGIS to Oracle. I would like to learn the Oracle version of my PostGIS query:
    SELECT * from ykn WHERE ST_Intersects(poly, ST_MakeEnvelope(30.0, 37.792 , 30.1, 37.8,900914));
    All my records are converted to Oracle geometry type using a conversion tool. And also the R-tree index is added. I also would like to know how to query if the query has to be different to use the index.
    I'll be glad if you could help.
    Kindest Regards
    telmessos

    telmessos,
    By the way, what is the A here? I thought it is the table name and replaced A with YKN but got the same message."A" is an alias for the table YKN. You HAVE to use an alias whenever dereferencing the fields of any Oracle object. SDO_GEOMETRY
    is an Oracle object and sdo_srid is a field of that object so, to access its value you have to use an alias.
    Now, the original query - assuming the table sdo_geometry column is called POLY - didn't have an alias which would be confusing:
    select a.poly.sdo_srid from ykn where rownum < 2;
    -- Result
    ORA-00904 - "A"."POLY"."SRO_SRID": invalid identifier.What is missing here is the alias a after the table name YKN as in the following:
    select a.poly.sdo_srid from ykn a where rownum < 2;So, what we have is a rule
    Whenever accessing the fields / methods of an SDO_GEOMETRY we must:
    +1. Alias the table+
    +2. Use the alias when accessing column methods or fields eg <alias>.<column>.<field/method>+
    An example:
    select a.geom.sdo_gtype, a.geom.sdo_srid, a.geom.sdo_point.x, a.geom.sdo_point.y, a.geom.get_WKT() as wkt
      from projpoint2d a
    where rownum < 3;
    -- Results
    GEOM.SDO_GTYPE GEOM.SDO_SRID GEOM.SDO_POINT.X GEOM.SDO_POINT.Y WKT
    2001           NULL          363088.42        5405618          POINT (363088.42 5405618.0)
    2001           NULL          363202.85        5407375.46       POINT (363202.85 5407375.46)Note: All column above are fields of sdo_geometry except get_WKT() which is a method of sdo_geometry but still needs an alias to execute.
    HTH
    regards
    Simon

  • Using mouse click to return image coordinates.

    Ok so I've been trying to figure out how to do this and it seems very complicated for something that really seems straightforward.
    Anyway. I have a camera that updates an image object on the front panel using a while loop. I have another image object that is updated with a still image when the "snap" button is pressed. Now what I want to do is to click on a point in the snapped image and have the VI return the coordinates of that pixel in the image coordinate frame.
    What I've got so far is an event structure in the while loop with the following to occur in the event "image object -> mouse down":
    Server reference (reference to the image object) -> Property node (last mouse position) -> output screen coordinates.
    I've got two errors that don't make a whole lot of sense to me (I haven't worked with event structures before): "event data node contains unwired or bad terminal" and "event structure one or more event cases have no events defined". This second one seems strange since I don't actually want anything to happen if there's no mouse click. The first one seems to refer to the element box on the left hand side of the event structure.
    The above is my lastest attmpt at sorting this problem and as far as I can see it should work. whatever about the errors, am I even taking the right approach with this? I'd have thought image cordinates would be a common enough thing but search the boards here, it would appear not...
    Kinda stumped here. Any help is much appreciated.
    Message Edited by RoBoTzRaWsUm on 04-14-2009 08:34 AM
    Solved!
    Go to Solution.

    Hello RoBoTzRaWsUm,
    I have taken a look at your VI, which has been taking a correct approach to the data you are looking for.  As you are using and event structure, you should be looking for an event to occur.  When using a Property Node, you are trying read an attribute of a control.  However, in an Event Structure, I believe you should be using an Invoke Node.  An Invoke Node allows your to read an event or write a method with the Control Class in LabVIEW. 
    1. Place down and Invoke Node from the Functions Palette in 'Programming'->'Application Control'
    2. Wire your Image Control reference to it
    3. Click Method, and select 'Get Last Event'
    4. Right click on 'Which Events' and 'Create Constant'.  Make the constant '1' in the array
    5. Read the 'Coordinates' Cluster from the left hand side of the Event Case by right clicking  and 'Create Indicator'
    You will find a piece of example code attached.
    Regards
    George T.
    Applications Engineering Specialist
    National Instruments UK and Ireland
    Attachments:
    UKSupportMouseClick.vi ‏39 KB

  • Inappropriate mouse event coordinates in the WebKit of HTMLLoader/StageWebView

    Hi,
    We have a desktp application which incorporates an HTMLRichTextEditor (implemented in HTML/JS and loaded into AIR).
    We have run into a big problem with text selection though. It seems that the both the HTMLLoader and the StageWebView are passing wrong mouse coordinates to the WebKit when the cursor is outside of the component.
    I've created a sample application which uses mx:HTML (which is a wrapper of the HTMLLoader) and a WebView class (a wrapper aroun StageWebView reference to which is given here).
    The application is located here in Dropbox. The source code of the app is here.
    The app was built with Flex 4.6 and ran in AIR 3.7
    The sample app has a WebView which loads loremipsum and HTML loading some dummy local HTML page. The HTML page uses the JS->AIR bridge to report the mouseevents to a function in AIR. In the snapshot below the selection was started from the first row and then slowly continued to the left. As soon as it reaches the green area the selection changes unexpectably. As it can be seen in the bottom right -> the WebKit has received a mouse event with incorrect coordinates. The reported mouse coordinates seem to be the mouse coordinates within the green component and the selection behaves like that. If the mouse is moved to the blue - the selection changes again (according to the coordinates in the blue area).
    The component which uses the StageWebView behaves in absolutely the same way.
    I'd assume that I have to post a bug but I decided to post here at first.
    I've tried a few workarounds in order to stop and ongoing selection or to change it's behaviour but none of them with any relevant success. Even disabling mouse children for the entire application has no effect on the selection once it's started.
    Any help and/or comments would be much appreciated.
    Thanks !

    Thank you for the heads up.  Do you know if this is a recent change in behavior with AIR (ie. does this occur in previous versions)?  Regardless, could you please open a new bug report on this over at bugbase.adobe.com? 
    Once added, please post back with the URL so that others affected can add their comments and votes and I can follow up internally.
     

  • Mouse dragged event with unexpected coordinates

    I am dragging the mouse on a half circle from the middle left to the top middle. This results in mouse events with the coordinates form (10,90) ->(100,10)
    Letting the mouse go and then dragging it further to the left, the coordinates in the of the event are similar than the starting point of the first mouse drag event.
    Can anyone shed some light on this peculiar behavior?

    First of, I have to apologize for the example not being as minimalistic as it might be, but on the plus side, I know now why this happens, I just don't know how to work around it.
    * To change this license header, choose License Headers in Project Properties.
    * To change this template file, choose Tools | Templates
    * and open the template in the editor.
    package javafxtest;
    import java.util.ArrayList;
    import javafx.application.Application;
    import javafx.beans.property.DoubleProperty;
    import javafx.beans.property.SimpleDoubleProperty;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.geometry.Dimension2D;
    import javafx.geometry.Point2D;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.Label;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.StackPane;
    import javafx.scene.paint.Color;
    import javafx.scene.shape.Circle;
    import javafx.scene.shape.Polygon;
    import javafx.scene.shape.Rectangle;
    import javafx.scene.shape.Shape;
    import javafx.scene.transform.Rotate;
    import javafx.stage.Stage;
    * @author andi
    public class HandleRotation extends Application {
        private DoubleProperty currentRotation;
        private ArrayList<Double> angles;
        @Override
        public void start(Stage primaryStage) {
            currentRotation = new SimpleDoubleProperty(this, "currentRotation", 10);
            SteeringWheelGroup background = new SteeringWheelGroup(200);
            background.setManaged(false);
            Group g = new Group(background);
            final Point2D centerPoint = new Point2D(100, 100);
            angles = new ArrayList<>(3);
            angles.add(190.0);
            angles.add(270.0);
            angles.add(350.0);
            double step = (180.0 - 2 * currentRotation.doubleValue()) / (angles.size() - 1);
            int radius = 100;
            final int yTranslation = 15; // might be due to the labels
            Polygon handle = createHandle(centerPoint, radius, yTranslation);
            g.getChildren().add(handle);
            StackPane root = new StackPane();
            Scene scene = new Scene(g, 300, 250);
            primaryStage.setTitle("Handle Rotation!");
            primaryStage.setScene(scene);
            primaryStage.show();
         * Calculate the base point for the label. This is the point on the arc, matching the angle.
         * @param center point of the circle
         * @param radius radius of the circle
         * @param angle in degree in [0,180]
         * @return Point on the circle
        Point2D calculateBasePoint(Point2D center, double radius,
                double angle) {
            float newX = (float) (center.getX() + radius * Math.cos(Math.toRadians(angle)));
            float newY = (float) (center.getY() + radius * Math.sin(Math.toRadians(angle)));
            return new Point2D(newX, newY);
         * Create the polygon that represents the handle
         * @param centerPoint
         * @param radius
         * @return
        private Polygon createHandle(final Point2D centerPoint, int radius, final int yTranslation) {
            double baseAngle = 180;
            Point2D p1 = calculateBasePoint(centerPoint, radius, baseAngle - 5);
            Point2D p2 = calculateBasePoint(centerPoint, radius, baseAngle + 2);
            Point2D p3 = calculateBasePoint(centerPoint, radius*0.65, baseAngle + 2);
            Point2D p4 = calculateBasePoint(centerPoint, radius*0.65, baseAngle - 7);
            double[] points = {p1.getX(), p1.getY(), p2.getX(), p2.getY(), p3.getX(), p3.getY(), p4.getX(), p4.getY()};
                      Polygon polygon = new Polygon(points);
    //        polygon.setOpacity(0);
            polygon.setTranslateY(-yTranslation);
            final Rotate rotationTransform = new Rotate(currentRotation.doubleValue(), centerPoint.getX(), centerPoint.getY());
            polygon.getTransforms().add(rotationTransform);
            polygon.setOnMouseDragged(new EventHandler<MouseEvent>() {
                @Override
                public void handle(MouseEvent event) {
                    if (event.getY() < centerPoint.getY()) {
    System.out.println("Event: "+event);                   
                                                       Point2D point = new Point2D((float)event.getX(), (float)event.getY());
                        double newAngle = angleBetween2Lines(centerPoint, point);
                        if (newAngle < 0) {
                            newAngle = (90 + newAngle)+ 90;
    System.out.println("Set angle on mouse drag: "+newAngle);
                        if (newAngle < 10) {
                            newAngle = 10;
                        if (newAngle > 170) {
                            newAngle = 170;
                        currentRotation.set(newAngle);
            polygon.setOnMouseReleased(new EventHandler<MouseEvent>() {
                @Override
                public void handle(MouseEvent event) {
                    snapToNearestAngle();
                    rotationTransform.setAngle(currentRotation.doubleValue());
            return polygon;
         * Snap to the correct angle. Correct angle is angle belonging to the nearest label.
        void snapToNearestAngle() {
            double currentAngle = currentRotation.doubleValue() + 180;
            double currentMin = 360;
            int minIndex = 0;
    System.out.println("Current rotation is "+currentAngle);
            for (int i = 0; i < angles.size(); i++) {
                double angle = angles.get(i);
                double diff = Math.abs(angle - currentAngle);
                if (diff < currentMin) {
                    currentMin = diff;
                    minIndex = i;
    System.out.println("new minDifference at "+i+": "+diff);
            Double destinationAngle = angles.get(minIndex);
    System.out.println("DestinationAngle is "+currentAngle+" -> "+(destinationAngle - 180));
            if (destinationAngle < 180 + 10 || destinationAngle > 360 - 10) {
                throw new IllegalStateException("Angle is out of range: "+currentRotation.doubleValue()+" -> "+destinationAngle);
            currentRotation.set(destinationAngle - 180);
         * Calculate the angle between the vector horizontally to the left from the center
         * and the current point.
         * @param center point
         * @param point current point
         * @return angle in degree
        double angleBetween2Lines(Point2D center, Point2D point) {
            double slope2 = calculateSlope(center, point);
            double angle = Math.atan(slope2);
            if (point.getX() > center.getX()) {
                angle += Math.PI/2;
    System.out.println("Slope: "+slope2+" angle "+Math.toDegrees(angle));
            return Math.abs(Math.toDegrees(angle));
         * Caluculate the slope of the line defined by two points.
         * The first point is the center of a circle and the second
         * point roughly lies on the circle.
         * @param center point
         * @param point on the circle
         * @return slope of the connecting line.
        double calculateSlope(Point2D center, Point2D point) {
    System.out.println("center="+center+",point="+point);       
            double absSlope = Math.abs((point.getY() - center.getY()) / (point.getX() - center.getX()));
            if (point.getY() > center.getY()) {
                if (point.getX() > center.getX()) {
                    // bottom right
                    return -absSlope;
                } else {
                    // bottom left
                    return absSlope;
            } else {
                if (point.getX() > center.getX()) {
                    // top right
                    return absSlope;
                } else {
                    // top left
                    return -absSlope;
         * The main() method is ignored in correctly deployed JavaFX application.
         * main() serves only as fallback in case the application can not be
         * launched through deployment artifacts, e.g., in IDEs with limited FX
         * support. NetBeans ignores main().
         * @param args the command line arguments
        public static void main(String[] args) {
            launch(args);
       private class SteeringWheelGroup extends Group {
            public SteeringWheelGroup(int destinationWidth) {
                int topPadding = 0;
                Rectangle rect = new Rectangle(getImageWidth(), getImageWidth(), Color.RED);
                double scale = destinationWidth / rect.getWidth();
                rect.setScaleX(scale);
                rect.setScaleY(scale);
                Circle circle = new Circle(getImageWidth()/2, getImageWidth()/2, getImageWidth()/2, Color.BLUE);
                circle.setScaleX(scale);
                circle.setScaleY(scale);
                Group rotationGroup = new Group(/*rect,*/ circle);
                rotationGroup.setManaged(false);
                int width = getImageWidth();
                Rectangle clipRectangle = new Rectangle(0, 0, width, width / 2);
                Circle clipCircle = new Circle(width / 2, width / 2, width / 2);
                Shape clip = Shape.intersect(clipRectangle, clipCircle);
                rotationGroup.setClip(clip);
                this.getChildren().add(rotationGroup);
                //double h = calculateHeigthOverHorizon(angle, destinationWidth/2);
                //setTranslateY(-h+topPadding);
            public final int getImageWidth() {
                return 479;
    Here is how you can reproduce my effect:
    Grab the black handle
    Drag the mouse top and right until you approach the angle -90 (have an eye out on the console log)
    Let the mouse go: the handle will snap to 90 degree
    Grab the handle a second time and move further right
    You will see that the angle printed out do not match what you expect.
    Let the mouse go, the Handle snaps back to it's original position
    As the rotation does not happen around the polygon's center, I have to use a Rotaion effect, which is applied. While I can drag the shape from the rotated location the dragging is always measured from its base position.
    So what can I do to work around this?
    final Rotate rotationTransform = new Rotate(currentRotation.doubleValue(), centerPoint.getX(), centerPoint.getY());
    polygon.getTransforms().add(rotationTransform);
    If worse comes to worst, I can use a circular handle covering everything, then I can rotate around its center, but I would like to avoid this.

  • LineChart mouse coordinates

    Hi. How can I convert coordinates of mouse cursor to chart coordinates ?
    This code works, but gives shift error:
    x = chartAxisX.getValueForDisplay(chartAxisX.parentToLocal(event.getX,0).getX).doubleValue
    y = chartAxisY.getValueForDisplay(chartAxisY.parentToLocal(0, event.getY).getY).doubleValue
    Edited by: 997053 on Mar 29, 2013 2:55 PM

    stopped on this code:
    axisX.getValueForDisplay(e.getX - (axisY.getTickLength axisX.getLayoutX)).doubleValue+
    axisY.getValueForDisplay(e.getY - (axisX.getTickLength axisY.getLayoutY)).doubleValue+

  • Default times of mouse and typing objects

    After recording a demo movie, one task that I very often have
    to do is to shorten the times of certain objects, e.g. in order to
    acelerate mouse movements and typing (default time for mouse
    objects seems to be about 1.5 secs). Unfortunately, I have to do
    the adaptations in the timelines in a slide by slide manner.
    My question:
    is there a more efficient way for such a task (e.g. applying
    changes to many objects at a time), or maybe better, can I change
    the default times for objects somewhere in the recording
    preferences?
    Thanks,
    Peter

    Hi Peter and welcome to our community
    Unfortunately there is nowhere currently in Captivate to
    specify default times. You can certainly suggest it to the
    development team by
    Clicking
    this handy little link right here.
    As for that "apply to all", this will be hit and miss.
    Doesn't always work quite like you think it should, due to slide
    timings and whatnot.
    Cheers... Rick

  • Multiple Buttons in JTable Headers:  Listening for Mouse Clicks

    I am writing a table which has table headers that contain multiple buttons. For the header cells, I am using a custom cell renderer which extends JPanel. A JLabel and JButtons are added to the JPanel.
    Unfortunately, the buttons do not do anything. (Clicking in the area of a button doesn't appear to have any effect; the button doesn't appear to be pressed.)
    Looking through the archives, I read a suggestion that the way to solve this problem is to listen for mouse clicks on the table header and then determine whether the mouse clicks fall in the area of the button. However, I cannot seem to get coordinates for the button that match the coordinates I see for mouse clicks.
    The coordinates for mouse clicks seem to be relative to the top left corner of the table header (which would match the specification for mouse listeners). I haven't figured out how to get corresponding coordinates for the button. The coordinates returned by JButton.getBounds() seem to be relative to the top left corner of the panel. I hoped I could just add those to the coordinates for the panel to get coordinates relative to the table header, but JPanel.getBounds() gives me negative numbers for x and y (?!?). JPanel.getLocation() gives me the same negative numbers. When I tried JPanel.getLocationOnScreen(), I get an IllegalComponentStateException:
    Exception in thread "AWT-EventQueue-0" java.awt.IllegalComponentStateException: component must be showing on the screen to determine its location
    Can someone tell me how to get coordinates for the button on the JTableHeader? Or is there an easier way to do this (some way to make the buttons actually work so I can just use an ActionListener like I normally would)?
    Here is relevant code:
    public class MyTableHeaderRenderer extends JPanel implements TableCellRenderer {
    public MyTableHeaderRenderer() {
      setOpaque(true);
      // ... set colors...
      setBorder(UIManager.getBorder("TableHeader.cellBorder"));
      setLayout(new FlowLayout(FlowLayout.LEADING));
      setAlignmentY(Component.CENTER_ALIGNMENT);
    public Component getTableCellRendererComponent(JTable table,
                                                     Object value,
                                                     boolean isSelected,
                                                     boolean hasFocus,
                                                     int row,
                                                     int column){
      if (table != null){
        removeAll();
        String valueString = (value == null) ? "" : value.toString();
        add(new JLabel(valueString));
        Insets zeroInsets = new Insets(0, 0, 0, 0);
        final JButton sortAscendingButton = new JButton("1");
        sortAscendingButton.setMargin(zeroInsets);
        table.getTableHeader().addMouseListener(new MouseAdapter(){
          public void mouseClicked(MouseEvent e) {
            Rectangle buttonBounds = sortAscendingButton.getBounds();
            Rectangle panelBounds = MyTableHeaderRenderer.this.getBounds();
            System.out.println(Revising based on (" + panelBounds.x + ", "
                               + panelBounds.y + ")...");
            buttonBounds.translate(panelBounds.x, panelBounds.y);
            if (buttonBounds.contains(e.getX(), e.getY())){  // The click was on this button.
              System.out.println("Calling sortAscending...");
              ((MyTableModel) table.getModel()).sortAscending(column);
            else{
              System.out.println("(" + e.getX() + ", " + e.getY() + ") is not within "
                                 + sortAscendingButton.getBounds() + " [ revised to " + buttonBounds + "].");
        sortAscendingButton.setEnabled(true);
        add(sortAscendingButton);
        JButton button2 = new JButton("2");
        button2.setMargin(zeroInsets);
        add(button2);
        //etc
      return this;
    }

    I found a solution to this: It's the getHeaderRect method in class JTableHeader.
    table.getTableHeader().addMouseListener(new MouseAdapter(){
      public void mouseClicked(MouseEvent e) {
        Rectangle panelBounds = table.getTableHeader().getHeaderRect(column);
        Rectangle buttonBounds = sortAscendingButton.getBounds();
        buttonBounds.translate(panelBounds.x, panelBounds.y);
        if (buttonBounds.contains(e.getX(), e.getY()) && processedEvents.add(e)){  // The click was on this button.
          ((MyTableModel) table.getModel()).sortAscending(column);
    });

  • Local to global coordinates...

    Hi all... How do I translate local coordinates from within an object to global coordinates in respect to the frame of the application....
    Im trying to implement mouse dragging on a number of objects within a JFrame. Im applying the listeners to the individual objects, but want to move it in respect to the frame....
    Is there a way to get the coordinates of the mouse in respect of the frame, even though the listener is attached to the object...
    Thanks in advance... Oh, and sorry if this post is badly written, my gf is distracting me lol...

    getX and getY will give you the position relative to the parent component. There may be some methods for position relative to the containing Window - take a look around SwingUtilities and Toolkit.

  • Hiding the Mouse on Start of Movie

    Hello All,
    I have a flash program that runs on a PC that is connected to a TV. In case it helps at all, the PC is running OpenSuSE 12.1/KDE 4.
    The PC is acting as a kiosk like device where no user is actually sitting at the PC doing stuff. If we ever need to do anything with it
    we do it remotley using something like VNC or Remote Desktop or SSH, etc....
    So what happens is when the PC is powered on it boots up and automatically logs in the default user. Then I set Firefox to start
    automatically on boot and I set it's Homepage to the URL where the swf file lives (*which is located on another Server). Also, Firefox
    automatically goes into Fullscreen mode mode using the Firefox Plugin "Full Fulscreen".
    The issue is that, after the PC boots up and Firefox starts and the Flash movie begins playing, I can see the Mouse pointer sitting in the
    middle of the screen which does NOT go away. So I found some code online that will hide the mouse after 'n' seconds. But the problem
    is that when the Flash movie starts the mouse will NOT disappear after 'n' seconds. It is possible to get it to disappear, but in order to do
    so I would have to tap the mouse so that it moves even the slightest, then after it stops moving it then disappears after 'n' seconds...
    Since there really isn't any person who starts the movie manually, or since no one sitting in front of it with a mouse in their hand this won't
    do what I wanted it to do....
    Here is what I have so far in order to hide the mouse:
    // Added this line after testing the code below. But still didn't hide the pointer when the movie was started
    //Mouse.hide();                   // Hide the mouse automatically when started (*no time limit for this one)
    var timeLimit:int = 3;         // Integer to hold what the Time Limit will be
    // Add the EventListener for when the Mouse is moved:
    stage.addEventListener(MouseEvent.MOUSE_MOVE, onMove);
    // Create a Timer Object and multiply timeLimit by 1000 to get seconds:
    var timer:Timer = new Timer(timeLimit * 1000);
    // Add the EventListener for the Timer:
    timer.addEventListener(TimerEvent.TIMER, onInactiveMouse);
    // Function "onMove()":
    //        *This will show the Mouse, stop the timer, then restart the timer...
    function onMove(event:MouseEvent):void {
            trace("In onMove() --- Showing the Mouse Now...");
            Mouse.show();
            timer.stop();
            timer.start();
    // Function "onInactiveMouse()":
    //        *This will hide the Mouse when the TimeLimit has been reached...
    function onInactiveMouse(event:TimerEvent):void {
            trace("In onInactiveMouse() --- Hiding the Mouse Now...");
            Mouse.hide();
    So I guess my question is, is there a way to hide the mouse without a Human having to intervene and move the mouse pointer?
    Also, I don't know if it was just some weird thing that happens, but say the movie is up and I move the mouse so it then disappears after n seconds.
    Then the Frame changes and under where the mouse is hiding a TextField appears (*NOT an input TextField, just a Dynamic Text) suddenly the mouse
    reappears, but it appears as the text selection pointer (*i.e. the one that looks like an Upper-Case "i"). And it won't disappear unless I move the pointer
    again, Strange..!  I guess I could fix this by changing all my TextFields to be NOT selectable, but I was just curious if anyone else had experienced this?
    Anyway, any thoughts/suggestions would be greatly appreciated!
    Thanks in Advance,
    Matt

    I decided which way I'm going to go with this and it seems to be doing the trick
    I'm using this C/C++ program I found online, which I eneded up tweeking a little bit since it was a pretty old code so some things were
    a bit out dated like the libraries, and a few other things. It uses the "X11" library in order to access elements of the screen including input
    devices like the mouse and keyboard.
    You simply execute the command on the CLI and pass it an X and Y Coordinate. Then once executed it will simply move the mouse to those
    coordniates specified, and apparently emulate a Right-Click from the mouse. I'm not exactly sure if it will actually do the right-click, but for my
    purposes just moving the mouse ever so slightly will be enough to bring the Flash Movie inside Firefox into focus.
    I then created a simple Shell Script which will run on boot up and will sit in a loop checking if Firefox is running, if it is found running, then it waits
    about 10 seconds or so, then executes the "clickMouse" program and moves the mouse to the specified coordinates. I tested it once or twice
    and it seems to be doing the trick.
    Here is the uncompilied code for the C program:
         *Once compilied you execute the program and pass it an X and Y Coordinate like this -->   "./clickMouse 1000 500"
    #include <X11/Xlib.h>
    #include<stdio.h>
    #include<unistd.h>
    #include <stdlib.h>
    #include <string.h>
    #include <unistd.h>
    #include <X11/Xlib.h>
    #include <X11/Xutil.h>
    void mouseClick(int button)
        Display *display = XOpenDisplay(NULL);
        XEvent event;
        if(display == NULL)
            fprintf(stderr, "Errore nell'apertura del Display !!!\n");
            exit(EXIT_FAILURE);
        memset(&event, 0x00, sizeof(event));
        event.type = ButtonPress;
        event.xbutton.button = button;
        event.xbutton.same_screen = True;
        XQueryPointer(display, RootWindow(display, DefaultScreen(display)), &event.xbutton.root, &event.xbutton.window, &event.xbutton.x_root, &event.xbutton.y_root, &event.xbutton.x, &event.xbutton.y, &event.xbutton.state);
        event.xbutton.subwindow = event.xbutton.window;
        while(event.xbutton.subwindow)
            event.xbutton.window = event.xbutton.subwindow;
            XQueryPointer(display, event.xbutton.window, &event.xbutton.root, &event.xbutton.subwindow, &event.xbutton.x_root, &event.xbutton.y_root, &event.xbutton.x, &event.xbutton.y, &event.xbutton.state);
        if(XSendEvent(display, PointerWindow, True, 0xfff, &event) == 0) fprintf(stderr, "Error\n");
        XFlush(display);
        usleep(100000);
        event.type = ButtonRelease;
        event.xbutton.state = 0x100;
        if(XSendEvent(display, PointerWindow, True, 0xfff, &event) == 0) fprintf(stderr, "Error\n");
        XFlush(display);
        XCloseDisplay(display);
    int main(int argc,char * argv[])
         int i=0;
         int x , y;
         x=atoi(argv[1]);
         y=atoi(argv[2]);
         Display *display = XOpenDisplay(0)
         Window root = DefaultRootWindow(display);
         XWarpPointer(display, None, root, 0, 0, 0, 0, x, y);
         mouseClick(Button1);
         XFlush(display);
         XCloseDisplay(display);
         return 0;
    I'm not too proficient in C, a little bit more in C++, so I didn't realy change much from the original code except add a "main()" section to this one in order
    to execute the "mouseClick()" function.
    F.Y.I.
    I kept the Actionscript code for the Mouse.hide() stuff, so this C program works with the Mouse.hide() code...
    Thanks Again,
    Matt

  • Mouse Over Behaviour

    I am currently developing a toolbar application and have an
    issue with mouse events.
    Currently there is a parent canvas which has a mouseOut event
    where the canvas is hidden. Within that canvas there is a Hbox
    which contains images which have an mouse click event. When I mouse
    over the image it triggers the parent MouseOut event.
    having looked at
    http://nondocs.blogspot.com/2007/04/flexfaqmouseevents.html
    but it does not resolve the problem. having also tried to identify
    the event.target.id but it does not register for the imagme
    mouseOver and gives exception errors.
    Anybody got any ideas for the HBox child does not trigger the
    MouseOut event. Also tried switching it to a button.
    I would really like to not have to hack a solution with using
    the mouse x and y coordinates.
    Hope somebody can help Im going round in circles.
    Thanks

    The mouse events are very low-level and fire in unexpected
    ways.
    Usually you should use the rollOver and rollOut events. The
    seem to be better behaved.
    Tracy

  • Moving objects in Keynote, always aligning

    Okay, updated to ML (from SL) and updated my Keynote. And now I'm annoyed.
    Prior to the update, I had precise control over my arrangement of objects when designing a slide.
    Now, when using the mouse, objects jerk around the slide to align themselves with other objects (which is not always what I want).
    I still have control with the arrow keys, but now it's a two-step process to get objects exactly where I want them.
    Help returning things back to normal?

    Adjust the options in Keynote > Preferences > Rulers until it's to your liking.  Or you can temporarily disable alignment guides if you hold down the Control key while dragging an object
    Shane

Maybe you are looking for

  • Install-Failure: Adobe Creative Cloud Desktop App

    Hi I can't install the update of the cc desktop app (win 8.1). There is no link and no failure-code or message which helps to understand the problems or search for a solution. There is just an alert-message about the fact of the failure and the closi

  • WSS without incoming/outgoing signature or encryption

    Hi all, I have got a problem with the SOAP receiver adapter on PI 7.1. If have configured the securtiy profile: Web Services Security on the SOAP receiver adapter. On the related receiver agreements I have chosen the Oasis security standard. As reque

  • Lazy Alluminium Apple 23 inch Monitor

    ... it's lazy or maybe i miss something?..... after a while it dies... and I cant't turn it back on.... how comes? .... some days it did not turn on at all..... i tryied to change te alimentation cable but.. without any change

  • Creation of Tab pages in a form in C#

    Hi Experts, I would like to create an 2-3 diffetent tab pages in a single form in SAP B1.(like as we have differrent tabs in a windows) I am quit new to this, can any one help me here providing the keywords, function ect.. It wold be really helfull i

  • Check for existance

    How do you check to see if the element exists for a node?  I have a node singleton=true cardinality=0..1 selection=0..1 I use this to create it IPublicManagerMassRosterCust.IManagerElement elem = wdContext.nodeManager().createManagerElement(); How do