Limit the Drag & Drop zone in the mask

Hi, I have the average card image and I want to show this in a specific frame (border)

I can't resize and reduce my map image cause that the police cannot be read so I decided to put this image in a mask of area and use the slide so the user can see the whole image with dragging

I use the technique of the mask, convert my image movieclip with instance name: map_mc

and then put this script:

map_mc.addEventListener (MouseEvent.MOUSE_DOWN, drag);

map_mc.addEventListener (MouseEvent.MOUSE_UP, drop);

function drag(event:MouseEvent):void {}

map_mc.StartDrag ();

}

function drop(event:MouseEvent):void {}

map_mc.stopDrag ();

}

It works but the problem is: I can move and drag my image until any image will my zone masking (see anything, only the white screen), so how can I limit this field and make drag - works only when Reachs of the edges of the image (up, down, right, left).

In my last post I have watch/he explained what you need to be able to specify the parameters of Rectangle.  Here's another way for you to look at using the code you had...

limits: var Rectangle = new Rectangle)

x,

There,

Width

height

);

I also showed you how these 4 values can be defined for the design that you have.  See if you can work... replace x, y, etc. with the correct values.

Tags: Adobe Animate

Similar Questions

  • I have version 9.0.1 on 2 pc, both xp sp3. 1 the button "open new tab" is visible, on the other hand, the "Open new tab" button is not yet available in the menu "Customize toolbar" drag / drop. Why?

    I used the same setup file, but on 1 pc, the "Open new tab" button is available in the menu 'Customize toolbar' and can be dragged and drop on the navigation bar. On the other pc, the "Open new tab" button/icon is not yet available for drag / drop. I uninstalled firefox completely, including the settings and preferences, then reinstalled, but that has not fixed the missing button.

    Hello

    Please try to restore the default value in the Customize... window. If it is still not visible, one of the reasons could be that the button is already placed on the toolbar, but can be hidden behind a different icon or toolbar.

    ...............................................................................................................................

    Useful links:

    Everything on tools > Options

    Beyond the tools > Options - about: config

    Subject: config entries

    Information page (Alt + T) tools > Page Info, right-click > view Page information

    Keyboard shortcuts

    View without Plugins

    Files & Firefox profile folder

    Firefox commands

    Basic troubleshooting

    After the upgrade

    Safe mode

    Extensions of the issues

    Troubleshooting Extensions and themes

    Troubleshooting Plugins

    Test Plugins

  • How to drag - drop in the windows photo gallery?

    All I get ts a red circle with a red line in it.

    Hi GeorgeDuncan,

    Are you aware of any hardware or software changes, prior to the beginning of the question?

    You cannot drag, drop or move the pictures in windows photo gallery, but you can do a right click in the empty space of the image window and use options such as group by, sort by, etc. to organize photos. You can even mark photos for storing photos

    You can also check out the link for more information on tags - below

    http://Windows.Microsoft.com/en-us/Windows-Vista/tips-for-organizing-pictures

    For reference:
  • using the FC command with the GUI drag & drop

    In Windows 95 and 98, it was possible to make a shortcut to the "CF" MS-DOS command on the desktop, and then compare two files by drag & dropping them on the shortcut.

    However, starting from Windows XP, while this still TECHNICALLY works, the MS-DOS window (I do not remember what to call other than "command prompt window", so bear with me) will close immediately upon expiration of the program, making it impossible to read the results, especially if it is "no differences encountered".

    I remember that there was no decent way to solve this problem in XP, but is there a solution to Vista or 7? Typing long file names can be heavy, and even by using copy and paste is tedious compared to the ease, I remember not on Windows 9 X.

    Oh, I just had a thought when you think of batch files. I tried to add a pause at the end command. That seemed to work. It has been long since I made a batch file that needed the pause command. I don't know why I thought using a batch file with a command to break a decade ago.

    Oh and thanks for the link explaining the differences in the manufacture of the batch files. I learned how to 3.30 in 1990 for MS-DOS batch files and never really learned anything new other than the fact that I could use drag-n - drop in Windows 95.

    Is there something else that I could learn a few new tricks that have been introduced since MS-DOS 3.30? I _might_ have read books for MS-DOS 4 or 5 at the time, because there weren't really that many differences. The only different things I knew were the dosshell in MS-DOS 4, Edit & QBASIC in MS-DOS 5 and extended external help of 6.2.2 MS-DOS command which was similar (although I didn't know it until the end of the 1990s) for Unix man pages. Oh, and in one of these versions, they also did better? parameter help messages.

  • From the drop down menu to mask scrolls by itself

    All of a sudden the mask drop-down menu scrolls by itself. I use the hotkey to select what I want. Not sure why this is happening. The way upward into the upper part of my toolbar did this with the mode in the layers panel. Help, please!

    OK they may not scroll on their own, but they should scroll if you use your arrow keys on the keyboard. A key would be stuck or something production arrow keyboard strokes.

  • Cannot find the combination of rollover image/button/drag / drop

    Hi all

    I use 9 Captivate and work of the interaction that left me speechless. I'm trying to put up with images that will be used for drag-and-drop interaction, and I want the images to have a rollover State to indicate that they are clickable. When you click on it, a display window that provides more information to the user to determine the correct items to drag and drop.

    I tried at first to use a regular image and then add a "Rollover" State, but then I couldn't understand how to assign an action to indicate when this State will come into force. (Is there a way to associate a hotspot of mouse with a picture?) Then I tried to use an image button, which worked very well in the measure where using the rollover State and I used some conditional formatting and the variables for my more info boxes to show when the item has been clicked. However, I didn't until I had finished this part that the buttons can be used as drag objects, OH.

    I thought to use an invisible on an image button so that I could get the most information to display and the image can still be used as a drag-and-drop object, but then brings me back to not knowing how to get the rollover State to work. :/

    Suggestions as to how I can achieve the Trifecta of turning State/button/drag / drop?

    You can not interactive objects as sources of drag or drop targets. Only interactive objects have the integrated rollover state that appears automatically when the cursor is on the object.

    Drag sources and drop targets also have InBuitl States, but turnover is not one of them. Take a look at this article to see all the Inbuilt says in & slipped:

    & Slipped in 2016 with Captivate 9 - Captivate blog

    States customized like the one you created for the object can only be triggered by an event. Rolling a normal object is not an event, which explains why you can not modify a report on working capital. Except, maybe (did not check) using the CpExtra of InfoSemantics widget (only for HTML output), which can be used as EventHandler (another widget to them for the SWF output).

    You can trigger an action when a drag source is dragged to a drop target, using stocks of the object (more: advice & slides - blog of Captivate ) but not before dragging you requested.

    At the moment I don't see a way to do what you ask (and this is the first time I see such a question in this forum). Must be D & D?

  • Different drag / drop behavior of the mouse on different users on the same virtual machine Windows 10 Pro accounts

    I just upgraded to 8.1 on Mac OS X 10.11.3 Fusion "El Capitan" on a new iMac 27-inch 5K retina. The guest operating system is a new virtual machine Windows 10 Pro. I have two user accounts on the virtual machine, my local administrator account and another account local standard user. When I am logged into my account, I am able to drag and drop files to and from the guest to the normally Mac OS. As the mouse moves freely between the guest OS and the Mac. However, when I connect using the standard other account, I can't drag - move to and from the guest for the Mac OS. Also once I click into the virtual machine the mouse movement is limited to the virtual machine until I have press the buttons on the Mac to free the movement of the mouse to the Mac. I tried to uninstall and reinstall the vmware tools but the same behavior persists. Any ideas on a solution and why these two users accounts would act differently?

    Just phone with the help of VMware. They solved the problem in uninstalling and reinstalling VMware tools and change the following VMware Fusion preferences-> preferences-> General-> Gaming: to 'Never mouse optimize for games '. It has been set to 'always optimize the mouse for games '.  After that drag & drop, mouse movement works smoothly and perfectly now. Thank you VMware support!

  • Drag / drop the missing tab

    I'm sure I have seen this before, but don't find it on a research forum.

    Yesterday, I created a slide drag & drop; closed the Captivate and turned the computer off for the night.  This morning, I have no 'Drag & Drop' tab on the right (next to 'properties' and 'calendar') Panel.  "Drag / drop" in drop down menu interactions is grayed-out.

    (version 8.01.242)

    Menu 'window', then check that "drag & drop" is selected.  Oh!

  • Limit the absences in the absence of absence management type drop-down list

    Hi friends,

    How can I limit the types of absence in the absence type drop-down list in the management of absences. Also can we change how the days are calculated when you press the button "calculate the duration.

    Kindly let me know any ideas so that I can try.

    Thanks in advance

    For the restriction of LOV.

    How to limit the Type of Absence LOV Oracle Self Service human resources (Doc ID 1122674.1)

    To calculate the duration-

    https://forums.Oracle.com/message/10752228#10752228

    https://forums.Oracle.com/message/10460289#10460289

    See you soon,.

    Vignesh

  • Drag drop files always in temp\VMwareDND which is a symptom of the problem?

    I realized for the first time as the files that are Drag'n dropped from OS X to Windows VM apparently first go to ~ \Appdata\Local\Temp\VMwareDND.

    I noticed this only because:

    I dropped a WORD DOC file on the WINDOWS desktop.  I then opened it in MS WORD.  When I tried to make a BACKUP-from Word, the target folder that appeared in the Save dialogue was... \VMwareDND, no office!

    This DOC file is still in VMwareDND.

    Out of curiosity, I tried to drag / drop files more. These files later are NOT now in VMwareDND. But the first file I have slipped and fallen still exists in VMwareDND.

    Why does the first file in VMwareDND like the rest of the files?

    Was there a problem that the file has been copied from OS X to WINDOWS?

    Should I be worried that maybe the file was not copied correctly? This file was only a 5 page doc, but I am concerned about large binary files.

    Fusion 3.0.0 OS X 10.5.6 Windows Server 2008.

    Hello

    As the files that are drag ' n dropped go via the folder %TEMP% windows is by design.

    It also means that if you try to DND a file that is larger than the space available on the unit that contains only your temporary folder will fail to copy.

    If I remember correctly you can get around this by changing the file folder in your installation of windows to use another drive.

    In regard to the original not getting file not deleted, it is difficult to say. Don't have youby accident registered there in MS Word?

    It could be a bug that animates its not deleted in the temporary folder after copy successful using DND, but it is not a great problem because the temp folder is deleted when you select 'Disk cleanup' in the context menu properties under.

    There are also opportunities under profiles to delete the contents of the temp folder when you restart your guest.

    Hope this helps,

    --
    Wil
    _____________________________________________________
    VI Toolkit & scripts wiki at http://www.vi-toolkit.com

    Writer to the blog www.planetvm.net

    Twitter: @wilva

  • Office file to the browser, drag drop / entry download

    Hello world

    I'm working on a project with drag and drop and im using jqeuryui for this.

    but I want the user to be able to drag a photo to the page and what it apears on the page in the browser (no upload fancy but just customer data)

    and also a button 'Download' but also using data (I won't use of node.js or any database for this project).

    can someone help me with a simple script for that? found a lot of scripts but all the required databases, I just want to keep things simple.

    then just a picture of snow from desktop to the browser and let that attend a div,.

    and an entry button to upload a photo and let that attend a div.

    local all simple.

    I'd like to hear a response.

    -Rob

    I made a model for drag drop download.

    Drag a picture on the box and it will appear in the browser.

    Demo: http://boermancrossmedia.nl/edgedragupload/dragdrop_file_upload.html

    Download a file and model: https://app.box.com/s/sl49v3fs0r0drqm2ix23

    Free to use.

    Maby preran, you can use it for the help page & tutorial?

  • Code of the Drag & Drop

    Hello. I'm french (so excuse me for my language).

    I am a beginner in flex and I would like to have information.

    In an application that I do, I want to use the datagrid control. I also use a trash can. The data grid lines are not removed directly: they are send to the trash.

    I also want to restore the data to the trash. I know that I can use this transfer with drag & drop, but I would use a button too.

    For example, a "Restore" button will send the first row selected in the datagrid control. And deleted the datagrid button will send the line to the trash.

    You have an idea on the code I should use?

    Thank you very much.

    Alexis.

    something like that?

    
    
    
        
            
            
            
            
            
            
            
            
            
            
        
    
        
            
        
    
        
            
                
            
        
    
        
            
                
                    
                        
                            
                                
                                
                            
                        
                    
                
            
        
    
    
  • Save the mask in Speedgrade CC 2014

    Hello

    I don't understand how can I record masks.

    I tried to drag and drop layers in the 'Bank' of masks, but it does not at all.

    I tried with CTRL + p, but I save the layer with the correction and I'm only interested in masks.

    Thank you

    Kevin

    OS X 10.10.1

    Application: Speedgrade

    Version: 20141

    Built: 8.1x128

    Sans titre-1.jpg

    Jean Louis Lova says:

    Hello

    Neil Merci for the reply but I know not even how "copy & paste a mask from one clip to another?
    Can explain you please?
    Thanks again.

    With my quest to save a mask, the method that I started to use is to copy the selected layer containing the mask. Not only the way Neil described to copy clips from clips preceding or following, but my need was to copy in the same clip. (I work with stills now Neil, so I only have one - the clip, but that leads me to a lot more questions, but not directly associated with this topic to post). So, I did not understand how come back to 'save' a mask, but copy (two copies) the layer containing the mask, then my ranking direction with respect to the mask and the ranking in the layer "copied". Shown in the attached photo.

  • How to move the mask without the masking area who created

    Im trying to place a box of masking to a certain place where he hides a fraction of an object (myRainBow) and then move the mask without moving the masking area. But the code I did exactly the opposite-> he moves the area of masking with the mask itself.

    My problem in other words:

    I have a nice image, but I want to move the image to a different location on my living room wall. So where I have move the image (at the top, left corner, bottom corner to the Center, etc.) it (the content of the image itself) won't change, only its location of the image in my living room.

    How do with the as3 code, cause I have so far only this and it does not have what I want it to do


    private var masker:Shape = new Shape();
                        private var maskerBoarder:Shape = new Shape();
                        private var container:Sprite = new Sprite();
      
                        private var myRainBowPicture:Sprite = new Sprite(); 
                        private var m:Matrix = new Matrix(); 
    
    
                        public function MainMask()
                        {
                                  if (stage) init();
                                  else addEventListener(Event.ADDED_TO_STAGE, init);
                        }
      
                        private function init(e:Event = null):void
                        {
                                  removeEventListener(Event.ADDED_TO_STAGE, init);
      
                                  this.addChild( container );
      
                                  //create the gradiant
                                  m.createGradientBox( 400, 300, 0, 0, 0);  
                                  myRainBowPicture.graphics.beginGradientFill(GradientType.LINEAR, [ 0xFF, 0xFF00FF, 0xFF0000],  [1, 1, 1], [0x0, 0x7F, 0xFF], m , SpreadMethod.PAD, InterpolationMethod.LINEAR_RGB, 0); 
                                  myRainBowPicture.graphics.drawRect(stage.stageWidth * 0.5 - 200 ,stage.stageHeight * 0.5 - 150, 400, 300); 
                                  myRainBowPicture.graphics.endFill();
                                  addChild(myRainBowPicture); 
      
                                  masker.graphics.beginFill( 0x00ff00 );
                                  masker.graphics.drawRect( 0, 0, 200, 100 );
                                  masker.graphics.endFill();
                                  container.addChild( masker );
      
      
                                  maskerBoarder.graphics.beginFill( 0, 1 );
                                  maskerBoarder.graphics.drawRect( 0, 0, 200, 100 );
                                  maskerBoarder.graphics.beginFill( 0x00ffAA, 0.5 );
                                  maskerBoarder.graphics.drawRect( 2, 2, 194, 96 );
                                  maskerBoarder.graphics.endFill();
                                  maskerBoarder.graphics.endFill();
      
                                  container.addChild( maskerBoarder );
                                  myRainBowPicture.mask = masker
    
    
      
                                  container.addEventListener(MouseEvent.MOUSE_DOWN, onClick)
                                  container.buttonMode = true;
                                  stage.addEventListener(MouseEvent.MOUSE_UP, drop);
                        }
      
                        private function onClick(e:MouseEvent):void
                        {
                                  container.startDrag();
                        }
      
                        private function drop(e:MouseEvent):void
                        {
                                   stopDrag();
                        }
    
    

    The way you describe moving the mask without moving the mask area is not clear, but if your description to move something on the wall, then you have probably just to add the image of the Rainbow and the mask in the same container object and assign slide it / drop in this container.  From what I can make of your code, you just put the mask inside a container and moving from this container.  Try to put this first container inside another breadsticks and the Rainbow and assign the drag / drop to the second.

  • How to limit the length of a text field in a dialog box (ADM)

    Hi all

    I need to limit the length of a field in a dialog box (ADM) edit_text, but char_limit doesn't seem to work, it's my code the problem ?

    {
    char_width: 8.
    height: 100,.
    item_id: 'Rete ',.
    type: 'edit_text. "
    Multiline: true,
    char_limit: 5.
    Width: 500,
    }

    If not, maybe I can use events to do the same thing with the onKeyStroke event but I don't know how to use the event in a dialog box (ADM) or if it is still possible...

    Any idea?

    Thank you for your help.

    Phil

    There are two events that can be used to check the length of the text,

    The first is the action event for the text field, which is called when the field loses focus, it is a member of the purpose of dialogue with the same name as the item_id.  This event could also be used to update another field in the dialog box that indicates the number of characters, you may even have a small picture of alert which becomes visible to make it obvious that there is a problem.

    The other event, as already mentioned, is the validate event.  This allows to block the exit from the dialog box and display a popup to alert to the user.

    You will find some examples of dialogs here:

    http://www.pdfscripting.com/public/65.cfm

    Take a look at the pages resize tool dialog box.  It will give you some ideas of what can be done.

    There is a plug-in Acrobat for creating dialogs here:

    http://www.windjack.com/products/AcroDialogs.html

    It's a Visual drag and drop Editor.  You can download and use for free for 10 days.

    Thom Parker
    The source for PDF Scripting Info
    pdfscripting.com

    The Acrobat JavaScript Reference, use it early and often
    http://www.Adobe.com/devnet/Acrobat/JavaScript.html

    Then more important JavaScript development tool in Acrobat
    The Console window (video tutorial)
    The Console Window (article)

Maybe you are looking for