How to display mouse coordinates???

I wanted to display my custom cursors x and y coordinates on
my movie. It seems like it should only be a few lines of
actionscript but I can't seem to figure it out. Has anyone done
this. If so I would appreciate some help. Thx
I am using Flash MX by the way

create 2 dynText - instance name : xcoord, ycoord
_root.onEnterFrame = function (){
xcoord.text = _root._xmouse;
ycoord.text = _root._ymouse;
that's all !

Similar Messages

  • How to display matrix coordinates

    Hello,
    I'm wondering if anyone can help me with this topic. I have a screen on a GUI displaying a molecule. A 'myMouseRotate' method is used to allow the user rotate the molecule with the mouse. The user rotates the molecule which begings at coordinates 1, 0, 0
    0, 1, 0
    0, 0, 1
    When the user rotates the molecule the coordinates change. I am trying to display these coordinates each time they are changed. I cannot find any method for getting these values back. Is there a 'getTranslation' method? Below is some of the code for rotating the molecule. Any help would really be appreciated. Thanks
    mcbs
    public BranchGroup createSceneGraph(SimpleUniverse u) {
    float scale = 75;
         float yshift = 0;
         float zshift = 0;
         //Create the root of the branch graph
         BranchGroup objRoot = new BranchGroup();
         TransformGroup objRotate = new TransformGroup();
         objRotate.setCapabilit(TransformGroup.ALLOW_TRANSFORM_WRITE);
         objRotate.setCapability(TransformGroup.ALLOW_TRANSFORM_READ);
         MouseRotate myMouseRotate = new MouseRotate();
         myMouseRotate.setTransformGroup(objRotate);
    myMouseRotate.setSchedulingBounds(new BoundingSphere());
         objRoot.addChild(myMouseRotate);
    objRoot.addChild(objRotate);

    Thanks for replying. I have tried the code you suggsted but it doesn't seem to recognise 'MyMouseRotate'. When I use
    MouseRotate MyMouseRotate = new MouseRotate();
    it says
    getTransformGroup() in com.sun.j3d.utils.behaviors.mouse.Mouse
    Behavior cannot be applied to (javax.media.j3d.TransformGroup)
    MyMouseRotate.getTransformGroup(TG);
    Any more suggestions possibly? Thanks again, I really appreciate it.

  • How to find mouse coordinates when mouse pointer is outside of app screen?

    Hello folks,
    Does anyone know, how in a Swing/AWT app to find out the screen coordinates
    of the mouse pointer when the mouse pointer is outside of the app screen?
    Would appreciate your comments.
    Tim

    MouseInfo does work - thanks a lot for your hint!
    I wasn't aware of this class actually because normally use 1.4.2.
    Good time to switch :-)

  • How to strore mouse coordinates in array

    Hi,
    I am using LaptopTouchpad to get cursor coordinates. I need to track all the coordinates while the cursor moving. But i am getting only present coordinates. i thought that to track coordinates, i need to store in an array. while doing that i am getting only present coordinates in all the index position of array.

    Post your VI so we can see how you are doing it now.

  • About get mouse coordinates on screen?

    how to get mouse coordinates in java, i don't look for a appropriate method.

    The MouseEvent which is given to the MouseMotionListener or the MouseListener has one getX() and one getY() method. That are the coordinates in your applicetion window starting with (0,0) in the upper left corner.
    Hope this helps
    Markus

  • How to display xy coordintes of drag and drop movie

    can someone tell me how to display the coordinates of the red
    cirle shown in the drag and drop tutorial found here:
    http://www.flashvalley.com/fv_tutorials/advanced_drag_and_drop_in_Flash/
    I have done this tutorial just fine but dont know how to
    display its x and y coordinatetes in a dynamic text box as i move
    the red circle around the screen.
    thank you for any assistance you may give.
    steve

    Hi kglad,
    I dont suppose you could show me how to create the loop? My
    own research seems to indicate the onEnterFrame method would be
    easiest.
    I am just a beginner and even this is still beyond me.
    thanks

  • How to make a robot roam and simultaneously display its coordinate using other vi

    Hi i am using Cricket to find the coordinates of moving robot as my receiver is attached to the robot.I made a vi which can extract the exact coordinates using my CRICKET sensor data.How to move a robot and simultaneously display its coordinates.In turn moving the robot usin roaming Vi as well as same time my VI display its coordinate.

    Hi,
    Is this an NXT robot and are you deploying your code on the robot?  Are you running the robot from a VI on you PC using blue tooth, etc... ?
    If you are running both VI's in LabVIEW you can use parallel loops.  If they have to communicate with each other, then you have to decide which approach to use with parallel loop communication.  Like simple variables or more complex choices like queue, etc...
    Can you provide more information about your system and version of LabVIEW?
    Mark Ramsdale

  • How to find out the mouse Coordinates

    How can I find out the mouse coordinates, where I am clicking on the screen.
    I tried to use MouseEvent e, e.getX() and e.getY() but it is giving that particular components X,Y coordinates

    In SwingUtilities there is a method called that can be used to convert a local location to a screen location.
    public static void convertPointToScreen(Point p,
    Component c)
    Convert a point from a component's coordinate system to screen coordinates.
    Parameters:
    p - a Point object (converted to the new coordinate system)
    c - a Component object

  • In Photoshop CS6 how do I turn off the move tool popup showing the mouse coordinates?

    I just installed Creative Suite CS6 and in Photoshop, when I use the move tool a small popup window shows the mouse coordinates. I can't see any option to turn this off, either in the Options bar or the Preferences. It's really annoying. Can someone please help?
    Thanks,
    Joanne

    Thank you so much! Sometimes I miss the lack of user manuals but I know it saves trees.

  • How to display a seperate right click menu for each item of a tree control?

    Hi I want to display a specific right click menu when a particular tree item is selected. I know how to create a menu and how to display it. I am using the function GetLabelFromIndex() to get the active tree item and then compare the label and based on the result display a manu for that item. Now my problem is that when I use the above function in the EVENT_RIGHT_CLICK it gives me the error "the Index passed is out of range" while using the same function with the same arguments in EVENT_SELECTION_CHANGE it gives no error...below is the part of my code
    case EVENT_RIGHT_CLICK:
    GetLabelFromIndex(panelHandle, PANEL_TREE, eventData2, label1);
    //The function gives the stated error here
    if(eventData1)//after it I compare the result and display the menu
    case EVENT_SELECTION_CHANGE:
    GetLabelFromIndex (panelHandle, PANEL_TREE, eventData2, label1);
    //The function works fine here
    if (eventData1)
     If any one have any idea whats going on or alternate way of doing this Please share knowledge...Thanks
    If you are young work to Learn, not to earn.

    Hi,
    one possible approach of solving this problem is looking closer at the error message: The error "the Index passed is out of range" tells you that something is wrong with the index, either it is too small or too large So why don't you set a breakpoint and check the index value, it might be useful information...
    The other hint is to check the meaning of eventdata2 (using the help): It is different for different events! For the event_right_click it gives the horizontal mouse position, not the index as event_selection_change does...

  • How to display non-URL-based thumbnail images in JTable

    I'm trying to display thumbnail images as a tooltip popup for certain cells in a JTable. The thumbnail images are java image objects that have been retrieved dynamically as the result of a separate process--there is no associated URL. For this reason, I can't use the setToolTipText() method of the JTable.
    My attempts to JTable's createToolTip() method also failed as it seems the ToolTipManager never calls this method for a JTable.
    As a workaround, I've added a MouseMotionListener to the JTable that detects when the mouse is over the desired table cells. However, I'm not sure how to display the popup over the JTable. The only component that I can get to display over the JTable is a JPopupMenu, but I don't want to display a menu--just the image. Can anyone suggest a way to display a small popup image over the table?
    Thanks.

    Thank You Rodney. This explains why my createToolTip() method wasn't being called, but unfortunately I'm no closer to my goal of displaying a true custom tooltip using a non-URL image rather than a text string. If I make a call to setToolTipText(), at any point, the text argument becomes the tooltip and everything I have tried in createToolTip() has no effect. However, as you pointed out, if I don't call setToolTipText(), the table is not registered with the tooltip manager and createToolTip() is never even called.
    To help clarify, I have attached an SSCCE below. Please note that I use a URL image only for testing. In my actual application, the images are available only as Java objects--there are no URLs.
    import javax.swing.*;
    import java.awt.*;
    import java.net.URL;
    import java.net.MalformedURLException;
    public class Test {
        static Object[][] data = {
                {"Cell 0,0", "Cell 0,1"},
                {"Cell 1,0", "Cell 1,1"}};
        static String[] columnNames = {"Column 0", "Column 1"};
        static JFrame frame;
        static String testImageURLName = "http://l.yimg.com/k/omg/us/img/7c/0a/4009_4182164952.jpg";
        static JTable testTable = new JTable(data, columnNames) {
            public JToolTip createToolTip() {
                System.out.println("testTable.createToolTip() called");
                Image testImage = getTestImage();
                // this.setToolTipText("Table ToolTip Text");
                JLabel customTipLabel = new JLabel(new ImageIcon(testImage));
                customTipLabel.setToolTipText("Custom ToolTip Text");
                JToolTip parentTip = super.createToolTip();
                parentTip.setComponent(customTipLabel);
                return parentTip;
        // This image is loaded from a URL only for test purposes!!!
        // Ordinarily, the image object would come from the application
        // and no URL would be available.
        public static Image getTestImage() {
            try {
                URL iconURL = new URL(testImageURLName);
                ImageIcon icon = new ImageIcon(iconURL);
                return icon.getImage();
            catch (MalformedURLException ex) {
                JOptionPane.showMessageDialog(frame,
                        "Set variable \"testImageName\" to a valid file name");
                System.exit(1);
            return null;
        public static void main(String[] args) throws Exception {
            frame = new JFrame("Test Table");
            frame.setSize(300, 100);
            // Set tool tip text so that table is registered w/ tool tip manager
            testTable.setToolTipText("main tooltip");
            frame.getContentPane().add(testTable);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setVisible(true);
    }

  • How to display a select query record in a tool tip?

    hi,
    How to display a select query record in a tool tip?
    for example i have a report employee. when i move the mouse pointer over a employee name, the tool tip should display the respective department id, department name...of that employee name.
    select dep_id, dep_name ....from department where employee.....Is it possible?
    thanks

    Dear Skud,
    Yes its possible..select ''||ename||'' from emp
    other wise you can use jQuery tooptip or some other JScript bundles.
    Thanks and Regards
    Maheswara

  • How to calculate the coordinate after implementing Affine Transformation?

    Hi, guys!!
    I am working on a Map makeing program, like MS Visio. Then, I need to put an icon on the working space. And the icon can be moved, rotated, and scaled, when mouse drags handles (8 small circles) around the icon. However, the problem is that after the icon is scaled or rotated using AffineTransform class, I do not know how to calculate the coordinate to paint the mouse handles.
    Please give me your suggestions!! Thanks in advance!!

    Sure. The idea is that you track your translations, scaling, and rotation separate from the AffineTransform. That way, you know what you need to revert:
    AffineTransform at = new AffineTransform();
    at.translate(20, 20);
    at.scale(2, 2);
    at.rotate(45, 10, 10);
    At this point, let's assume you want to translate again. First you have revert the rotation and the scale:
    at.rotate(-45, 10, 10);
    at.scale(1/2, 1/2);
    at.translate(10, 10);
    In order to do this, you need to track your scaling and rotation values when you change them. If this isn't feasible, it's certainly possible to derive the values from the AffineTransform, but that's a bit tougher.
    Michael

  • How to set GPS coordinates directly for a photo

    I use places extensively and tag my photos using the Aperture Places.
    Photos taken at the same location as another photo are easily dealt with using lift/stamp metadata.
    However for some photos I only have the GPS coordinates. E.g. from a dive trip, where Google Maps doesn't help.
    Then I'm stuck with a bunch of photos for which I have no direct way of entering the coordinates.
    So far my workaround have been to use Houdahgeo:
    - Enter coordinates directly on a dummy photo
    - Import dummy photo in Aperture
    - Use lift/stamp metadata to transfer coordinates to my photos
    I wonder if this is really the easiest workaround?
    Another workaround would be to:
    - Create a GPS track file with the coordinates
    - Import GPS track to Aperture Places
    - Place my photos on top of the imported track
    However I'm not aware of how to make an GPS track file and I don't know if Aperture can handle a GPS track with only one point.
    Is there a more direct way setting the coordinates?

    Thanks that helped a lot.
    When coordinates are entered using N/S/E/W Google will return the nearest place to that location. E.g. :
        8.847772 N 119.9123111 E
    Returns Mimaropa somewhere in the Sulu Sea, but hundreds of kilometers from the coordinates in the example above.
    To get dead on accurate positioning the coordinates have to be entered in decimal format. E.g.:
        8.847772, 119.9123111
    Which lands me near Tubbataha Reef in the Sulu Sea.
    So what I do now is to
    Manage My Places
    Enter the lat, long coordinates in decimal form in the search
    Wait for Google to display the coordinates
    Select it and press + to add the location to My Places
    Assign a place name for the dive site
    When that's done it is a breeze assigning the dive site to my photos

  • How to display polygons both with line contour and filled interior?

    How to display polygons both with line contour and filled interior?
    Java3D 1.3, Java 1.4.1-rc

    Hi,
    I just started with Java3D last week.
    I assume you mean drawing polygons with outlines (wireframe) in one color and polygon face filling with another color. If so, I've got the same question! (I usually think of "contour" to refers to plotting surface intensity of independent data like temperature or elevation, but I don't think you mean this.)
    The only solution I've found so far is to make two shapes with the same geometry.
    Here's an example - an outlined and filled cube. I made it using a generalize class DualShape which is two shapes with the same geometry, but one filled and one as a line.
    It works, although I can't say I understand the setPolygonOffset(), knowing what value to set. Without the command, the depthbuffer can't consistently decide which should be in front between the fills and lines so it looks bad.
    I certainly think it would be nicer to do both internally, like:
    pa.setPolygonMode(pa.POLYGON_LINE || pa.POLYGON_FILL);
    And then have setFillColor and setLineColor for each.
    I don't know why they don't allow this - maybe OpenGL can't do it like this so Java3D follows.
    If anyone has any better ideas I'd like to hear about it.
    Tom Ruen
    class DualCube extends DualShape // cube with outline and fill colors
    public DualCube(float ax, float ay, float az, //cube lower corner
    float bx, float by, float bz, //cube upper corner
    float br, float bg, float bb, //border color
    float fr, float fg, float fb) //fill color
    setGeometry(new CubeGeometry(ax,ay,az,bx,by,bz),br,bg,bb,fr,fg,fb);
    class DualShape extends BranchGroup //general shape with outline and fill colors
    Appearance ap1,ap2;
    PolygonAttributes pa1,pa2;
    ColoringAttributes ca1,ca2;
    Shape3D s1,s2;
    public void setGeometry(Geometry geo, float br, float bg, float bb, float fr, float fg, float fb)
    //filled shape:
    addChild(s1=new Shape3D(geo, ap1=new Appearance()));
    ap1.setPolygonAttributes(pa1=new PolygonAttributes()); pa1.setPolygonMode(pa1.POLYGON_FILL);
    ap1.setColoringAttributes(ca1=new ColoringAttributes()); ca1.setColor(fr,fg,fb);
    //lined (wire) shape:
    addChild(s2=new Shape3D(geo, ap2=new Appearance()));
    ap2.setPolygonAttributes(pa2=new PolygonAttributes()); pa2.setPolygonMode(pa2.POLYGON_LINE);
    ap2.setColoringAttributes(ca2=new ColoringAttributes()); ca2.setColor(br,bg,bb);
    pa2.setPolygonOffset(-1000); //Uncertain what "float" value to use!
    class CubeGeometry extends IndexedQuadArray //cube geometry data
    private static final int[] faces =
    0,3,2,1,
    0,1,5,4,
    1,2,6,5,
    2,3,7,6,
    3,0,4,7,
    4,5,6,7
    private static float[] verts = new float[24];
    public CubeGeometry(float ax, float ay, float az, //lower limit
    float bx, float by, float bz) //upper limit
    super(8, IndexedQuadArray.COORDINATES , 24);
    int n;
    n=0; verts[n]=ax; verts[n+1]=ay; verts[n+2]=az;
    n=3; verts[n]=bx; verts[n+1]=ay; verts[n+2]=az;
    n=6; verts[n]=bx; verts[n+1]=by; verts[n+2]=az;
    n=9; verts[n]=ax; verts[n+1]=by; verts[n+2]=az;
    n=12; verts[n]=ax; verts[n+1]=ay; verts[n+2]=bz;
    n=15; verts[n]=bx; verts[n+1]=ay; verts[n+2]=bz;
    n=18; verts[n]=bx; verts[n+1]=by; verts[n+2]=bz;
    n=21; verts[n]=ax; verts[n+1]=by; verts[n+2]=bz;
    setCoordinates(0, verts);
    setCoordinateIndices(0, faces);

Maybe you are looking for

  • Regarding free goods issue scenario

    Hi all, I am working on free goods scenario . I have done all configuration steps as mentioned below maintain condition type  maintain pricing procedure Activate free goods determination Q.Now here i have one question, apart from above configuration

  • Album artwork shows up in itunes but not on the ipod...

    i just realized when i put some new songs on my ipod that not the album artwork werent showing up, so i followed some directions i found in some other discussion threads, like unchecking the display artwork button and checking it again. But instead o

  • Print Different Size Photo, one per page

    I am using PS5 in 64 bit mode.  I print on a Epson 3880 printer.  I shoot all photos in RAW.  I process all my RAW files in ACR accomplishing 80% of changes and the balance 20% in PS.  The output of my retouch is a Master Image (MI) File that I would

  • How to tell Facetime to contact a particular device?

    I have Facetime on my iMac (27 inch with built-in camera, running OS 10.7.3). If I try to use Facetime with my wife on her iPhone (where her number has a blue star by it), it connects and works fine.  However, if I try to use Facetime to talk with wi

  • About crystal reports

    I need to know about Web Intelligence;Crystal Xcelsius;Crystal Reports Could u please give me the explanation about these contents...