How do I drag and drop multiple objects in a mask?

I’ve been working on a flash simulator to show what our night vision product would look like in the dark.  I have been successful in making it work with the following code below.  Yet I cannot add a "reticle" image (or symbol) to the draggable mask to make it work.  Can someone help me with the code?  I looked for hours on the internet and I cannot get it to work.  I am new to Flash but am starting to learn as much as I can.
Actionscript 3 Code:
img_nv.mask = mask_mc;
mask_mc.buttonMode = true;
mask_mc.addEventListener(MouseEvent.MOUSE_DOWN, dF);
stage.addEventListener(MouseEvent.MOUSE_UP, dropF);
function dF(event:MouseEvent):void{
          mask_mc.startDrag();
function dropF(event:MouseEvent):void{
          mask_mc.stopDrag();

use a loop (like enterframe) and update the reticle's position to match mask_mc's position.
mg_nv.mask = mask_mc;
mask_mc.buttonMode = true;
// eg, if you add reticle_mc to the stage in the authoring environment
removeChild(reticle_mc);
mask_mc.addEventListener(MouseEvent.MOUSE_DOWN, dF);
stage.addEventListener(MouseEvent.MOUSE_UP, dropF);
function dF(event:MouseEvent):void{
addChild(reticle_mc);
this.addEventListener(Event.ENTER_FRAME,reticleF);
          mask_mc.startDrag();
function dropF(event:MouseEvent):void{
removeChild(reticle_mc);
this.removeEventListener(Event.ENTER_FRAME,reticleF);
          mask_mc.stopDrag();
function reticleF(e:Event):void{
reticle_mc.x=mask_mc.x;  // assuming they both have the same reg points (like the center)
reticle_mc.y=mask_mc.y;

Similar Messages

  • How do I drag and drop multiple files on a control?

    LabVIEW supports dragging and dropping a single file on a path control, and have the path control populated appropriately. I want a user to be able to highlight multiple files (say, from the OS Find File window, or anywhere really) and drop them into a path array control in LabVIEW. I was hoping putting a path control in an array would do the trick, but it didn't. The mouse cursor changes to the "+" icon as it did for a single file, but when I release the button the system just beeps. Is this even doable?
    Thanks, Bob Martin

    I guess I was hoping that the path control would realize it was in an array, and starting with the actual control where the drop occurred (if more than one item of the array is visible) start populating subsequent slots with the other file paths.
    I'm not sure how much work would be involved, but maybe I could make a control in VB that would accept the drop event and output the path array I'm looking for. I've never made a control in VB for LabVIEW before, so I'm leary of how much time that would take. I'll add this to my list of "things to do that never seem to get enough priority to do."

  • How do you drag and drop using mac laptop?

    how do you drag and drop using mac laptop?

      As said above, you can click down, ons use the other finger to drag the object.  I had turned on the setting to use three-finger drag, so you can drag objects with three fingers.  To change gesture settings, go to the system preferences>trackpad.  Here you can also see all of the gestures of Mac OS X.

  • How do I drag and drop an action onto a task flow?

    In How to pass View Object bind variable from ADF page John states that
    You should also consider dragging-and-dropping the executeWithParams operation on your task flow and wiring it to occur before your page instead of putting it in the page definition of the page itself - this way it is more clear what is happening, and is the recommended approach for 11g apps. When you drag-and-drop the operation, you can use the dialog to bind the parameter to your page-flow-scoped variable by supplying the proper EL there.
    How can I drag and drop the executeWithParams method onto a task flow. I am using 11.1.1.5.0 on LINUX?
    I'm presuming I a need a method action in my page flow.
    I have the following action defined in my page def file:
    <action IterBinding="localizedCustomerHierarchyViewIterator"
    id="executeQueryWithParamsForLocalizedCustomerHierarchyView"
    InstanceName="BusinessRulesAMDataControl.LocalizedCustomerHierarchyView"
    DataControl="BusinessRulesAMDataControl" RequiresUpdateModel="true"
    Action="executeWithParams">
    <NamedData NDName="RootEntityId"
    NDValue="#{pageFlowScope.recommendationRule.customerEntityId"
    NDType="java.lang.Long" NDOption="3"/>
    <NamedData NDName="Language"
    NDValue="#{pageFlowScope.recommendationRule.language}"
    NDType="java.lang.String" NDOption="3"/>
    </action>

    In summary, it appears you need the following artifacts in order to initialize a view object from parameters before rendering a .jsff view that relies on that view
    1) a method-call in task flow.xml file:
    <method-call id="executeWithParamsLocalizedCustomerHierarchyView">
    <method id="__5">#{bindings.executeWithParamsLocalizedCustomerHierarchyView.execute}</method>
    <outcome id="__12">
    <fixed-outcome id="__9">initializedLocalizedCustomerHierarchy</fixed-outcome>
    </outcome>
    </method-call>
    2) a control flow rule in the task flow .xml file whose source is (1) and whose destination is the view for which you want to intiialize a view object that supports an iterator that is bound to a list, tree, etc.
    3) an entry for the execute action in the databindings.cpx file
    <page path="/WEB-INF/[email protected]calizedCustomerHierarchyView"
    usageId="oracle_apps_br_view_RecommendationRulePFPageDef"/>
    4) the page def must be defined in the databindings.cpx file
    5) the page def needs to define action and iterator and list (or otherwise) that is used in UI.
    <iterator id="localizedCustomerHierarchyViewIterator"
    Binds="LocalizedCustomerHierarchyView"
    DataControl="BusinessRulesAMDataControl" RangeSize="25" Refresh="never">
    <sortCriteria>
    <sort attribute="Level" ascending="true"/>
    </sortCriteria>
    </iterator>
    <action IterBinding="localizedCustomerHierarchyViewIterator"
    id="executeWithParamsLocalizedCustomerHierarchyView"
    InstanceName="BusinessRulesAMDataControl.LocalizedCustomerHierarchyView"
    DataControl="BusinessRulesAMDataControl" RequiresUpdateModel="true"
    Action="executeWithParams">
    <NamedData NDName="RootEntityId"
    NDValue="#{pageFlowScope.recommendationRule.customerEntityId}"
    NDType="java.lang.Long"/>
    <NamedData NDName="Language"
    NDValue="#{pageFlowScope.recommendationRule.language}"
    NDType="java.lang.String"/>
    </action>
    <list ListOperMode="navigation"
    IterBinding="localizedCustomerHierarchyViewIterator"
    id="customerLocalizedEntityHierarchyList">
    <AttrNames>
    <Item Value="EntityName"/>
    </AttrNames>
    </list>
    6) a backing bean that provides the functions to initialize the parameters for execution
    The easiest way to get most of this is to drag the ExecuteWithParams from within the view in the datacontrols panel right onto the task flow diagram. The downside is that you are left with some pretty poorly named artifacts...
    Did I miss anything?
    -Klaus
    Edited by: klaus gross on Sep 29, 2011 1:00 PM

  • How can I drag and drop a Tidal job into another group?

    How can I drag and drop a Tidal job into another group? In Tidal Help, it says-
    In the Jobs pane, press and hold the Ctrl key and at the same time right-click and either individually select individual jobs within a job group or drag your mouse cursor over a block of jobs that you wish to select. You can only move multiple jobs between job groups if the jobs being moved are on the same level.
    Keeping the right mouse button depressed, drag the cursor to the job group that you wish to move the jobs to and release the mouse button.
    When moving jobs from one job group to another, you must decide if the moved jobs keep their original job group attributes or assume the calendar and agent characteristics of its new job group.
    A confirmation dialog, offers three inheritance options for the jobs moved to the "new" job group parent. Select one of the following options:
    However, when I attempt to follow those instructions, it doesn't work at all and there is no indication that it's even trying (i.e., I don't see the selected job following my cursor at all and all I get is the normal menu when you right click anywhere on the screen.)
    Is there another way to do this or is there a master setting that needs to be changed so that ability is enabled?
    Thanks.

    Go into edit mode for the job group group and just manually edit the section for Parent job/Group.
    Cheers

  • How do I drag-and-drop my Web Bookmarks Folder to a external flash drive? I need to move them from one Mac to another Mac.

    '''Moving Firefox URL Bookmarks from one Mac to another'''
    How do I drag-and-drop my web 'Bookmarks Toolbar' folder from one Mac to an external USB zip drive. Unable to network both Macs and use the migration feature. Must do this manually. Thanks!

    Hi RMcMullen,
    You should look at the [[Backing up your information]] Knowledge Base article. It will give you all the information you need to back up everything so you won't lose a thing.
    Hopefully this helps!

  • SharePoint 2013 How to disable Drag and Drop Functionality

    Hi,
    In SharePoint 2013 in document library we have default behavior of drag and drop documents in document library. How to disable drag and drop documents in document library?

    Hi,
         As a work around, you can edit the Drag and Drop js as to remove the drag and drop functionality, edit the document library page (default
    page) place the content editor web part on top of the library include the modified Drag and Drop js file in the content editor web part, Please save the Drag and Drop js file to other location (probably Site Assets library etc).
    Hope it helps!!!  
    Please remember to mark your question as answered &Vote helpful,if this solves/helps your problem. Thanks, Ajeet

  • How can I drag and drop an icon/image into a panel??

    Dear Friends:
    How can I drag and drop an icon/image from one panel into another target panel at any position in target panel at my will??
    any good example code available??
    I search for quite a while, cannot find a very good one.
    please help
    Thanks
    Sunny

    [url http://java.sun.com/developer/JDCTechTips/2003/tt0318.html#1]DRAGGING TEXT AND IMAGES WITH SWING

  • Drag and dropping database objects in Jdev

    I evaluated Visual Cafe and deciding wheather to go with VC or JDev. One of the cool things I noticed in VC is that one can drag and drop database objects in the form using DBNavigator. I haven't seen anything similar in JDev 3.1. Does this or something similar exist in JDev?
    Regards,
    Mark

    Mark,
    Yes, the DB Navigator in Visual Cafe may provide a nice simple look at the database Tables - but so does JDeveloper's Database Navigator - VC may excel in the Drag and Drop functionality - but this is not the real objective. Let me explain...
    When creating a real enterprise level application in Visual Cafe, you begin to discover that DB Navigator along with it's nifty Drag & Drop is no match for JDeveloper's unprecedented level of database integration. JDeveloper's Database related integration includes (but not limited to):
    - JDevelopers Database Navigator
    - Integrated SQLJ environment
    - Tight Business Components for Java (BC4J) integration
    - Wizard driven Form generation (thin & thick)
    - DAC Controls / InfoSwing components
    - Named Connections / Connection Manager
    - WebBeans / JSP Element Wizard
    The closest thing in JDeveloper to what you are referring to in VC is JDeveloper's support for the Design mode which allows you to design both graphical and non-graphical elements. In particular, JDeveloper allows you to design your InfoSwing and InfoProducer components using the Designer - by selecting the component (JavaBean) from the Component Palette and then [Dragging Optional] Dropping it on either the Design Canvas or the Structure pane (lower pane of Navigator window).
    For non-visual elements (such as InfoProducer elements), the Structure pane allows for Creation via Drag & Drop and allows for property setting by using the Property Inspector (Since it is a JavaBean...).
    There are many reasons why JDeveloper provides a much richer and more productive development environment than Visual Cafe. Most have to do with seeking a complete enterprise level solution. JDeveloper adresses the enterprise level application developers needs directly with integration of elements from Tools & Wizards to the integration of a complete application development framework - Oracle Business Components for Java - No other tool can provide you with such a rich and productive development environment.
    John - JDeveloper Team
    null

  • How do you drag and drop samples in the ex24 on pro x now that the edit button next to the option tab is no longer there?

    how do you drag and drop samples in the ex24 on pro x now that the edit button next to the option tab is no longer there?

    Well, it's aggravating seeing foolish limitations to the program. Having some experience in education, offering a professional program in a limited version is condescending to the user and has never been proven to help students move forward. Plus, some of the choices made to keep Logic simple are confounding... "removing the edit button on the EXS24"?  That's silly!  

  • Can't drag and drop Multiple pictures

    I can no longer drag and drop multiple iPhoto pictures to the Desktop. Drag and drop a single picture works OK but multiple pictures just doesn't work. I was able to do this in the past. I'm using version 9.4.2. Repairing Disk Utilities and restarting has not helped.
    Can anyone help? Your help is appreciated.
    Rookie

    Try this: make a temporary, backup copy of the library if you don't already have one (Control-click on the library and select Duplicate from the contextual menu) and try the following:
    1 - launch iPhoto with the Command+Option keys held down and rebuild the library.
    2 - Select and run Option #1.
    OT

  • Hi, im currently using an windows 8 computer and have installed itunes 11.5. My problem is i'm trying to transfer one song from my computer to my iphone. But some how i cannot drag and drop like last time itunes 10.x.

    Hi, im currently using an windows 8 computer and have installed itunes 11.5. My problem is i'm trying to transfer one song from my computer to my iphone. But some how i cannot drag and drop like last time itunes 10.x. I do not wish to sync as it means of deleting my entire song list from my phone just to transfer 1.

    " I ordered the Snow Leopard software and tried installing it, but it stopped and said to clean the disk."
    First off, your installation disc is in all likelihood faulty.
    This has been a known issue in the past:
    Faulty Snow Leopard install discs - Apple has no timeline on ...
    http://store.apple.com/us/help/returns_refund#policy:
    *You can return software, provided that it has not been installed on any computer. Software that contains a printed software license may not be returned if the seal or sticker on the software media packaging is broken.

  • How do you drag and drop/move multiple emails from the inbox or mail archive folder to a file folder in your finder?

    I would like to archive hundreds of my emails that currently exist in my apple mail email filing system by moving them into file folders in the finder. I can do this easily with a single email but it wont let me do it with multiple emails or a complete folder. Is there any way of do this easily?

    Thanks very much for this. However, I understand how dragging and dropping files normally works. It just seems the it wont work when you do it with emails when you are transfering them into a normal finder system folder. If you highlight one file and drag it to a finder folder it works, but when you drag multiple, it just wont let you do it.
    Is there any work around for this? Thank you once again for  your time.

  • How do i drag and drop onto a smart object layer in Photoshop CS 5.5

    I recently bought a 3d mock up Photoshop file as I want to mock up my designs such as business cards and other 3d items. The file notes said With a simple drag and drop on the smart object layer your design will be presented in a realistic and striking way.
    Can you tell me how I do what they are telling me to do as I have played around with the file till the cows come home and can't work out how to do it. Do I need to do the old fashioned mock up way by skewing the image to fit or is there an easier way such as the drag and drop...?
    Any help will be gratefully received,
    Thanks

    Hi here is the template PSD and then I want to put my business card design over and it says you can drag and drop as per my previous message ...

  • How realize drag and drop of object

    Hi everybody,
    I have a matter, I want to realise a
    VI who makes drag and drop of indicator like a gauge for example.
    For this I used an event structure to
    manage the drag and drop. But the probleme is that with this solution
    i must put the indicator in my program to set the properties node
    (visible or position).
    So the number of indicator that i can
    drop and drag depend of the number of indicator that i declare in my
    soft.
    I want to know if there is an other
    methode to do that.
    Please find attached a VI to show you
    my objectif.
    Attachments:
    gliss dep.vi ‏36 KB

    duplicate post

Maybe you are looking for

  • Requires Ratio based on product

    Hi every one my oracle version 10g we have three tables required Buy_Sell_Ratio. table 1 is trade, table 2 is currency, table 3 is product Trade as (select 1 trade_id, 110 trade_size, to_date('01/02/11',' dd/mm/yy') trade_date, ’AA’ source from dual

  • When i plug in my iphone to my computer, itunes doesn't recognize it, but iphoto does.

    When i plug my iphone into my computer, it doesn't pop up in the devices column in itunes, but iphoto opens automatically asking me to import... I want to get my music off my computer, but this is problematic with itunes not recognizing my device!

  • Junk characters (arabic)

    Hi everyone, I am having hard time converting my database characters into arabic, they appearing in junk like ???? Ive got 2 tier architecture Oracle 9i R2 database and 6i forms. In the database itself the data is appearing in junk(????) where as at

  • Trouble while creating package for extraction

    I am working on generic extraction using views.  I was told that after selecting a view when I save the data source I cannot save using a local package as it cannot be transported.  Hence I am trying to create a new package. So I have opened a new se

  • Since I updated to Lion Mac OS X 10.7 I can´t synchronize my iPhone 4 with iTunes 10.4 anymore

    Hi community, after I updated my MacBook Pro to Lion Mac OS X 10.7 I can´t synchronize my iPhone 4 with iTunes 10.4.1 anymore. Is there anybody who solved this problem in the meantime? Thanks for your support.