Dragging Objects (stopping mouse from moving)

Hello,
I am very stuck. I tried looking over my old Director scripts
for help but I cant make anything of them to help them with
Actionscript.
Basically what i want to do is, when i am dragging a a movie
clip such as 'lungs_mc' i dont want the user to be able to drag it
outside of a box called 'dragArea_mc' which has co ords of:
w:560.0, h:538, x: 235, y:57.0.
Basically when the user drags lungs_mc to the edge of box it
stops the user from moving the object outside this box, but they
are still able ot move it inside of the box.
Any Suggestions??
If you dont know how to retrain 'lungs_mc' within
'dragArea_mc' then even retraining them within x and y co ords
would be great and i will just use < and > for those.
Also 'lungs_mc' is on the _root and so is 'dragArea_mc'. They
both must stay on the root to make the whole movie work.
It would be greatly appreciated if anyone could help as it
would solve a massive problem for me
thanks a lot :-)
Lee

The startDrag method takes up to 5 parameters, where 4 of
them can define a bounding box for the dragging:
lungs_mc.startDrag(false, LEFT, TOP, RIGHT, BOTTOM)
You can insert the values for the dragging borders there. The
values are relative to the dragged MC's parent, so keep that in
mind. If lungs_mc is inside dragArea_mc, you could use
lungs_mc.startDrag(false, 0, 0, dragArea_mc._width,
dragArea_mc._height)
hth,
blemmo

Similar Messages

  • InDesign CC 2014 can no longer drag objects with mouse

    I have been using InDesign for months with no problems but suddenly I am having mouse issues. I can use my mouse to resize objects and make selections but dragging objects in the document or in panels (for example, reordering spreads) no longer works. I am using a mac on the latest 2014 CC release of InDesign, and have tried all the usual tricks (Ctrl + Alt + Shift + Cmd on startup to remove preferences, manually deleting preferences (both files), reloading software, rebooting machine, reinstalling InDesign) but the only thing that works is rebooting the machine.
    However, within 20-30 minutes after a reboot, the problem returns out of nowhere. I don't use plugins with InDesign and haven't changed hardware or software recently so I have no idea what's causing this.
    Does anyone have any info that might help me out? From googling around, it seems most people have solved their problems after a preferences dump, but mine keeps on coming back!

    I've actually been discussing this problem in another thread but this one is dedicated to it.
    This cropped up for me prior to the New Year and I've found no solution. I actually did what Steve Werner suggested this week and created a new OS X account. But the problem cropped up in the new account today.
    I don't know if this is a common or not. I'm part of a large creative team and as far as I know, I'm the only user experiencing this. I've trashed preferences, uninstalled and reinstalled InDesign, restarted the computer, etc. Nothing works.

  • How do I stop Lion from moving desktop icons when I startup?

    When I starup my iMac with Lion 10.7.1, the desktop icons that I have on my desktop organized in a particular order, all move to the far right of the desktop and do not stay in the same order.  How can I stop this from happening?  When I shut down, I uncheck the box open all windows when restarting, and I have unchecked the open application windows in the general section of system preferences.
    Thanks for the help!

    Several issues involved - please click through the threads to the right under More Like This.

  • How to stop user from moving position of a column in a JTable

    hello,
    can anyone tell me how to disallow the user from moving the column or a row in a JTable.

    setReorderingAllowed() of JTableHeader

  • Why does Adobe Illustrator Stop you from moving objects?

    When I'm using Illustrator and I click on an object then try to drag it to it to somewhere else on the artboard using the mouse nothing happens. It just won't move unless I use the cursor arrow keys. Why is nothing happening? It's really slowing my workflow down a lot and I need to get it figured out.
    All help apreciated thanks
    I'm using Abobe Illustrator CS3 on Snow Leopard
    The mouse is fully working as is the trackpad

    Before complaining that something can't be done, a simple question of HOW to do something would be better... there IS a way to deactivate a computer you don't have access to physically
    Remove license on a computer http://forums.adobe.com/thread/1442423?tstart=0 may help
    -http://helpx.adobe.com/x-productkb/policy-pricing/error-maxium-acitvation-exceeded.html

  • Stopping tab from moving to the next focus component

    I have a single TextInput field in my component and I want to
    stop the tab key from advancing the focus when I have an error in
    the field. I have tried using setFocus() and that seems to do it
    although I lose the caret in the text input field. Also when I tab
    I notice that even though I am telling the component that the next
    focus is the TextInput field it still goes to the Internet Explorer
    address bar. Any ideas?

    Append the system's line separator usingjava.lang.System.getProperty( "line.separator" );Then the added line will be placed as you've wanted. Code will be written like below:yourTextArea.append( System.getProperty( "line.separator" ) );
    yourTextArea.append( yourStringToAppend );Hope it helps.

  • Final cut 7 - how to stop video from moving around in viewer?

    Hi Guys
    Any suggestions would be really appreciated.
    In FCP7 the diagonal crosshair 'X' (I don't want to see this X) has appeared in my viewer over the video clip I wish to drag onto my timeline.
    However, after setting my in and out points as normal, when I try to drag it down, the video moves in the viewer (revealing black space).
    My question is, how can I somehow 'reset' the video in the viewer window back to its locked, original position, so I can drag it down onto my timeline as I used to?

    Thanks David, I appreciate it.
    I also realised I had inadvertently changed the 'center' and 'scale' figures! So by resetting to zero the picture locked back in place.

  • Is there a way to stop photos from moving in iMovie?

    Whenever I import a photo into my iMovie it does that really annoying this where it sort of "slideshows" and gradually zooms in. Is there a way to turn this off? I'd really just like to have an image sit still for five seconds. Thanks

    Yes. Click on the crop tool and instead of Ken Burns Effect, select Fit or Crop.
    You may need to go into iMovie Preferences and turn on Advanced Editing Tools before you see the crop tool. I can't remember if it is a default tool or an advanced tool. It will be on the toolbar in the middle of the screen between the Project pane and the Event pane.

  • Stopping clips from moving along the timeline.....

    Hiya
    Doing quite well with FCE. One thing I haven't worked out is how to 'lock' things in the timeline. eg: if I delete something or change the length then everything else shifts along the timeline.
    Please help!

    There are two types of DELETE in FCE/FCP: 'ripple' and 'lift.'
    A lift delete can be performed using the {delete} key on a standard keyboard (aka as backspace delete). This is the key just below the F11 and F12 keys. A lift delete will delete the selected clip without causing the other clips on the Timeline to shift.
    A ripple delete can be performed using the {del} key (aka forward delete). This key is two keys below the F13 key (above the left arrow key) on a standard keyboard. The ripple delete will delete the selected clip and shift clips other clips on the Timeline to fill the gap.
    -DH

  • My mouse is moving what is on desktop

    I can't stop my mouse from moving all that is on the screen.....I was using my computer and then all of a sudden everything on the desktop was moving when i used the mouse?  What can I  do to fix this?

    Are the things moving as a group? If so, is the main menubar appearing and disappearing, as if the display was larger than the screen?
    If the answers to those are yest, it sounds like Zoom has been enabled with the option to follow the cursor.
    To undo that, go to System Preferences > Universal Access > Seeing and turn Zoom off. If you do need Zoom, but don't want the icons to move when you move the cursor, then just uncheck the option to have the screen image move continuously with the pointer.

  • How to stop acrobat from submitting a form?

    I have a button with two actions on Mouse Up.
    - Run a javascript
    - Submit the form through HTTP
    The javascript action checks some required fields and sets the focus to them. If I find a required field, I CANNOT stop acrobat from moving to the next action and submitting the form. I tried "exit" with javascript but thats not the solution. I don't know good javascript so can someone point me to the right direction as to how to stop the form submission?
    Thanks

    Thanks try67. The line I used was this:
    this.submitForm({
        cURL: "http://www.snez.org/q/submit.php",
        cSubmitAs: "HTML"

  • HT2845 I am using a Magic Mouse on my MAC computer but when I drag object/files etc it only move them a inch or so and then I can not drag the object anymore, help?

    I  am using a Magic Mouse on my MAC, when I drag objects/files etc after dragging the object for an inch or so the object stops and I can not drag it any further.
    Has anyone a solution, I have checked the batteries etc.

    I  am using a Magic Mouse on my MAC, when I drag objects/files etc after dragging the object for an inch or so the object stops and I can not drag it any further.
    Has anyone a solution, I have checked the batteries etc.

  • Stop Magic Mouse from changing numerical entries

    How do I stop my Magic Mouse from changing numerical entries in apps on my Mac Pro?  When I'm using a program such as Adobe Illustrator, if I click on an entry field, say the dimensions of a rectangle, and enter the values in on my keyboard, if I happen to slightly drag my finger on the mouse when I grab it again, the numerical entries in the dialog box I was last typing in will change due to the scrolling feature of the Magic Mouse.  How do I stop this from happening?

    Well, I did manage to write a udev rule that assigned the mouse to event9, but for some odd reason it didn't work with evdev. The man page for evdev says that evdev only uses event*, but I don't understand why event9 doesn't work then. But the phys-thing worked. My mouse-section in xorg.conf now looks like
    Section "InputDevice"
    Identifier "Mouse0"
    Driver "evdev"
    Option "Protocol" "evdev"
    Option "Name" "Logitech USB Receiver"
    Option "Phys" "usb-0000:00:1d.2-1/input0"
    Option "Buttons" "8"
    Option "ZAxisMapping" "4 5 7 8"
    EndSection
    At a first glance this seems to work as I want. However, if I understand correctly, the phys is tied to a specific usb port? Which means that it will change if I plug the mouse into another port. But since I rarely unplug the mouse anyway, this is a much better solution than having to change xorg.conf all the time.
    Last edited by perost (2007-06-29 08:35:36)

  • How can you take a photo from one event and put it in another, without dragging to desktop and dragging back into iPhoto and moving it to the event folder I want it in.

    As the title says I need help on how to take a photo from one event and put it in another, without dragging to desktop and dragging back into iPhoto and moving it to the event folder I want it in. Right now when I want to move a picture from one event to another I drag it to my desktop then delete it from iPhoto then I drag it back into iPhoto and put where I want it.An example would be taking a photo from the Christmas event and add it to a specific person event.  Can I do that within the events section without all the dragging. Also is there anyway I can remove duplicates from iPhoto without going through each and every file. Any help would be greatly appreciated.

    Apple doesn't make it easy to do what you want.  However, here's how I do it. 
    Select the photo you want to move and create a new Event for it via the Event ➙ Create Event menu option.
    In the Event mode select the new Event with the one picture and drag it onto the Event you want to move the photo to.

  • In Yosemite, pasted objects in Photoshop Elements 12 automatically snap to the center of a new window. How do I stop this from happening?

    I installed Yosemite yesterday. Now, when I paste an image into a new window to combine it with another image, the layer or layers automatically snap back to the center of the new window. How do I stop this from happening?

    Thanks, Barbara. I don't use a trackpad on my iMac, just a mouse. However, I DID discover yesterday that if I press COMMAND-T (the command to Free Transform an image) I can then move the image where I want in the window. I need to use the command every time I move the image, which is annoying--in Mavericks, that Free Transform command was somehow the default.

Maybe you are looking for

  • Best set-up for video

    I hope to purchase a Mac Pro soon and use it for photographic and video work mainly. I'm currently using a Dual G5. Since there are a variety of options which set-up would be ideal? The Apple Store suggested: One 16x SuperDrive, Two 2.8GHz Quad, 4GB,

  • Creating a Live CD....some queries

    Hello! I'm trying to create a Live CD from my current Arch installation. I'm not using any of the 'automated' scripts (like Larch, makeliveiso or even those from linux-live.com), but trying to do it the 'hard way', i.e. right from scratch!  I'v got a

  • [S] Latest Xorg crashes on dual head system when web browser is opened

    Due to the long Subject line I abbreviated, the issue is solved but I would still like it if someone could answer my question if someone knows why After updating Xorg and the Radeon drivers on my dual head system opening any kind of web browser cause

  • Error Code 6 when downloading Adobe products

    Exit Code: 6 Please see specific errors below for troubleshooting. For example, ERROR: -------------------------------------- Summary -------------------------------------- - 0 fatal error(s), 2 error(s) ----------- Payload: Microsoft Visual C++ 2012

  • Reports with jdeveloper

    how should i pass parameters from jdeveloper's swing form to oracle reports builder to build a report