Draw multiple rectangles with mouse and allow exclusion of individual rectangles

Hi,
I have the following AS code to draw a single rectangle using mouse, but I need a different code that allows drawing multiple rectangles and the selection/exclusion of individual rectangles like a modeling tool (eg.: MS Visio).
Can you help me?
Thanks.

What if I use MovieClips as the rectangle? When the click occurs, a new MovieClip is added dynamically to stage and when the user clicks right in a MovieClip's border it can be deleted.
I'll try this way. And if you have any suggestions please let me know.
Thanks.
PS: This is the code I just forgot to include in the past post.
const CANVAS:Graphics = graphics;
var _dragging:Boolean = false;
var _corner:Point;
stage.addEventListener(MouseEvent.MOUSE_DOWN, setAnchor);
stage.addEventListener(MouseEvent.MOUSE_UP, completeRect);
function setAnchor(e:MouseEvent):void{
    if(!_dragging){
        CANVAS.clear();
        _corner = new Point(e.stageX, e.stageY);
        _dragging = true;
        stage.addEventListener(MouseEvent.MOUSE_MOVE, liveDrag);
function completeRect(e:MouseEvent):void{
    if(_dragging){    
        _dragging = false;
        stage.removeEventListener(MouseEvent.MOUSE_MOVE, liveDrag);
        CANVAS.lineStyle(0, 0, 0);
        CANVAS.beginFill(0x222222)
        CANVAS.drawRect(_corner.x, _corner.y, e.stageX - _corner.x, e.stageY - _corner.y);
function liveDrag(e:MouseEvent):void{
    CANVAS.clear();
    CANVAS.lineStyle(0, 0x999999);
    CANVAS.drawRect(_corner.x, _corner.y, e.stageX - _corner.x, e.stageY - _corner.y);

Similar Messages

  • Disable the multiple Logons in ECC6 and allowing few users

    Dear All,
    I need to disable the multiple Logons in ECC6 and allowing few users, can multilogin in system.
    I have seen that the parameter login/disable_multi_gui_login and login/multi_login_users can be set.
    But need to know did any once use in Ecc6 system and what values to be given in login/multi_login_users.
    Please suggest .
    Regards,
    Kumar

    I have found an exmaple on the web of using javascript (it opens a child window that polls the parent window, and invalidates the session if the parent window is closed). I agree there always appears to be loop holes around most of th e solutions i've come across.
    I had the same idea about invalidating any previously known session for the same userid, I'm pretty new to the java/web app world so I'm struggling with finding the information I need. I couldn't find any methods to call to invalidate another session, I only came accross example where the current session invalidated its own session via call to the session object, do you have any idea how I would do that for other sessions.
    Mant thanks for your input.
    Derek.

  • MOVED: Multiple Displays with AGP and ON-Board

    This topic has been moved to AMD SocketA based board.
    Multiple Displays with AGP and ON-Board

    Glen i just wanted to test try something new.
    I want to know if there are anything i should know about my board?
    Do you think the KM4M-V is a good board to have? 

  • I get different result when I paste with mouse and shift+ins

    Sometimes I get different result when I paste the clipboard content with mouse and shift+insert key combination. Why? What can I do to stop this annoyance?

    Just to add a little to the above, there really is no universally applied standard (not even close) for how the primary, secondary, and clipboard buffers should be used.  Any X program can use them however they wish.  But there are some common patterns: selected text should be placed in the primary buffer, and X pastes from the primary buffer with either middle click or shift-ins by default.
    This default can (and unfortunately often is) overriden by clipboard managers - I don't know why they don't stay true to their name and just manage the clipboard buffer, but they often don't.
    <mini rant>with no clipboard tools installed, selected text in any program I have is in the primary selection, and shift+ins or middle click paste from this primary selection.  Ctrl-C/Ctrl-V post to/from the clipboard buffer.  No need for extra tools.  If I install any clipboard manager, this default sanity of X11 goes strait to s(&*Y.  I don't like clipboard managers </mini rant>  <mini praise> X11 is great without any of that cruft added </mini praise>
    Last edited by Trilby (2013-06-15 03:12:39)

  • My ipod touch will not back up with itunes and allow me to update to newest software

    I am having trouble getting my ipod touch to back up with itunes and allowing me to update to newest suftware.  It has been backing up for over 3 days and the status bar has not moved.

    Terminate the backup. Close iTunes and disconnect the iPod. Reboot the iPod. Reset the iPod. Nothing is lost
    Reset iPod touch: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    The see:
    iOS: Troubleshooting backup issues in iTunes
    before trying again.

  • Pages '09: Can't select multiple objects with mouse?

    Hello! I want to select some shapes. I know that I can hold down shift and click on them individually one by one, but they're very many and grouped together, so I just want to draw a 'selection-rectangle' with the mouse, just as it works in all other programs I've ever used. But this doesn't seem to work. What am I doing wrong?

    Hello Stef,
    You can simply click and drag over an area to select multiple objects if you are in a Page Layout document, but since this is your fourth post you may be new to Pages and you may not yet even be aware of the Page Layout mode. At the top of your Pages window is the document title and next to the title in parentheses are the words "Word Processing" or "Page Layout".
    So, in a Word Processing document, it's just a little bit more involved. In the upper left corner of the window, click on the View icon and select "Show Layout". You will see gray around the edges - your desktop, a white sheet - your paper, and three rectangular outlines - the header field, the text frame and the footer field. This assumes that you have the Header and Footer turned on.
    As you move your mouse, the text insertion bar, a vertical line with curved features top and bottom, will move about the document. Move the insertion bar to the margin, outside of the boxes, and press and hold the COMMAND key. Your cursor will change to an arrowhead. Now you can select multiple objects by click-dragging, just as you are accustomed to doing in other applications.
    Regards,
    Jerry

  • Selecting multiple files with mouse now wonky

    Using Windows 8.1 on HP machine
    All updates up-to-date
    Hardware: Microsoft Intellimouse Explorer 3.0
    Explorer Folder Option selected: Single-click to open an item (point to select); Underline icon titles only when I point on them
    Display: Detail list (Ctrl + Shift + 6)
    No touch input
    Here's the problem: For as long as I have used windows, I can select multiple files by pressing ctrl-left mouse button. If I want to select multiple consecutive files, I move my cursor down to the last file in the list and press shift-left mouse button.
    If I want to select multiple files that are not listed consecutively, I move my cursor along the list of files and press ctrl-left mouse button to select each individual file.
    This does not work for me any longer and I do not know why.
    Often I will press ctrl-left mouse click and the file will not select. When I move my mouse away from the file I've selected, it will UN-select. If I continue to press the CTRL key while attempting to select another file and float my mouse cursor down the
    list of files to select ONE single file further in the list, ALL the files in between the first file I click and the final file will become selected.
    Moving the mouse cursor carefully and steadily to select individual files yields varied results; sometimes I can select individual files; sometimes, I can click multiple times to select an additional file and the file will not become selected. More often
    than not, I will select several files and earlier files will become unselected.
    Extremely frustrating.
    I have been a Windows user since version 3.1 and this has never happened to me. I have been a Windows 8.1 user for over a year now and this is a new wrinkle. I have done system restore multiple times and it has not solved the problem. I have uninstalled
    Intellipoint/Microsoft Keyboard & Mouse center and reinstalled and the problem has not solved. I have checked every setting for my mouse in the mouse center and cannot see a setting that imposes this feature.
    Changing folder options to Double-click to open an item (single click to select) solves the problem. I am able to navigate and organize my files the way I always have. Only happens when single-click feature is enabled. Please note: I have been using the
    single-click select feature since Windows XP.
    Your guidance and actual solution to this irritant is appreciated.

    Hi,
    During my test, I cannot repro this issue even I configure the same setting with you. Maybe a hardware issue or software issue.
    Does this issue happen to other mouse?
    Can you test in safe mode to check how it works?
    Alex Zhao
    TechNet Community Support

  • Question on rectangle with graph and table

    i inserted the graph chart and table in a rectangle for similar values... but when i see the preview of this scenario... its showing seperately.... its mean that first showing the rectangle and then graph and then table in the preview page. when i saved
    it into PDF; both chart and table are coming in same rectangle.
    can any one please give a quick response to this.

    Hi  Nagalinga,
    Based on my understanding, you create a chart and table with same values, then you use a rectangle to contain them. When previewing the report, rectangle, chart, table displays separately. However, when exporting to PDF, the chart and table display in a
    same rectangle.
    In Reporting Service, rectangles can be used as containers to help control the way data regions render in a report. However, a rectangle is only a container for items that you either create in the rectangle or drag into the rectangle. If you draw a rectangle
    around an item that already exists on the design surface, the rectangle will not act as its container. So in your scenario, I suppose you create a chart and table then draw a rectangle around them, rectangle, chart and table will display separately when previewing
    report. As we tested in our environment, we create a chart and table with same values, then drag them into a rectangle, the chart and table both display in a rectangle whether we preview the report or render the report as PDF. Please refer to the screenshots
    below:
    Reference:
    Rectangles and Lines (Report Builder and SSRS)
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu

  • Multiple Monitors with T440p and Pro Dock

    Hello:  I recently recieved my new business computer from our company offerings.  I got a T440p with the Pro Dock station.  Previously I had something similar that I got two years ago.  On the old system I was able to connect three monitors to the docking station (VGA, Digital, Display Port) and I could use any two at a time.  On the new system, if I plug anything into Display Port (even with that monitor turned off), the Digital port becomes disabled.  So I can't seem to use my "any two of three monitor" scheme without unplugging in one and plugging in another to the docking station.  Is there another solution for this? Thanks.  mbb.

    According to this: http://support.lenovo.com/us/en/documents/pd029622 I also have a Pro-dock (judging from the port layout) and it should be possible to use 3 monitors in any combination. But I can't get windows to activate VGA, DVI + Display Port. I got VGA + Mini Display Port + DVI working, but not reliably: When undocking and using the laptops build-in monitor, the multi display configuration can become invalid. Getting this configuration to work is a hassle, as multiple tries are needed and the configuration information in the Intel configuration dialog is wrong and the one in windows is ambiguous. Configuring Display Port + VGA works with-out problems. Display Port + DVI is difficult to achieve. Any help is approciated.

  • Syncing multiple iPhones with iCal and contacts

    My roommate just bought an iPhone and synced it for the first time with my iMac, but now he has all of my contacts and calendar appointments and none of his own. Do iCal and Contacts support multiple profiles? Is it possible for him to store his contacts on my iMac with iLife and sync without interfering with my contacts?
    Sorry if this is a noobish question or if it's already been answered. I looked and couldn't readily find any topics that matched this question.
    Message was edited by: k2tha-izzo

    Your roommate will need to have all of his contacts in a specific group, as well as all of his calendar appointments in a specific calendar.
    In iTunes, go to the info tab on the iPhone in iTunes and have it only sync that calendar/group.

  • Apple TV, monitor use and lag time with mouse and keyboard

    I purchased an Apple TV so that I could use one monitor to switch between my Mac Mini and my MacbookPro. The monitor is hardwired to the Mini, but the MacbookPro uses airplay. My wireless mouse and keyboard lag with this setup. Is there a way to fix this?

    My contacts in Pyongyang and Interlaken tell me you have fallen in the abyss that "The Great Successor,” Kim Jong-un refers to when he goes to DisneyWorld. One is either ‘right’ or ‘wrong,’ never ‘helpful.’ However due to your Stalinist screen name, you’ve been awarded some slack.
    I didn’t see a reference to even a clue on the Apple TV site regarding my traumatic technological problem. I’ll be contacting the Grack Granny Smythe force at Apple’s underground facility at La Junta, CO.
    There will be a one way, non-stop, sleeper class Lockheed SR-71 waiting for you at Nantucket International if Tech Support for Apple TV denies that Apple TV exists any longer.

  • Multiple Displays with AGP and ON-Board

       Is it possible to do multiple displays with an AGP and OnBoard videocards? 
    If yes, please inform me how to activate it eg. jumper setting or bios settings.
    If no explain exactly why not. 
      My apologies.  The board is a KM4M-V

    Glen i just wanted to test try something new.
    I want to know if there are anything i should know about my board?
    Do you think the KM4M-V is a good board to have? 

  • Edit multiple records with BC4J and Struts-JSP

    Hi everybody,
    I'm building BC4J components using entities and views and JSP business components. How can I edit and update multiple records at a time with Struts-Jsp ? Have someone already an example (with JSP and ActionForm code) ?
    thank you

    Hi,
    Nobody have an example ? Is it so difficult ?
    Thanks

  • I have macair bought 2009. Bluetooth connect with mouse and keypad not working. It used to work. Batteries are good. Green light flashes on each device, but no connection. Any suggestions to help me here? Thanks.

    Dear Community,
    I have a macbook air bought new in 2009. Since 2011 I only use it occasionally as I  now mainly use my iMac. The mouse and keyboard that came with the macbook air used to work fine with bluetooth connection to the macbookair, but now they don't. The batteries are good. The green light flashes showing it is seeking other bluetooth device to connect to. But they wont connect to my macbookair. What could the problem be? Your help would be much appreciated.

    Thanks for that. Yes I checked that already and BT enabled. Yes, external keyboard. But I just moved the computer to different part of room and bingo the devices paired and connected. So problem now solved. Thanks for offering your help.

  • Airport interfering with mouse and keyboard?

    This afternoon I moved our Airport and cable modem from our bedroom into my home office, where it now sits right next to my computer. Ever since I've had nothing but buggy problems with my mouse and keyboard. My mouse is wireless but the keyboard is connected via USB. Sometimes the keyboard won't work at all, sometimes the mouse won't work at all, and sometimes the mouse does funny things. For instance, when I click on an app icon in the dock instead of opening the app it opens a Finder window with the app selected, or it acts as if it's doing an option-click and gives me funny menus. Sometimes it just scrolls funny - once my Safari windows started flickering when I tried to scroll. The weirdest thing is my keyboard, which doesn't work at all 70% of the time. It's just a USB connection, not bluetooth, so I can't figure out why it would suddenly start misbehaving.
    I'm really stumped, and getting very frustrated. I assumed that an Apple keyboard and mouse would play nice with an Apple Aiport base station, but maybe not. Is it possible the Airport is causing interference?

    yes, it may be. If you can, try using a wired mouse, and change the channel on your
    Airport, and the frequency, maybe check for interference robustness.  I have found that BluTooth on the Mac pro is not so good, so I went out and bought a usb plugin for BT, which sits at the front of my tower and helps with that.  Also, see if moving your Airport and modem further away helps things.  Oh, and try running disk Utilities, repair permissions and check for updates (it's worth a try). If you are using an aluminum keyboard, I think there was an update released just for that alone.....
    see also if there is an update for your mouse's software, or what the buttons are set to open by default
    hopefully this helps
    John B

Maybe you are looking for