Help enhance my Drag&Drop code

Good day!
I have here my code for a simple drag and drop excercise and it looks a little bit redundant. I want to enhance it and trim it down for efficiency but I'm not really sure how should I do it. Also, I have a problem when selecting a drag object; when I click it, it is lost. I really don't know why it happens, I just followed a tutorial I've seen on the internet. Help would really be appreciated!
Sincerely,
Mr. Milo
MY CODE ARE AS FOLLOWS:
at1.addEventListener(MouseEvent.MOUSE_DOWN, pickAT);
in1.addEventListener(MouseEvent.MOUSE_DOWN, pickIN);
in2.addEventListener(MouseEvent.MOUSE_DOWN, pickIN);
in3.addEventListener(MouseEvent.MOUSE_DOWN, pickIN);
in4.addEventListener(MouseEvent.MOUSE_DOWN, pickIN);
in5.addEventListener(MouseEvent.MOUSE_DOWN, pickIN);
in6.addEventListener(MouseEvent.MOUSE_DOWN, pickIN);
in7.addEventListener(MouseEvent.MOUSE_DOWN, pickIN);
in8.addEventListener(MouseEvent.MOUSE_DOWN, pickIN);
on1.addEventListener(MouseEvent.MOUSE_DOWN, pickON);
on2.addEventListener(MouseEvent.MOUSE_DOWN, pickON);
at1.addEventListener(MouseEvent.MOUSE_UP, dropAT);
in1.addEventListener(MouseEvent.MOUSE_UP, dropIN);
in2.addEventListener(MouseEvent.MOUSE_UP, dropIN);
in3.addEventListener(MouseEvent.MOUSE_UP, dropIN);
in4.addEventListener(MouseEvent.MOUSE_UP, dropIN);
in5.addEventListener(MouseEvent.MOUSE_UP, dropIN);
in6.addEventListener(MouseEvent.MOUSE_UP, dropIN);
in7.addEventListener(MouseEvent.MOUSE_UP, dropIN);
in8.addEventListener(MouseEvent.MOUSE_UP, dropIN);
on1.addEventListener(MouseEvent.MOUSE_UP, dropON);
on2.addEventListener(MouseEvent.MOUSE_UP, dropON);
at1.buttonMode = true;
in1.buttonMode = true;
in2.buttonMode = true;
in3.buttonMode = true;
in4.buttonMode = true;
in5.buttonMode = true;
in6.buttonMode = true;
in7.buttonMode = true;
in8.buttonMode = true;
on1.buttonMode = true;
on2.buttonMode = true;
var startX: Number;
var startY: Number;
var correct: Number = 0;
var attempt: Number = 0;
// I think I have a problem here
function pickAT(event:MouseEvent): void {
    var obj = event.target;
    obj.startDrag();
    obj.x = startX;
    obj.y = startY;
function pickIN(event:MouseEvent): void {
    var obj = event.target;
    obj.startDrag();
    obj.x = startX;
    obj.y = startY;
function pickON(event:MouseEvent): void {
    var obj = event.target;
    obj.startDrag();
    obj.x = startX;
    obj.y = startY;
function dropAT(event:MouseEvent): void {
    var object = event.target;
    object.stopDrag()
    if(object.dropTarget != null && object.hitTestObject(targetAT1)) {
        attempt++;
        correct++;
        attemptCounter.text = String(attempt);
        correctCounter.text = String(correct);
        object.removeEventListener(MouseEvent.MOUSE_DOWN, pickAT);
        object.removeEventListener(MouseEvent.MOUSE_UP, dropAT);
        object.buttonMode = false;
        object.x = targetAT1.x;
        object.y = targetAT1.y;
    else {
        attempt++;
        attemptCounter.text = String(attempt);
        object.x = startX;
        object.y = startY;
function dropIN(event:MouseEvent): void {
    var object = event.target;
    object.stopDrag()
    if(object.dropTarget != null && object.hitTestObject(targetIN1)) {
        attempt++;
        correct++;
        attemptCounter.text = String(attempt);
        correctCounter.text = String(correct);
        object.removeEventListener(MouseEvent.MOUSE_DOWN, pickIN);
        object.removeEventListener(MouseEvent.MOUSE_UP, dropIN);
        object.buttonMode = false;
        object.x = targetIN1.x;
        object.y = targetIN1.y;
    else if(object.dropTarget != null && object.hitTestObject(targetIN2)) {
        attempt++;
        correct++;
        attemptCounter.text = String(attempt);
        correctCounter.text = String(correct);
        object.removeEventListener(MouseEvent.MOUSE_DOWN, pickIN);
        object.removeEventListener(MouseEvent.MOUSE_UP, dropIN);
        object.buttonMode = false;
        object.x = targetIN2.x;
        object.y = targetIN2.y;
    else if(object.dropTarget != null && object.hitTestObject(targetIN3)) {
        attempt++;
        correct++;
        attemptCounter.text = String(attempt);
        correctCounter.text = String(correct);
        object.removeEventListener(MouseEvent.MOUSE_DOWN, pickIN);
        object.removeEventListener(MouseEvent.MOUSE_UP, dropIN);
        object.buttonMode = false;
        object.x = targetIN3.x;
        object.y = targetIN3.y;
    else if(object.dropTarget != null && object.hitTestObject(targetIN4)) {
        attempt++;
        correct++;
        attemptCounter.text = String(attempt);
        correctCounter.text = String(correct);
        object.removeEventListener(MouseEvent.MOUSE_DOWN, pickIN);
        object.removeEventListener(MouseEvent.MOUSE_UP, dropIN);
        object.buttonMode = false;
        object.x = targetIN4.x;
        object.y = targetIN4.y;
    else if(object.dropTarget != null && object.hitTestObject(targetIN5)) {
        attempt++;
        correct++;
        attemptCounter.text = String(attempt);
        correctCounter.text = String(correct);
        object.removeEventListener(MouseEvent.MOUSE_DOWN, pickIN);
        object.removeEventListener(MouseEvent.MOUSE_UP, dropIN);
        object.buttonMode = false;
        object.x = targetIN5.x;
        object.y = targetIN5.y;
    else if(object.dropTarget != null && object.hitTestObject(targetIN6)) {
        attempt++;
        correct++;
        attemptCounter.text = String(attempt);
        correctCounter.text = String(correct);
        object.removeEventListener(MouseEvent.MOUSE_DOWN, pickIN);
        object.removeEventListener(MouseEvent.MOUSE_UP, dropIN);
        object.buttonMode = false;
        object.x = targetIN6.x;
        object.y = targetIN6.y;
    else if(object.dropTarget != null && object.hitTestObject(targetIN7)) {
        attempt++;
        correct++;
        attemptCounter.text = String(attempt);
        correctCounter.text = String(correct);
        object.removeEventListener(MouseEvent.MOUSE_DOWN, pickIN);
        object.removeEventListener(MouseEvent.MOUSE_UP, dropIN);
        object.buttonMode = false;
        object.x = targetIN7.x;
        object.y = targetIN7.y;
    else if(object.dropTarget != null && object.hitTestObject(targetIN8)) {
        attempt++;
        correct++;
        attemptCounter.text = String(attempt);
        correctCounter.text = String(correct);
        object.removeEventListener(MouseEvent.MOUSE_DOWN, pickIN);
        object.removeEventListener(MouseEvent.MOUSE_UP, dropIN);
        object.buttonMode = false;
        object.x = targetIN8.x;
        object.y = targetIN8.y;
    else {
        attempt++;
        attemptCounter.text = String(attempt);
        object.x = startX;
        object.y = startY;
function dropON(event:MouseEvent): void {
    var object = event.target;
    object.stopDrag()
    if(object.dropTarget != null && object.hitTestObject(targetON1)) {
        attempt++;
        correct++;
        attemptCounter.text = String(attempt);
        correctCounter.text = String(correct);
        object.removeEventListener(MouseEvent.MOUSE_DOWN, pickON);
        object.removeEventListener(MouseEvent.MOUSE_UP, dropON);
        object.buttonMode = false;
        object.x = targetON1.x;
        object.y = targetON1.y;
    else if(object.dropTarget != null && object.hitTestObject(targetON2)) {
        attempt++;
        correct++;
        attemptCounter.text = String(attempt);
        correctCounter.text = String(correct);
        object.removeEventListener(MouseEvent.MOUSE_DOWN, pickON);
        object.removeEventListener(MouseEvent.MOUSE_UP, dropON);
        object.buttonMode = false;
        object.x = targetON2.x;
        object.y = targetON2.y;
    else {
        attempt++;
        attemptCounter.text = String(attempt);
        object.x = startX;
        object.y = startY;

Ned,
Thank you for looking into the code and pointing to the mistakes.
Milo,
I was typing off the top of head and, of course, overlooked some things. Hopefully this works:
var startX: Number;
var startY: Number;
var correct: Number = 0;
var attempt: Number = 0;
var currentlyDragged:MovieClip;
// collection of objects stored in array
// so that you can reference them programmatically
var objects:Array = [at1, in1, in2, in3, in4, in5, in6, in7, in8, on1, on2];
activateObjects();
// assigns listeners and other functionality to the objects in objects array
function activateObjects():void {
     for each(var mc:MovieClip in objects) {
          mc.addEventListener(MouseEvent.MOUSE_DOWN, pickObject);
          mc.buttonMode = true;
          // assign drop targets based on names
          switch(String(mc.name).substring(0, 2)) {
               case "at":
                    mc.dropTargets = [targetAT1];
               break;
               case "in":
                    mc.dropTargets = [targetIN1, targetIN2, targetIN3, targetIN4, targetIN5, targetIN6, targetIN7, targetIN8];
               break;
               case "on":
                    mc.dropTargets = [targetON1, targetON2];
               break;
function pickObject(e:MouseEvent):void {
     currentlyDragged = MovieClip(e.currentTarget);
     currentlyDragged.startDrag();
     startX = currentlyDragged.x;
     startY = currentlyDragged.y;
     stage.addEventListener(MouseEvent.MOUSE_UP, dropObject);
function dropObject(e:MouseEvent):void {
     stage.removeEventListener(MouseEvent.MOUSE_UP, dropObject);
     stopDrag();
     var droppedOn:MovieClip;
     if (currentlyDragged.dropTarget) {
          // loop through targets belonging to the currently dragged clip
          for each(var mc:MovieClip in currentlyDragged.dropTargets) {
               if (currentlyDragged.hitTestObject(mc)) {
                    // get the target
                    droppedOn = mc;
                    currentlyDragged.removeEventListener(MouseEvent.MOUSE_DOWN, pickObject);
                    currentlyDragged.buttonMode = false;
                    currentlyDragged.x = droppedOn.x;
                    currentlyDragged.y = droppedOn.y;
                    correct++;
                    correctCounter.text = String(correct);
                    // stop loop - it is not necessary to continue
                    break;
     attempt++;
     attemptCounter.text = String(attempt);
     // return to the initial position if there is no hit
     if (!droppedOn) {
        currentlyDragged.x = startX;
        currentlyDragged.y = startY;
Message was edited by: Andrei1

Similar Messages

  • UI enhancements and Drag&Drop

    I understand the need and will to create UI environment from scratch which is independent from the OS usual controls and pretty too. But with this approach it's often that something that the users of specific OS are taking for granted isn't there.
    There are problems with current scrolling behavior in grid view (different from thumbnail generation problems). The scrolling seems too slow and not entirely smooth. Apart from working on solution for that (which I feel is needed) using Windows convention of right clicking on slider area and have the options to scroll to the start/end and scroll where clicked would ease _some_ frustration when browsing through the library. I often use this in both PSE Organizer and Bridge.
    Of course Mac people might say: hey, I don't want that Win stuff in! To this my answer would be: I would like _every_ useful Mac stuff in!
    I would also like full drag&drop capability in LR.
    m.

    vatolin wrote:
    V.K. wrote:
    no. smart folders are … saved searches.
    That's understood. Is there any other approach to catch my concern to collect e-mails in one place without move them out of their original place and without to duplicate them?
    no, it has to be a smart folder to do something like that.
    Otherwise I think I'll set a keyword in MailTags and create a smart folder that catches all items including the keyword.
    That's probably your best bet.
    TIA and kind regards, Friedrich

  • Help need in drag drop operation in AIR application

    I would like to know if there is a way to drag and drop an attachment file from an desktop mail client application(similar to MSoutlook)  into an AIR application and make it accessible to the AIR application.
    I did experiments with this the drag operation and its giving AIR a File Promise List format as its file type.
    But I'm not exactly sure how to make use of it once it is dropped. The examples in web explains how to manupilate File Promises list format from an AIR application to the desktop.
    There is not much explainations about droping a file promise list format into an AIR app. your valuable help will be greatly appreciated.

    Dear all,
    Is the above mentioned task feasible or not?.If not do mention any other way for implementing this functionality or close to it.
    Thanks

  • Help needed in Drag and Drop and  resizing of image icons

    Hi all,
    I'm doing a project on Drag and Drop and resizing of image icons.
    There is one DragContainer in which i have loaded the image icons and i want to drop these image icons on to the DropContainer.
    After Dropping these icons on to the DropContainer i need to resize them.
    I have used the Rectangle object in resizing.
    The problem now i'm facing is when i drag, drop and resize an image icon and when i try to drag, drop a second image icon the first image icon gets erased.
    can any one help me in fixing this error.
    if u want i can provide the source code.
    thanks in advance
    murali

    the major restrictions in its implemented only in
    jdk1.1.Why!

  • Urgent!  Adobe killed drag/dropping workflow in CC.  Help restore it!

    I posted this first FR at the end of another thread, here.  Due to the importance of this issue, IMO, I'm giving this FR a new thread, plus adding as second version of the same FR.
    My stance is simple.  Every change Adobe makes to Premiere Pro should be positive to most or all people.  If a change Adobe makes is negative for most or all people, then it must be removed.
    Adobe did a negative change in CC, which brings about zero positive improvements (unless proven otherwise which has not been done yet).
    In CC, drag-dropping clips no longer  = dropping what you're dragging!  If you only have a video track source patched, audio doesn't get dragged to the Timeline.  If you only have an audio track source patched, video doesn't get dragged to the Timeline.
    This is contrary to the way it worked in CS6 (where it made sense): drag drop clip = same clip dropped, regardless of Timeline settings!
    Please help fix this by sending the following FRs as your own or writing a FR of your own based on this new problem Adobe introduced in CC.  Thank you and God bless all those that care enough about Premiere to take action!
    VERSION 1 (revert back to CS6)
    *******Enhancement / FMR*********
    Brief title for your desired feature:
    Drag/Dropping video with audio clip from Source Monitor or Project window to Timeline should include both video and audio... always!
    How would you like the feature to work?
    The way it did in Premiere Pro CS6: 
    A. Video with audio dragged from Project window = video with audio dropped in Timeline
    B. Three drag/dropping options from Source monitor, regardless of Source Patch settings.  Drag/drop:
    1. Source Monitor Image = Video + Audio
    2. 'Drag Video Only' button = Video only
    3. 'Drag Audio Only' button = Audio only
    In CC, these options no longer work properly depending on Source Patching.  This makes no sense, and provides zero benefits to the editor!
    Why is this feature important to you?
    Because intelligent workflows matter!  There's nothing intelligent or efficient about the Source Monitor's buttons working some times but not others, or drag/dropping a clip from the Project window only to find its audio doesn't appear in the Timeline.  When drag and dropping clips, Source Patching should determine default clip PLACEMENT, Not WHAT gets dragged to the Timeline!
    VERSION 2 (give us a choice!)
    *******Enhancement / FMR*********
    Brief title for your desired feature: Preferences window option to disable Source Patching's effect on drag/dropped clips.
    How would you like the feature to work?
    If Adobe can't/won't revert drag/dropping back to functional CS6 standards, whereby clip dragged = same content dropped regardless of Timeline settings, then please give us the option of turning off CC's new drag/dropping behavior through a new check box option in the Preferences Window: "Source patching affects Drag/dropping".
    Checked = CC behavior
    Unchecked = CS6 behavior
    Why is this feature important to you?
    Because respecting workflows matters!  CS6 and prior Premiere editors had their workflows disrespected when Adobe suddenly changed drag/dropping behavior with zero apparent benefits in return.  Please give us a choice in this matter or revert to CS6's intelligent drag-dropping altogether.

    I posted this first FR at the end of another thread, here.  Due to the importance of this issue, IMO, I'm giving this FR a new thread, plus adding as second version of the same FR.
    My stance is simple.  Every change Adobe makes to Premiere Pro should be positive to most or all people.  If a change Adobe makes is negative for most or all people, then it must be removed.
    Adobe did a negative change in CC, which brings about zero positive improvements (unless proven otherwise which has not been done yet).
    In CC, drag-dropping clips no longer  = dropping what you're dragging!  If you only have a video track source patched, audio doesn't get dragged to the Timeline.  If you only have an audio track source patched, video doesn't get dragged to the Timeline.
    This is contrary to the way it worked in CS6 (where it made sense): drag drop clip = same clip dropped, regardless of Timeline settings!
    Please help fix this by sending the following FRs as your own or writing a FR of your own based on this new problem Adobe introduced in CC.  Thank you and God bless all those that care enough about Premiere to take action!
    VERSION 1 (revert back to CS6)
    *******Enhancement / FMR*********
    Brief title for your desired feature:
    Drag/Dropping video with audio clip from Source Monitor or Project window to Timeline should include both video and audio... always!
    How would you like the feature to work?
    The way it did in Premiere Pro CS6: 
    A. Video with audio dragged from Project window = video with audio dropped in Timeline
    B. Three drag/dropping options from Source monitor, regardless of Source Patch settings.  Drag/drop:
    1. Source Monitor Image = Video + Audio
    2. 'Drag Video Only' button = Video only
    3. 'Drag Audio Only' button = Audio only
    In CC, these options no longer work properly depending on Source Patching.  This makes no sense, and provides zero benefits to the editor!
    Why is this feature important to you?
    Because intelligent workflows matter!  There's nothing intelligent or efficient about the Source Monitor's buttons working some times but not others, or drag/dropping a clip from the Project window only to find its audio doesn't appear in the Timeline.  When drag and dropping clips, Source Patching should determine default clip PLACEMENT, Not WHAT gets dragged to the Timeline!
    VERSION 2 (give us a choice!)
    *******Enhancement / FMR*********
    Brief title for your desired feature: Preferences window option to disable Source Patching's effect on drag/dropped clips.
    How would you like the feature to work?
    If Adobe can't/won't revert drag/dropping back to functional CS6 standards, whereby clip dragged = same content dropped regardless of Timeline settings, then please give us the option of turning off CC's new drag/dropping behavior through a new check box option in the Preferences Window: "Source patching affects Drag/dropping".
    Checked = CC behavior
    Unchecked = CS6 behavior
    Why is this feature important to you?
    Because respecting workflows matters!  CS6 and prior Premiere editors had their workflows disrespected when Adobe suddenly changed drag/dropping behavior with zero apparent benefits in return.  Please give us a choice in this matter or revert to CS6's intelligent drag-dropping altogether.

  • Adding a target to 'drag and drop' code snippet

    Hi,
    I would imagine it's a simple enough bit of additional code, but I'm no programmer, and trawling the Web has proved fruitless to date...
    Within Flash CS5 and using AS 3, I'm attempting to create a series of drag-and-drop interactions for a learning exercise where items must be dragged into the correct box with positive and negative feedback being generated as a result of where the learner drops the item. All I need is the code to link the drag and drop code snippet (which I have working) to a specific object/location on the stage (which I cannot find nor figure out for the life of me)!
    I may be overcomplicating given that perhaps there is a CS5-compatible extension out there somewhere (whatever happened to all of the e-learning extensions and tools Flash once had if my memory serves?) which can provide me with an easily customizable template to achive what I need to do?
    Many thanks in advance to whomever can offer and tips, tools or usable code for this task.
    Galvoice.

    the easiest way to handle that would be to assign a transparent movieclip to the target position and use that movieclip as your droptarget.

  • Having trouble dragging/dropping files from my MacAir to a shared drive window, when I try to drag/drop gets bounced out. Can anyone help with advice on how to drag/drop or otherwise copy files to a shared drive? thanks in advance

    I am having trouble dragging/dropping or otherwise copying files from my MacAir to a window for a shared drive.
    When I try to drag/drop, files get bounced out.
    Anyone know how to drag/drop in such a case, or otherwise copy files from MacAir to a shared drive (which I do  not believe is on a Mac, not sure if that matters).
    Any help much appreciated, thanks in advance
    J.

    I am having trouble dragging/dropping or otherwise copying files from my MacAir to a window for a shared drive.
    When I try to drag/drop, files get bounced out.
    Anyone know how to drag/drop in such a case, or otherwise copy files from MacAir to a shared drive (which I do  not believe is on a Mac, not sure if that matters).
    Any help much appreciated, thanks in advance
    J.

  • Drag & drop application and source code

    hi,
    i am now researching a drag & drop Java application.
    could someone tell me where can i find a sample Java application with source code which implement GUI drag and drop.
    thank u very much and have a nice day

    http://java.sun.com/docs/books/tutorial/dnd/index.html

  • I can't drag/drop files!! HELP :( :(

    I can't drag/drop files from one place to another, like across my desktop,i have to cut/copy paste them into another location.
    It randomly change as before i could drag/ drop files, etc

    OS X will move the file if you hold the command key while you drag and drop.
    What happens if duplicate files are found during the move drag and drop. If you release the command key to answer the dialog box that appears, the file will be copied but not moved. If you continue to hold the command key as you click the Replace button, the move action will be completed.
    To move files in Finder first press Command+C to copy the selected files, then press Command+Option+V to move the copied files to the current folder.

  • ITunes crashes when try to add songs to library both drag-drop and Add folder/file option

    I got the old iTunes updated, it crashed when open. Then I uninstall and download the newest iTunes. Restart my laptop.
    I even start iTunes in safe mode but it keep crashing.
    I try Add folder first, then Add file, then drag and drop. None of them work and I only have 700MB total of songs, no vids
    There were no pop up for error code or anything, iTune just crash when I try one of those add options.
    If anyone can help I would really appreciate

    after I got offline yesterday, I tried drag-drop again, it worked.

  • Drag&Drop from Lightroom to Premiere doesn't work! Programming an alternative?

    Unfortunally the is no working Drag&Drop ability to drag a videofile from the Lightroom Library into the Premiere Project View.
    (This Problem appears only on a Windows machine not on Mac)
    This is becaus if you send a (valid) filepath to "Adobe Premiere Pro.exe" as a parameter it doesn't do anything! Why that?!?!?
    It makes no difference if you drop a file on "Adobe Premiere Pro.exe" or if you use the windows command shell like "C:/...<path to premiere>.../Adobe Premiere Pro.exe" "myfile.avi"  , simply nothing happens - at least with Premiere Pro CS5...
    So the Idea is to build an Lightroom Plug-In, that opens an exe-file with the filepaths of the currently selected Viedeos from the Lightroom Library as parameter.
    The exe-file should pass the information to an opened Project in Premiere an load the Videos into the Project.
    With ExtendScript Tool i can get this behaviour with this code:
    var myFiles = ["C:\\01.avi, ..."];
    app.project.importFiles(myFiles);
    I don't think that the Premiere SDK will help me out, because with that I can only build Plug-Ins that work INSIDE Premiere. I need a Executable that can send information/files to Premiere from Outside. The only thing I can think of is to load the right dll-file and call the function() for importing files to Premiere (I think this is what ExtendScript Tool does ), but I don't know how to start, because nothing is documented about the dlls...
    Any Ideas

    EDIT:
    Ok, I identified the dll which is importing Video-Files to Premiere:  HSL.dll
    At my pc it is located in:
    "C:\Program Files\Adobe\Adobe Premiere Pro CS5\"
    The function that is called is named ImportFiles(...)
    That's the whole code, reverse engineered:
    HSL::ImportFiles
        std::vector <
                    std::basic_string <unsigned short, std::char_traits<unsigned short>, dvacore::utility::SmallBlockAllocator::STLAllocator<unsigned short> >,
                    std::allocator <std::basic_string<unsigned short, std::char_traits<unsigned short>, dvacore::utility::SmallBlockAllocator::STLAllocator<unsigned short> > >
                    >
        const&,
        bool,
        bool,
        std::vector <
                    ASL::InterfaceRef<BE::IProjectItem, BE::IProjectItem>,
                    std::allocator<ASL::InterfaceRef<BE::IProjectItem, BE::IProjectItem> >
                    >&,
        std::vector <
                    std::pair<int, std::basic_string<unsigned short, std::char_traits<unsigned short>, dvacore::utility::SmallBlockAllocator::STLAllocator<unsigned short> > >,
                    std::allocator<std::pair<int, std::basic_string<unsigned short, std::char_traits<unsigned short>, dvacore::utility::SmallBlockAllocator::STLAllocator<unsigned short> > > >
                    >&,
        ASL::InterfaceRef<BE::IProjectLoadStatus, BE::IProjectLoadStatus>&,
        DLG::ImportFromEDL::ImportFromEDLDialog*,
        std::basic_string<unsigned short, std::char_traits<unsigned short>, dvacore::utility::SmallBlockAllocator::STLAllocator<unsigned short> > const*,
        DLG::ImportFromEDL::ImportNewSequenceMediaParamsDialog*
    Can anybody "read" that , or anybody know how to get this working with c++?

  • Able to drag drop items of combobox but want to disable 1st item

    Hello Sir,
    I am able to drag drop elements of the combobox.
    Here is my code...
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" xmlns:local="*" xmlns:utils="adobe.utils.*" xmlns:controls="qs.controls.*" initialize="init()">
    <mx:Script>
    <![CDATA[
    import mx.events.DragEvent;
    import mx.events.ListEvent;
    import mx.controls.dataGridClasses.DataGridColumn;
    import mx.controls.ComboBox;
    import mx.controls.Alert;
    [Bindable]
    public var str:String = "";
    public var comboLength:int;
    public function init():void
    var xml:XML = <test>
    <col>
    <col1>one</col1>
    </col>
    <col>
    <col1>two</col1>
    </col>
    <col>
    <col1>three</col1>
    </col>
    <col>
    <col1>four</col1>
    </col>
    <col>
    <col1>five</col1>
    </col>
    <col>
    <col1>six</col1>
    </col>
    <col>
    <col1>seven</col1>
    </col>
      </test>;
      cb1.dataProvider = xml;
      comboLength = xml.col.length();
      cb1.rowCount = comboLength;
      str = (xml.col[0].col1.toString());
      cb1.prompt = str;
    public function closeHandler(event:Event):void
    if(MouseEvent.DOUBLE_CLICK)
    // Alert.show("Click Event");
    public function changeHandler(event:ListEvent):void
    // Alert.show("Single Click Event");
    public function doubleClickEvent(event:MouseEvent):void
    Alert.show(event.currentTarget.toString());
    Alert.show(event.target.toString(),"Double Click");
    public function dragEnterFunction(event:DragEvent):void
    Alert.show(event.target.parent.toString());
    ]]>
    </mx:Script>
    <mx:ComboBox id="cb1" prompt="prashant" doubleClickEnabled="true" doubleClick="doubleClickEvent(event)"
    close="closeHandler(event)" dragEnter="dragEnterFunction(event)" >
    <mx:itemRenderer>
    <mx:Component>
    <mx:DataGrid itemClick="outerDocument.cb1.text = this.selectedItem.col1.toString();itemSelected(event)"
    dragEnabled="true" dropEnabled="true" dragDrop="draDropHandler(event)" dragMoveEnabled="true" headerHeight="0" showHeaders="false"
    creationComplete="init()" click="clickable()"
    itemDoubleClick="doubleClickEvent(event)">
    <mx:columns>
    <mx:DataGridColumn dataField="col1" headerText="" id="da" disabledColor="white"  />
    </mx:columns>
    <mx:Script>
    <![CDATA[
    import mx.controls.DataGrid;
    import mx.events.DropdownEvent;
    import mx.events.ListEvent;
    import mx.events.DragEvent;
    import mx.controls.Label;
    import mx.controls.Alert;
    public function clickable():void
    //Alert.show("clickable");
    public function itemSelected(event:ListEvent):void
    Alert.show(event.itemRenderer.data.col1,"Single Click");
         public function draDropHandler(event:Event):void
    Alert.show(event.target.parent.toString());
    public function dragEnterFunction(event:DragEvent):void
    Alert.show(event.target.parent);
    override public function set data( value:Object ) : void
    this.dataProvider = value.col;
    //outerDocument.cb1.text = this.selectedItem.col1.toString()
    //myList.addEventListener(ListEvent.ITEM_DOUBLE_CLICK, onItemDoubleClick,
    public function doubleClickEvent(event:ListEvent):void
    Alert.show(event.itemRenderer.data.col1,"Double Click");
    ]]>
    </mx:Script>
    </mx:DataGrid>
    </mx:Component>
    </mx:itemRenderer>
    </mx:ComboBox>
    </mx:Application>
    But now i want to disable drag drop of the 1st item and the last item.
    And also add double click of each item.
    Can someone please help me out.
    Awaiting your reply.
    Thanks in advance.

    Hello Sir,
    Thanks a lot for your reply.
    I have implemented some thing can you please help me out with this?
    In this can you help me out with the double click event????
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
    xmlns:local="" xmlns:utils="adobe.utils." xmlns:controls="qs.controls.*"
    initialize="init()">
    <mx:Script>
    <![CDATA[
    import mx.events.DragEvent;
    import mx.events.ListEvent;
    import mx.controls.dataGridClasses.DataGridColumn;
    import mx.controls.ComboBox;
    import mx.controls.Alert;
    import mx.controls.listClasses.ListBase;
    import mx.core.UIComponent;
    public var str:String = "";
    public var comboLength:int;
    public function init():void
    var xml:XML =
    </mx:Application

  • Reseting a drag & drop game

    Hello All:
    I'm having trouble reseting a drag & drop game. It is a movie clip with two pages: start_pg and game_pg. On start_pg is a start button (start_btn) that goes to game_pg. On game_pg is button (end_btn) that goes back to start_pg. Both buttons share the same layer, so I made each invisible when not of its page. The game works fine, but when the end_btn is clicked, all movie clips that have been dropped, stay there.
    How can I go back to start_pg and reset all movie clips to their original starting point?
    // start game page
    stop();
    end_btn.visible=false;
    start_btn.visible=true;
    start_btn.addEventListener(MouseEvent.CLICK, goGame);
    function goGame (Event:MouseEvent): void
    gotoAndStop("game_pg");
    // game page
    var startX:Number;
    var startY:Number;
    var counter:Number = 0;
    pic_1.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
    pic_1.addEventListener(MouseEvent.MOUSE_UP, dropIt);
    pic_3.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
    pic_3.addEventListener(MouseEvent.MOUSE_UP, dropIt);
    pic_2.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
    pic_2.addEventListener(MouseEvent.MOUSE_UP, dropIt);
    pic_4.addEventListener(MouseEvent.MOUSE_DOWN, pickUp);
    pic_4.addEventListener(MouseEvent.MOUSE_UP, dropIt);
    function pickUp(event:MouseEvent):void {
    event.target.startDrag(true);
    event.target.scaleX = 1.2;
    event.target.scaleY= 1.2;
    m_txt.text = "";
    event.target.parent.addChild(event.target);
    startX = event.target.x;
    startY = event.target.y;
    function dropIt(event:MouseEvent):void {
    event.target.stopDrag();
    var myTargetName:String = "target" + event.target.name;
    var myTarget:DisplayObject = getChildByName(myTargetName);
    if (event.target.dropTarget != null && event.target.dropTarget.parent == myTarget){
      event.target.width = 230;
      event.target.height= 190;
      m_txt.text = "Good Job!";
      event.target.removeEventListener(MouseEvent.MOUSE_DOWN, pickUp);
      event.target.removeEventListener(MouseEvent.MOUSE_UP, dropIt);
      event.target.buttonMode = false;
      event.target.x = myTarget.x;
      event.target.y = myTarget.y;
      counter++;
    } else {
      m_txt.text = "Try Again!";
      event.target.x = startX;
      event.target.y = startY;
      event.target.width = 50;
    event.target.height= 40;
    if(counter == 4){
            m_txt.text = "Congratulations, you matched all rivers correctly!";
    pic_1.buttonMode = true;
    pic_2.buttonMode = true;
    pic_3.buttonMode = true;
    pic_4.buttonMode = true;
    // end game button
    start_btn.visible=false;
    end_btn.visible=true;
    // end game button
    end_btn.addEventListener(MouseEvent.CLICK, goStart);
    function goStart(Event:MouseEvent):void
    gotoAndStop("start_pg");
    Thanks in advance for any assistance.
    German

    Kglad:
    All my movie clips are on stage. Does it make any difference?
    I tried three options: 1) I didn't change the two functions and added the restore XY action to end_btn. It didn't work.
    end_btn.addEventListener(MouseEvent.CLICK, goStart);
    function goStart(Event:MouseEvent):void
    restoreXY(MovieClip(root));
    gotoAndStop("start_pg");
    The second option. In each function I changed
    the last part restoreXY(mc[obj]); to restoreXY(MovieClip(root));  (this didn't work)
    The third option was adding the storeXY to my function pickUp (which is when all movie clips exist in their original position) and keeping the restore action in end_btn. Didn't work.
    function pickUp(event:MouseEvent):void {
    event.target.startDrag(true);
    event.target.scaleX = 1.2;
    event.target.scaleY= 1.2;
    m_txt.text = "";
    event.target.parent.addChild(event.target);
    startX = event.target.x;
    startY = event.target.y;
    storeXY(MovieClip(root));
    In all cases, I got errors in many lines such as
    1120: Access of undefined property obj the scritp is   if(mc[obj] is "MovieClip" && mc[obj].parent==mc){
    Can you please tell where in my code I should put the storeXY and restoreXY(MovieClip(root));?
    Thanks again for helping me.
    German

  • Simple drag&drop with handler doesn't work in Edge?

    Hi all!
    I made this very simple example of Drag&Drop in Edge: http://www.terredainventare.it/simpledrag/simpledrag.html using Jquery Ui http://docs.jquery.com/UI/Draggable.
    I try to use the JQueryUi "handle" property that makes you drag an object restricting drag click on only one element but it doesn't work.
    Here's the code I've put in Edge onCompositionReady:
    sym.$("drag").draggable({ handle:"handler" });
    Of course my two Div-elements are called "drag" and "handler". Now the drag works only on the "wrong" element and not on the "handle".....
    Here's the Adobe Edge files: http://www.terredainventare.it/simpledrag/web.zip
    Many thanks in advance for your help!
    Davide

    So, on stage i add a rectangle named "drag" and i try this code:
    yepnope({
                nope:[
                'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js',
                'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css'
                complete: init
    function init() {
             //$("#Stage_drag").draggable();
             //$(sym.lookupSelector("drag")).draggable();
             sym.$("drag").draggable();
    3 lines work: $("#Stage_drag").draggable() or $(sym.lookupSelector("drag")).draggable() or sym.$("drag").draggable()
    And css file is not required.
    Well, your dowload link is not perfect but i download your folder. See you later.
    There is a tutorial: a movie tutorial (adobe tv). Mix it baby! Extending Edge Animate 02:57
    They use: yepnope (both, callback)
    yepnope({
         both: ['jquery-ui.min.js',
                   'jquery-ui.css'
         callback: function(){sym.$("drag").draggable()}
    I will send you your files tomorrow (private message).

  • Can't drag/drop or copy/paste; spotlight missing

    I can no longer drag/drop or copy/paste files or folders.  I can select "copy" but the option to "paste" is grayed out.  I also no longer have spotlight on the menu bar. 
    One possible cause - there's a tmp folder in my trash bin.  I have no idea how it got there.  Is that the cause?  if so, how do I reinstall the tmp folder?
    I'm running 10.5.8 on a Macbook Pro.  Thanks.

    BDAqua wrote:
    Hello, the ones in the link I gave...
    Mac OS X 10.2.8 or earlier
    Open Terminal (/Applications/Utilities/).
    Type:ls -la / | grep tmp
    Press Return.
    Look at the resulting text. If it matches the following line (which would indicate that /tmp is still present) then this document does not apply to you, and you should stop here and try another troubleshooting path.
    lrwxrwxr-t 1 root admin 11 Jan 15 11:00 tmp@ -> private/tmp
    The timestamp following "admin" will reflect the current date.
    If you do not see the line above, then type:
    sudo ln -s /private/tmp /tmp
    Press Return.
    Enter your administrator account password when prompted, the press Return.
    I still have a question, but first.....
    THANK YOU SOOOO MUCH! I can't express how thankful I am for this post! Had the same exact problem as the discussion starter. I didn't even notice Spotlight was gone until finding this post! I thought the issue was Adobe/app related until copy/paste didn't work!
    ***If you try the code, after entering your password successfully, make sure you RESTART your computer!!!***
    Now to my questions. Please help if you can:
    1) I can see that the tmp folder is an alias folder now; but can I still delete the original folder that's still in the trash (which is minus two files now, because I tried emptying the trash)?!??
    2) Also, I have a x2 backup of the original folder before putting it in the trash (and emptying; that's how I know the tmp folder is minus two files). So my second question is, can I put the backup folder BACK where the alias folder is, and them delete the alias!???
    Thanks for any answers! That last thing I want to do is mess up again!! :/

Maybe you are looking for

  • PeopleSoft Financials integration

    Hi All, I have a requirement of integrating PeopleSoft Financial with OIM and am at loss about it. I read through the OIM PeopleSoft User Management Connector guide and am not sure whether it supports the provisioning of users from OIM to PS Finance.

  • Hyper V: No Option to Create New Virtual Machine

    After selecting my local computer as the virtualization server, there is no option to create a new virtual machine. When I right-click on my server, I only get "Remove Server", "View>", and "Help" in the drop-down menu. According to the tutorials tha

  • ITunes & iPhone has 50+ apps from another Apple ID

    My wife and I have separate Apple IDs, separate iPhones but only one computer that we share where iTunes is installed. This hasn't been a problem and iTunes did a great job at detecting which iPhone was connected. Starting about a week ago, there are

  • Windows 7 No internet Access but network connected

    Just installed Win7 which was needed for BF3 as i was previously using XP. All was good until my net has just stopped. the LAN icon on the task bar has the yellow symbol with the "!" mark on it. ive tried unistalling and reinstalling drivers for my N

  • Web pages flash white with flash content

    HiI have had this problem for quite some time with the flash content flashing to white, blinking severval time a second in IE 7 and 8. I have removed and reinstalled the flash plugin with no change even reinstalled Ie8 no diffrent. When you scroll up