How do you Capture Mouse?

I'm new at Flex and trying to make a graphics editor for which I need the user to be able to resize the graphs the same way most graphics editors do - with a resize box. So what I'm making now is a class (that extends UIComponent) that have 4 little squares (that extend UIComponent too) at the corners that the user should use as handles to resize something. So I all need to do right now is to make them react properly to mouse inputs: the one at the top right should have the same "x" position as the one at the bottom right if the user is moving the bottom right one and so on. What I do is call startDrag in the MOUSE_DOWN event for each square and then in the MOUSE_MOVE event I move the others squares accordingly. The problem is that the square being dragged moves faster than all the others. If I could just capture mouse and then do all the dragging stuff myself that would make it a lot easier. But it seems that they didn't implement that function so, does anyone know any other possible way to do what I'm trying to do?

Solved my problem. Here's the code in case is useful for anyone:
// Make an event listener like this for every mouse event
public function OnMouseDown(event:MouseEvent):void
     if(event.target is DisplayObject){
          if(!MouseOwner.contains(DisplayObject(event.target))) event.stopPropagation();
     else event.stopPropagation();
public function CaptureMouse(Element:DisplayObjectContainer):void
    this.addEventListener(MouseEvent.MOUSE_DOWN, OnMouseDown, true);
    // Keep adding listeners for every mouse event
    MouseOwner = Element;

Similar Messages

  • How do you capture buzz & reverse in the RMX?

    Hey all - on the Stylus RMX, whenever I "capture" the chaos - it always leaves off the reverse & buzz elements. Upon reading the RMX online manual, it specifically says this is not possible. So - the question is - if you can't capture these 2 features w/in the RMX capture, how can you capture the actual performance (as heard) within Logic?
    PowerMac G5 1.8GHZ single 2GB RAM   Mac OS X (10.4.3)  

    What mode are you in? I believe you must have stylus rmx is groove mode instead of slice mode. You can then also set logic to record what movements you make with those faders, either by mouse or if you have them mapped to another controller. I find that I will drag over a loop and then record the reverse and reorder parameters later so I can get them to happen more with what is happening in the rest of the song.

  • How do you Capture pages in 5.0

    How do you Capture pages in 5.0

    You can't, that entire method has been removed.
    Pages 5 is a severely cut down beta. Apple removed over 100 features and added a lot of bugs.
    Pages '09 should still be in your Applications/iWork folder.
    Peter

  • How would you capture the stdout of Runtime.getRuntime().exec())?

    How would you capture the stdout of Runtime.getRuntime().exec())?
    Say you wanted to execute PKZIP25.exe from java using Runtime.getRuntime().exec(). How would you capture the output of PKZIP25 (the console IO) in a file so you could check the results?
    Thanks
    Bill Blalock

    Thanks.
    Could you explain a little more?
    The program I am calling seems to be executing, as far as Java is concerned, but nothing happens. I imagine I have made mistakes in calling it but can't see the output to the console.
    Should I use Runtime.getRuntime().exec() or Runtime.exec() for something like this?
    I appreciate the help!
    Bill B.

  • How do you capture a picture of someone you are ta...

    How do you capture a picture of someone you are video chatting with?

    Please see this FAQ.
    Taking a video snapshot of another person
    Regards,
    Tamim
    Location - Dhaka | Bangladesh - Standard Time Zone: GMT/UTC + 06:00 hour
    If one of my replies has adequately addressed your issue, please click on the “Accept as Solution” button. If you found a post useful then please "Give Kudos" at the bottom of my post, so that this information can benefit others.

  • How do you capture a still picture from DVD

    How do you capture a still picture from a DVD

    Click iMovie/About. If you have version 9.0.4 (iMovie 11) this will work. If you have an earlier version, this will also work, but there are also other ways.
    First, get an app called MPEG Streamclip, which is free. (MPEG Streamclip from Squared 5)
    Open MPEG Streamclip.
    In iMovie, select the clip you need. Then, right-click/Reveal in Finder.
    Drag this clip into MPEG Streamclip
    In MPEG Streamclip, move the playhead to the frame you want.
    In MPEG Streamclip, click FILE/EXPORT FRAME.
    Choose JPEG, TIFF, or PNG and give it a name.
    You can then drag this photo into iPhoto.
    I have created a short video Tutorial on how to do this. There is one error in the Tutorial, where it says that Command-click is the same as right-click. I should have said Control-click instead.

  • How do you capture a screen shot

    how do you capture a screen shot on a MacBook Air

    Quickest way is Command-Shift-3:
    This takes a screenshot of the screen, and you can then save it as a file on the desktop
    Cheers!

  • How do you capture an answered phone number in contacts ?

    How do you capture an answered phone number in contacts ?

    When you look at your call history in the phone app, you see the number that you want to add, and press on the small right arrow on the right. It will show you a new page where you can simply create a new contact or add it to an existing one.

  • How do you capture real detail of sql errors in crystal viewer of CR2008

    How do you captue the further details of an sql error when running a report in Crystal 2008 viewer (within a software application)? I get a 'failed to retrieve data from database. Details: Database Vendor Code: -nnnn' error where nnn is a number like 210074. If I run the same .rpt directly thru crystal I get a failed to retrive rowset. Then after choosing ok on that message  I get another message with more details and this time (in this particular case) it happens to be 'Column XXXXX cannot be found in database or is not specified for query. Other times it could be something about excedding max length/precison, etc..
    We recently switched from using the RDC CR10 to this new .net viewer way. With the RDC it gave us the 'meaningful" message so we could tell what was wrong. Using this new method it does not. Is there a setting for showing more detail or some coding that would give me the real message detail using cr2008?
    Don't know if it matters but in this case it is a Progress database.

    Hello,
    Back in the RDC days we manually added a lot of code to capture the exception info. When CR was re-written in 9 we removed all custom "fixes" and error handling, we basically said any ANSII 92 standards rule apply. We just pass what the client gives us.
    What this means is we dynamically pass the exception from the client to CR and interpret what we can or we simply pass the error code to the error UI.
    What you can do is to use a try/catch block and create your own error table according to Progress Error codes to pass on a more meaningful message to your users.
    We won't due to the vast amount of errors possible and the vast amount of DB clients we would have to maintain. If the client doesn't pass meaningful info onto CR then we just pass it's error onto the the end user.
    Thank you
    Don

  • How can I capture mouse click events on BSP or Web Dynpro ABAP Screen

    hi Guys,
    Currently we have a user inactivity problem,
    the requirement is: if user is clicking on BSP/Web Dynpro ABAP screen, he/she is considered active. so we need an mechanism to capture the mouse click event.
    Using Firebug, we found that this js is in the iframe which contains BSP/web dynpro scrren: /sap/public/bc/ur/nw5/js/languages/urMessageBundle_en.js
    we want to find this js file & put in some javascript code to track user's mouse click, but i cannot find it on server.
    while in ie if we type http://host:port/sap/public/bc/ur/nw5/js/languages/urMessageBundle_en.js
    this file can be downloaded, means this file is there.
    Any one can help on this issue? find the js file or another way to capture the mouse click event.
    Thanks a lot with points!

    Hi  Feng Guo,
                        We can not capture mouse click events on Web Dynpro ABAP Screen . I am not sure about BSP. But as for as I know the portal keep active the iViews until unless mouse clicks happens.
    But for your problem I think you can get solution by setting iView Expiration to some more time period.
    Regards,
    Siva

  • How do you capture a view as an external file?

    I am trying to write an interface using C++.NET. So far, everything is working well. It connects the database to a pre-designed recordset and accepts SQL commands.
    The next step is to input SQL commands to create Views. In order to use those Views in my interface, I believe they need to be stored in some external file that would be accessible to my interface application.
    How can I capture and store Oracle 10g XE Views ?

    I'm still not sure we're talking the same language here.
    PL/SQL is the programming language.
    SQL is the query language. PL/SQL can contain SQL statements.
    Views are stored queries, not stored result sets. You might create a view as
    SQL> CREATE OR REPLACE VIEW employee_departments AS
      2  SELECT e.empno, e.ename, d.dname AS department
      3  FROM   emp e
      4         JOIN dept d ON d.deptno = e.deptno;
    View created.
    SQL> desc employee_departments
    Name                          Null?    Type
    EMPNO                         NOT NULL NUMBER(4)
    ENAME                                  VARCHAR2(10)
    DEPARTMENT                             VARCHAR2(14)
    SQL> SELECT * FROM employee_departments
      2  WHERE  department = 'SALES';
         EMPNO ENAME      DEPARTMENT
          7499 ALLEN      SALES
          7521 WARD       SALES
          7654 MARTIN     SALES
          7698 BLAKE      SALES
          7844 TURNER     SALES
          7900 JAMES      SALESHowever the base tables are read and the join repeated whenever the query is issued - the results are not stored anywhere and it does not make sense to talk of putting them in a file. What if the underlying data changes? Your users read from the file and get the old results. Oracle provides mechanisms for handling application cache structures but it's advanced stuff (I've only read about it, I'm not a 3GL programmer myself) and I would have thought not suitable for someone trying to put up a simple application quickly.
    You said you can get your C++.Net application to connect to the database and get result sets. Just use that same approach when accessing the views you have created. You don't need a 'file'.
    > Most users of consumer software dont really want to spend the time and effort to familiarize themselves with the workings of a sophisticated database. Ideally, for them, they don't even know a database exists in conjunction with their application.
    I still don't see what this has to do with anything. No they will not be familiarising themselves with the workings of a database, they will be interacting with your fine application.

  • How do you capture an additional fees in a Shopping Cart

    Hello Experts,
    There is a need to capture additional charges such as Sea Freight, Air Frieght, and Transportation Fee etc u2026. We are currently working to implement SRM 7.0 (classic), we are trying to figure out how we would capture these types of charges.  We only implementing Self-Service piece of the SRM.  Please advice.
    Thanks and Regards,
    EJ Kumar

    Dear Poster
    Your query is barely readable and seems to have been copied and pasted from somewhere, please create a new thread with details of the assistance you require in a more readable format.
    SAP SRM Moderator

  • How do you capture from a DVD

    I was told you can capture from DVD using Adobe Premiere. How do you play the DVD to allow capture?

    I've also found that Tsunami's authoring suite is rather handy for this. It will allow you to pull source material from a DVD and encodes it to a 720x480 MPEG-2 that pulls right into Premiere without issue. (Just watch out for the AC-3 encoding on some of the audio files).
    Just my two cents, but why go DV-AVI when the file is already in distribution state (DVD) --

  • How do you capture the screen?

    How do i capture the screen?
    i guess this is it to this question...
    thanks

    yep, dats wat i meant
    is there a way to capture only one window? or should
    I just cut the unnecessary part myself?On windows:
    You can use "alt + print scrn" to only get a screen shot of the window that has focus.
    /Kaj

  • How do you capture system values to display in browser (drawString?)

    Hi to all,
    I'm attempting to get system.out.println values running an applet in a browser. I'm new to creating Applets and I see one option is to use drawString to display text. My code is as follows:
    import java.applet.Applet;
    import java.awt.*;
    import java.io.*;
    import java.net.*;
    public class WhoAmI extends Applet{
    * Tells you the domain name and IP of the machine
    * you are running.
    * @param args not used.
    public String str2 = "test";
    public static void main (String[] args){
    try
    InetAddress localaddr = InetAddress.getLocalHost () ;
    System.out.println ( "Computer Name: " + localaddr.getHostName () );
    System.out.println ( "IP Address : " + localaddr.getHostAddress () );
    //System.out.println () ;
    String str = localaddr.getHostName();
    String str2 = str;
    //System.out.println ( "ALTERNATE LOCAL IP ADDRESSES:");
    InetAddress[] localaddrs = InetAddress.getAllByName ( str ) ;
    for ( int i=0 ; i<localaddrs.length ; i++ )
    if ( ! localaddrs[ i ].equals( localaddr ) )
    System.out.println ( "IP Address("+i+"): " + localaddrs[ i].getHostAddress () );
    //System.out.println ( "Local hostname : " + localaddrs[ i].getHostName () );
    //System.out.println () ;
    catch ( UnknownHostException e )
    System.err.println ( "Can't detect localhost : " + e +". Check Network settings.") ;
    public void init()
    Button button = new Button("Close");
    add(button);
    public void paint(Graphics g)
    g.drawString("I need the value of str variable from above to display here", 50, 25);
    // Head.
    public boolean action(Event evt, Object arg)
    if (arg == "Close")
    System.exit(0);
    return true;
    I've tried setting the localaddr.getHostName() value to string also trying to use a public variable name (str2) without success. How do you get a handle of the vale to display it?
    Thanks in advance,
    Geoff.

    thanks for the insight.. however using the above has spawned to be what seems as a security error:
    java.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:270)
    at java.security.AccessController.checkPermission(AccessController.java:401)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:542)
    at java.lang.SecurityManager.checkExit(SecurityManager.java:762)
    at javax.swing.JFrame.setDefaultCloseOperation(JFrame.java:356)
    at Test.<init>(Test.java:7)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
    at java.lang.Class.newInstance0(Class.java:306)
    at java.lang.Class.newInstance(Class.java:259)
    at sun.applet.AppletPanel.createApplet(AppletPanel.java:567)
    at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1778)
    at sun.applet.AppletPanel.runLoader(AppletPanel.java:496)
    at sun.applet.AppletPanel.run(AppletPanel.java:293)
    at java.lang.Thread.run(Thread.java:536)
    Is there something else I'm doing wrong here?
    Thanks for your help,
    Geoff-

Maybe you are looking for

  • JSP does not have visibility of java classes in simple Web Module Project

    Dear Experts I am developing what I thought would be a very simple Web Module Project for a simple webservice to allow a user to logon to Netweaver Portal with a simple logon and password. I have not done this in over 8 years, and am somewhat rusty.

  • Can't scan from printer control panel - Officejet 8600a

    I receive a "can't scan, print or copy" error message when attempting to scan to e-mail or send a scanned image to external media (USB). However, scanning from the laptop works well. What could be the issue?

  • How do I install OSX10.5 using an external LaCie DVD Drive?

    I purchased a External LaCie Drive recommended by Apple Genius Bar to affordably replace a dead internal DVD drive on an older iMac G4. I bought a family package of Leopard OSX10.5 and installed 10.5 on my main computer (G5) using its internal drive.

  • Desperate...Premiere not recognizing any video

    Hi everyone!  I'm obviously very desperate if I'm posting to a forum for help.  The problem is my clips won't show in the timeline. When I drag and drop the video file, every single thing I've read online states that it should AUTOMATICALLY separate

  • Wagetype calculation not coming correctly

    Hi Whenever we run a transfer action in between the payroll period wagetypes which we have maintained in 14 Infotype are not calculating correctly. Ex: Performance pay wagetype is there Amt is Rs 1000  start date 01.04.2008 and end date 31.12.9999. I