Drag and Drop Listbox - help

Hello! I'm back to LabVIEW programming and fell on a problem that I can't solve.

I am trying to use dag and drop on a list box. I put to move only and it works fine. The problem is that if I drop the moved element event goes just far. I couldn't find examples or answers in the forums.

Someone wants to teach me about drag and drop?

Thank you

It is not unstraightforward.  Shift register keeps the value of the listbox on departure of drag (ie. the index of the item).

Tags: NI Software

Similar Questions

  • Visible bullets in other "pages" app after match "drag-and - drop. Help please!

    After you change the code from a tutoial, I've got the game part of drag n drop of my project educational app works beautifully.

    The misfortune is that, if I hit the home button, which is common to all 'pages' in my app away game, the bullets that were abandoned in the correct position remain visible on the stage in all other pages.

    I guess this is because the AS code removes the listener of events so once slipped to the correct position in the game, they snap there and can not be moved.

    Am I wrong?

    How can I solve the problem of the balls ignored being visible on other "pages".

    Thanks in advance and here is the code on the page of the application.

    var counter: Number = 0;

    var startX:Number;

    var startY: number;

    peg1_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    peg1_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    peg2_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    peg2_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    peg3_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    peg3_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    peg4_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    peg4_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    peg5_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    peg5_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    peg6_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    peg6_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    peg7_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    peg7_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    peg8_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    peg8_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    peg9_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    peg9_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    peg10_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    peg10_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    peg11_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    peg11_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    peg12_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    peg12_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    function pickUp(event:MouseEvent):void {}

    event.target.startDrag (true);

    reply_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) {}

    reply_txt. Text = "Good Job!"

    event.target.removeEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    event.target.removeEventListener (MouseEvent.MOUSE_UP, dropIt);

    event.target.buttonMode = false;

    Event.Target.x = myTarget.x;

    Event.Target.y = myTarget.y;

    counter ++;

    } else {}

    reply_txt. Text = "Try Again!";

    Event.Target.x = startX;

    Event.Target.y = startY;

    }

    if(Counter == 12) {}

    reply_txt. Text = "congratulations, you're done!"

    }

    }

    peg1_mc.buttonMode = true;

    peg2_mc.buttonMode = true;

    peg3_mc.buttonMode = true;

    peg4_mc.buttonMode = true;

    peg5_mc.buttonMode = true;

    peg6_mc.buttonMode = true;

    peg7_mc.buttonMode = true;

    peg8_mc.buttonMode = true;

    peg9_mc.buttonMode = true;

    peg10_mc.buttonMode = true;

    peg11_mc.buttonMode = true;

    peg12_mc.buttonMode = true;

    use:

    home_btn.addEventListener (MouseEvent.CLICK, homeClicked);

    function homeClicked(event:MouseEvent):void

    {

    SoundMixer.stopAll ();

    {if(reparentedBalls!=null)}

    for (var i: uint = 0; i<>

    {if(reparentedBalls[i]!=null&&reparentedBalls[i].parent!=null)}

    reparentedBalls [i].parent.removeChild (reparentedBalls [i]);

    }

    }

    }

    gotoAndStop ("home")

    }

  • Drag and drop with a Flash response... Help, please

    Hello

    I just started with flash and actionscript3 about 5 weeks ago. I am in my first year uni and I have an assignment to slide / move (for a kindergarten class). His "little red hen" and they place the correct image to the right holder.

    I got drag and drop work but I can't seem to find a way display a check mark when they place in the correct holder.

    Help, please...

    It's my script (it may seem messy... still new)

    import flash.events.MouseEvent;

    / * Mouse event that ensures the function of hen movieclip to start dragging
    When the mouse is pressed * /.

    hen1_mc.addEventListener (MouseEvent.MOUSE_DOWN, opportunity);
    hen2_mc.addEventListener (MouseEvent.MOUSE_DOWN, opportunity);
    hen3_mc.addEventListener (MouseEvent.MOUSE_DOWN, opportunity);
    hen4_mc.addEventListener (MouseEvent.MOUSE_DOWN, opportunity);
    hen5_mc.addEventListener (MouseEvent.MOUSE_DOWN, opportunity);
    hen6_mc.addEventListener (MouseEvent.MOUSE_DOWN, opportunity);


    Ability to function (event: MouseEvent): void
    {
    event.target.startDrag ();
    }

    / * Mouse event that ensures the function of hen movieclip to drop
    When the mouse button is released with Condition statement, if
    owner = hen, hen snaps into place * /.

    hen1_mc.addEventListener (MouseEvent.MOUSE_UP, dragStop1);
    function dragStop1 (event: MouseEvent): void
    {
    hen1_mc.stopDrag ();
    If (hen1_mc.hitTestObject (holder1_mc) is true)

    {
    hen1_mc.x = holder1_mc.x;
    hen1_mc.y = holder1_mc.y;
    }
    }


    hen2_mc.addEventListener (MouseEvent.MOUSE_UP, dragStop2);
    function dragStop2 (event: MouseEvent): void
    {
    hen2_mc.stopDrag ();
    If (hen2_mc.hitTestObject (holder2_mc) == true)
    {
    hen2_mc.x = holder2_mc.x;
    hen2_mc.y = holder2_mc.y;
    }
    }


    hen3_mc.addEventListener (MouseEvent.MOUSE_UP, dragStop3);
    function dragStop3 (event: MouseEvent): void
    {
    hen3_mc.stopDrag ();
    If (hen3_mc.hitTestObject (holder3_mc) == true)
    {
    hen3_mc.x = holder3_mc.x;
    hen3_mc.y = holder3_mc.y;
    }
    }

    hen4_mc.addEventListener (MouseEvent.MOUSE_UP, dragStop4);
    function dragStop4 (event: MouseEvent): void
    {
    hen4_mc.stopDrag ();
    If (hen4_mc, hitTestObject (holder4_mc) is true)
    {
    hen4_mc.x = holder4_mc.x;
    hen4_mc.y = holder4_mc.y;
    }
    }

    hen5_mc.addEventListener (MouseEvent.MOUSE_UP, dragStop5);
    function dragStop5 (event: MouseEvent): void
    {
    hen5_mc.stopDrag ();
    If (hen5_mc.hitTestObject (holder5_mc) == true)
    {
    hen5_mc.x = holder5_mc.x;
    hen5_mc.y = holder5_mc.y;
    }
    }

    hen6_mc.addEventListener (MouseEvent.MOUSE_UP, dragStop6);
    function dragStop6 (event: MouseEvent): void
    {
    hen6_mc.stopDrag ();
    If (hen6_mc.hitTestObject (holder6_mc) == true)
    {
    hen6_mc.x = holder6_mc.x;
    hen6_mc.y = holder6_mc.y;
    }
    }

    You alreadsy have conditional statements in place as far as I can tell, you just need to add the ActionScript to display the tick...

    function dragStop1 (event: MouseEvent): void

    {

    hen1_mc.stopDrag ();

    If (hen1_mc.hitTestObject (holder1_mc))

    {

    hen1_mc.x = holder1_mc.x;

    hen1_mc.y = holder1_mc.y;

    View the tick code goes here

    }

    }

  • HELP text is not displayed. and cannot drag and drop photos

    OK well when I insert the text it does not show, but it shows what I wrote on the side. I have contact support their answer was that they cannot help me because I'm the trial verison. I'll just buy a program if the trial version does not work its that simple. Also when I try to drag-and - drop an image a little apears circle with the line through it. I have admin rights.

    Can you make sure you check on your drivers. If they are more up-to-date, which might be the cause of your problems.

  • Hi help me with drag and drop with as3 if you please

    Hello friends,

    I am a newbie to as3 in flash and had a prob with drag and drop features

    var dragArray:Array = [square_word, circle_word, triangle_word];

    var matchArray:Array = [squareMatch, circleMatch, triangleMatch];

    var posArray:Array = [{x: 276, y: 207}, {x: 443, y: 207}, {x: 107, y: 207}];

    var currentClip:MovieClip;

    var startX:Number;

    var startY: number;

    for (var i: int = 0; i < dragArray.length; i ++) {}

    dragArray [i] .buttonMode = true;

    dragArray [i] .addEventListener (MouseEvent.MOUSE_DOWN, item_onMouseDown);

    matchArray [i] .alpha = 0.2;

    }

    function item_onMouseDown(event:MouseEvent):void {}

    currentClip = MovieClip (event.currentTarget);

    startX = currentClip.x;

    startY = currentClip.y;

    addChild (currentClip); bring to front

    currentClip.startDrag ();

    stage.addEventListener (MouseEvent.MOUSE_UP, stage_onMouseUp);

    }

    function stage_onMouseUp(event:MouseEvent):void {}

    stage.removeEventListener (MouseEvent.MOUSE_UP, stage_onMouseUp);

    currentClip.stopDrag ();

    var int index = dragArray.indexOf (currentClip);

    var matchClip:MovieClip = MovieClip (matchArray [index]);

    If (matchClip.hitTestPoint (currentClip.x, currentClip.y, true)) {}

    a match was found. Position the clip using the values of posArray:

    currentClip.x = posArray [index] .x;

    currentClip.y = there posArray [index];

    make not draggable:

    currentClip.removeEventListener (MouseEvent.MOUSE_DOWN, item_onMouseDown);

    currentClip.buttonMode = false;

    } else {}

    football match has not, so send the clip to the back where he began:

    currentClip.x = startX;

    currentClip.y = startY;

    }

    in this code, that I'm not the subject abruptly to its original position if he fell into a movieclip wrong (as we should have the availability of droping the drag square circle alse object) and then we should have a button to check if everything is correctly matched, if not after clicking another button 'correctitself', we should get the good objects droping on correct locations automatically

    Please help with any suggestions ASAP

    }

    assign your listener matchall checkAllMatchF and use button:

    var dragArray:Array = [square_word, circle_word, triangle_word];

    var matchArray:Array = [squareMatch, circleMatch, triangleMatch];

    var posArray:Array = [{x: 276, y: 207}, {x: 443, y: 207}, {x: 107, y: 207}];

    var currentClip:MovieClip;

    var startX:Number;

    var startY: number;

    for (var i: int = 0; i< dragarray.length;="" i++)="">

    dragArray [i] .buttonMode = true;

    dragArray [i] .addEventListener (MouseEvent.MOUSE_DOWN, item_onMouseDown);

    matchArray [i] .alpha = 0.2;

    }

    function item_onMouseDown(event:MouseEvent):void {}

    currentClip = MovieClip (event.currentTarget);

    startX = currentClip.x;

    startY = currentClip.y;

    addChild (currentClip); bring to front

    currentClip.startDrag ();

    stage.addEventListener (MouseEvent.MOUSE_UP, stage_onMouseUp);

    }

    function stage_onMouseUp(event:MouseEvent):void {}

    stage.removeEventListener (MouseEvent.MOUSE_UP, stage_onMouseUp);

    currentClip.stopDrag ();

    var int index = dragArray.indexOf (currentClip);

    var matchClip:MovieClip = MovieClip (matchArray [index]);

    If (matchClip.hitTestPoint (currentClip.x, currentClip.y, true)) {}

    a match was found. Position the clip using the values of posArray:

    currentClip.x = posArray [index] .x;

    currentClip.y = there posArray [index];

    make not draggable:

    currentClip.removeEventListener (MouseEvent.MOUSE_DOWN, item_onMouseDown);

    currentClip.buttonMode = false;

    } else {}

    football match has not, so send the clip to the back where he began:

    currentClip.x = startX;

    currentClip.y = startY;

    }

    }

    function checkAllMatchF (): Boolean {}

    for (var i: int = 0; i<>

    If (dragArray [i] .x! = matchArray [i] .x | dragArray [i] there! = matchArray [i] there) {}

    Returns false;

    }

    }

    Returns true;

    }

  • Drag and Drop | Text | Submit | Help, please

    Hello. I really need help. I THANK YOU in advance.

    I'm building a contact with voting of profession flash with AS3. The feature will allow users to drag and drop choices OR add their own allow them to present their TOP 5 choices.

    PROBLEM:

    1 drag and move text is not submitted when it is moved to the editable text field.

    HOW CAN I DO this to ALLOW for DRAG AND drop the ITEMS to BE SUBMITTED or TEXT THAT IS ENTERED MANUALLY.

    This can be seen HERE: http://pttdt.com/winnipegcafes.php

    AS3 code so far:

    / * Drag and Drop

    Makes the instance for the specified symbol with drag and drop furniture.

    */

    choice_1.buttonMode = true;

    choice_1.mouseChildren = false;

    choice_1.addEventListener (MouseEvent.MOUSE_DOWN, fl_ClickToDrag);

    function fl_ClickToDrag(event:MouseEvent):void

    {

    choice_1.startDrag ();

    }

    stage.addEventListener (MouseEvent.MOUSE_UP, fl_ReleaseToDrop);

    function fl_ReleaseToDrop(event:MouseEvent):void

    {

    choice_1.stopDrag ();

    }

    / * Drag and Drop

    Makes the instance for the specified symbol with drag and drop furniture.

    */

    choice_2.buttonMode = true;

    choice_2.mouseChildren = false;

    choice_2.addEventListener (MouseEvent.MOUSE_DOWN, fl_ClickToDrag_2);

    function fl_ClickToDrag_2(event:MouseEvent):void

    {

    choice_2.startDrag ();

    }

    stage.addEventListener (MouseEvent.MOUSE_UP, fl_ReleaseToDrop_2);

    function fl_ReleaseToDrop_2(event:MouseEvent):void

    {

    choice_2.stopDrag ();

    }

    / * Drag and Drop

    Makes the instance for the specified symbol with drag and drop furniture.

    */

    choice_3.buttonMode = true;

    choice_3.mouseChildren = false;

    choice_3.addEventListener (MouseEvent.MOUSE_DOWN, fl_ClickToDrag_3);

    function fl_ClickToDrag_3(event:MouseEvent):void

    {

    choice_3.startDrag ();

    }

    stage.addEventListener (MouseEvent.MOUSE_UP, fl_ReleaseToDrop_3);

    function fl_ReleaseToDrop_3(event:MouseEvent):void

    {

    choice_3.stopDrag ();

    }

    / * Drag and Drop

    Makes the instance for the specified symbol with drag and drop furniture.

    */

    choice_4.buttonMode = true;

    choice_4.mouseChildren = false;

    choice_4.addEventListener (MouseEvent.MOUSE_DOWN, fl_ClickToDrag_4);

    function fl_ClickToDrag_4(event:MouseEvent):void

    {

    choice_4.startDrag ();

    }

    stage.addEventListener (MouseEvent.MOUSE_UP, fl_ReleaseToDrop_4);

    function fl_ReleaseToDrop_4(event:MouseEvent):void

    {

    choice_4.stopDrag ();

    }

    / * Drag and Drop

    Makes the instance for the specified symbol with drag and drop furniture.

    */

    choice_5.buttonMode = true;

    choice_5.mouseChildren = false;

    choice_5.addEventListener (MouseEvent.MOUSE_DOWN, fl_ClickToDrag_5);

    function fl_ClickToDrag_5(event:MouseEvent):void

    {

    choice_5.startDrag ();

    }

    stage.addEventListener (MouseEvent.MOUSE_UP, fl_ReleaseToDrop_5);

    function fl_ReleaseToDrop_5(event:MouseEvent):void

    {

    choice_5.stopDrag ();

    }

    / * Event mouseclick

    By clicking on the instance for the specified symbol performs a function in which you can add your own custom code.

    Directions for use:

    1. Add your custom code on a new line after the line that says "/ / Start your code custom" below.

    The code runs when the user clicks the symbol instance.

    */

    send_btn.addEventListener (MouseEvent.CLICK, fl_MouseClickHandler);

    function fl_MouseClickHandler(event:MouseEvent):void

    {

    / / Start your code custom

    / / This code example displays the words 'Mouse clicked' in the output panel.

    trace (box_1.text);

    trace (box_2.text);

    trace (box_3.text);

    trace (box_4.text);

    trace (box_5.text);

    trace (theName.text);

    trace (theEmail.text);

    / / End of your code custom

    }

    Please HELP

    Your code appears to only drag - move and nothing regarding the assignment, whatever it is, when an item is deleted.  So your problem is that you did not do anything to do what you say doesn't happen.

  • Need help with drag and drop

    IM really new to this program as a

    day new hehe and I need help. im making a game quiz and your supposed

    ED to score in the hoop with a circle.  I have the

    codes for the drag and drop for the circle, but I need help with the collision between the Hoop and the ball, I want to go to the image next or gotoandPlay when the ball touches the ring. HELP PLEASE

    You should not attach code to objects.  and you can be able to happen by using a loop.

    Start by removing all the code the suggested by maqro (i.e. as3) and by removing all the code attached to objects.

    use:

    {yourobject.onPress = function ()}

    this.startDrag ();

    }

    {yourobject.onRelease = yourobject.onReleaseOutside = function ()}

    this.stopDrag ();

    {if (this.) HitTest (whatever))}

    do something

    }

    }

  • Help with a Drag and Drop problem

    I design a simple drag and drop the game, ranking but I had several objects and targets, for example square shaped object cannot go to target square shape, but when I have 2 or more place then the square2, carre3 can not go to square target! I used the code as belo

    var objectoriginalX:Number;
    var objectoriginalY:Number;
    var counter: Number = 0;

    triangle_mc.buttonMode = true;
    triangle_mc.addEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
    triangle_mc.addEventListener (MouseEvent.MOUSE_UP, dropObject);

    circle_mc.buttonMode = true;
    circle_mc.addEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
    circle_mc.addEventListener (MouseEvent.MOUSE_UP, dropObject);

    square_mc.buttonMode = true;
    square_mc.addEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
    square_mc.addEventListener (MouseEvent.MOUSE_UP, dropObject);

    square2_mc.buttonMode = true;
    square2_mc.addEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
    square2_mc.addEventListener (MouseEvent.MOUSE_UP, dropObject);

    square3_mc.buttonMode = true;
    square3_mc.addEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
    square3_mc.addEventListener (MouseEvent.MOUSE_UP, dropObject);

    star_mc.buttonMode = true;
    star_mc.addEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
    star_mc.addEventListener (MouseEvent.MOUSE_UP, dropObject);

    poly_mc.buttonMode = true;
    poly_mc.addEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
    poly_mc.addEventListener (MouseEvent.MOUSE_UP, dropObject);

    function pickupObject(event:MouseEvent):void {}
    event.target.startDrag (true);
    event.target.parent.addChild (event.target);
    objectoriginalX = event.target.x;
    objectoriginalY = event.target.y;
    }
    function dropObject(event:MouseEvent):void {}
    event.target.stopDrag ();
    var matchingTargetName:String = "target" + event.target.name;
    var matchingTarget:DisplayObject = getChildByName (matchingTargetName);
    If (event.target.dropTarget! = null & & event.target.dropTarget.parent == matchingTarget) {}
    reply_txt. Text = "Good Job!"
    event.target.removeEventListener (MouseEvent.MOUSE_DOWN, pickupObject);
    event.target.removeEventListener (MouseEvent.MOUSE_UP, dropObject);
    event.target.buttonMode = false;
    Event.Target.x = matchingTarget.x;
    Event.Target.y = matchingTarget.y;
    counter ++;
    score_txt. Text = String (counter);

    } else {}
    reply_txt. Text = "Try Again!";
    Event.Target.x = objectoriginalX;
    Event.Target.y = objectoriginalY;
    -counter;
    score_txt. Text = String (counter);
    }
    }

    Thank you very much for your help!

    An easy way to handle this is to assign a variable for each target that will tell you whether or not it is still a usable lens... Let's say you name "usable", it starts as a true for each target value.  Once a target is used you change the value of this variable to false.  You use this variable as abother test in your conditional.  Something like...

    If (event.target.dropTarget! = null & event.target.dropTarget.parent == matchingTarget & event.target.dropTarget.useable ) {}

    event.target.dropTarget.useable = false;

  • Help code AS3 for drag and drop quiz

    I have a flash drag and drop quiz I want to add different images to match the correct veribage when users have dropped the case.

    I have text works well when the user deletes the folder (i.e. "Yes, that's correct! ', I'm sorry, is not correct.', 'congratulations, you're done!'")

    I don't know where to start and I was wondering if it was possible to add an image from the library onto the stage when the corresponding text appears on the stage?

    I have AS3 below code I use.

    Thanks for the help in advance!

    1.gif

    ////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////

    var startX:Number;

    var startY: number;

    var counter: Number = 0;

    folder_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    folder_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    folder2_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    folder2_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    folder3_mc.addEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    folder3_mc.addEventListener (MouseEvent.MOUSE_UP, dropIt);

    function pickUp(event:MouseEvent):void {}

    event.target.startDrag (true);

    reply_txt.text = "";

    reply_txt2.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) {}

    reply_txt.text = "Yes, that's correct!"

    reply_txt2.text = "Donec sed fermentum lorem. Suspendisse potentialit. Pellentesque hendrerit nunc vitae risus vel gravida Nam semper tempor had lorem sed nulla lacinia vel ante vitae commodo. CRAs ac dolor nibh. « ;

    event.target.removeEventListener (MouseEvent.MOUSE_DOWN, Pick-up);

    event.target.removeEventListener (MouseEvent.MOUSE_UP, dropIt);

    event.target.buttonMode = false;

    event.target.x = myTarget.x;

    event.target.y = myTarget.y;

                            counter ++;

                } else {}

    reply_txt.text = "I'm sorry, this is not correct.";  

    reply_txt2.text = "Lorem ipsum dolor sit amet, adipiscing elit computer. Surpassing massa tellus, ut euismod urna. Phasellus bibendum pretium porta. Praesent sed elit vel odio dignissim in tortor ultrices. »

    reply_txt3.text = "Try Again";

    event.target.x = startX;

    event.target.y = startY;

                }

    if(counter == 3)

                   ){

    reply_txt.text = ' congratulations, you're done! "

    reply_txt2.text = "";

        }

    }

    folder_mc.buttonMode = true;

    folder2_mc.buttonMode = true;

    folder3_mc.buttonMode = true;

    Yes, to add a library on the stage using actionscript object to assign the object a class, tell ImageClass.  You can then use the new constructor to create an instance, and then add it to the display list:

    var image: ImageClass = new ImageClass();

    addChild (image);

  • With the help of Hewlett Packard Win 7 64 bit with Lightroom 5.7. I have read many explanations of how to drag and drop digital images in Lightroom - but I never got.  I need to know WHERE LTRM drop, HOW to find them and how to get them I

    I need to know EXACTLY how to drag and drop digital pictures into LTRM. WHERE to put them. HOW to find them. How to MOVE in the DEVELOPMENT MODULE.

    When you drag / drop photos, you actually perform a step to import, so it would be wise to figure out how to import your photos and all of the affected options. I agree with Jim Hess and al., drag / drop are an easy way to screw up your organization. Importing is a much more organized way to manage things. There are a lot of tutorial vid3os on import.

  • Drag and drop helps!

    Hey guys,.

    I am in need of assistance with my drag and drop code. I have 3 Movieclips (mc, mc1, mc2). With an area (targetCircle). For the moment, it is when I do drag of the clips in the target area and then replace it with an another movieclip, the movieclip that was in the target area goes back to the original position of the movieclip that I just replaced with the recent movieclip.

    Thus for example shown in the picture below, 'mc' is in the target zone for the moment, and its original position is shown in the picture. Let's say I have take "mc2" and drag it to replace "mc" in the target area. What is happening is "mc" goes where "mc2" original position up to the top. Where "mc" should be going back to his appointed to the top post.

    Example Image:

    123.png1234.png

    Here is my code:

    import fl.transitions.Tween;
    import fl.transitions.easing.*;
    
    showtext.visible = false;
    showtext1.visible = false;
    showtext2.visible = false;
    
    // initialize your draggable MovieClips
    mc.addEventListener(MouseEvent.MOUSE_DOWN, mouseHandler);
    mc1.addEventListener(MouseEvent.MOUSE_DOWN, mouseHandler);
    mc2.addEventListener(MouseEvent.MOUSE_DOWN, mouseHandler);
    
    var xpos:Number;
    var ypos:Number;
    var draggedMc:String;
    var hittingMc:String = "";
    
    function mouseHandler(e:MouseEvent):void{
        switch(e.type){
            case "mouseDown":
                draggedMc = e.target.name;
                xpos = e.target.x;
                ypos = e.target.y;
                setChildIndex(getChildByName(e.target.name), this.numChildren-1);
                e.target.startDrag();
                stage.addEventListener(MouseEvent.MOUSE_UP, mouseHandler);
            break;
            case "mouseUp":
                stopDrag();
                stage.removeEventListener(MouseEvent.MOUSE_UP, mouseHandler);
                checkPosition();
            break;
            default:
                trace("Error");
            break;
        }
    }
    function checkPosition():void{
        // tests if the draggable object hits the targetCircle
        if(getChildByName(draggedMc).hitTestObject(targetCircle)){
            var xEndPoint:Number = targetCircle.x + ((targetCircle.width / 15) - (getChildByName(draggedMc).width / 15));
            var yEndPoint:Number = targetCircle.y + ((targetCircle.height / 15) - (getChildByName(draggedMc).height / 15));
        
         if(getChildByName(draggedMc) == mc) {
              showtext.visible = true; 
              }else{
                   showtext.visible = false; 
              }
              
              if(getChildByName(draggedMc) == mc1) {
              showtext1.visible = true; 
              }else{
                   showtext1.visible = false; 
              }
              
              if(getChildByName(draggedMc) == mc2) {
              showtext2.visible = true; 
              }else{
                   showtext2.visible = false; 
              }
              
              if(hittingMc == ""){
                var tween1:Tween = new Tween(getChildByName(draggedMc),"x",Strong.easeOut,getChildByName(draggedMc).x,xEndPoint,.5,true);
                var tween2:Tween = new Tween(getChildByName(draggedMc),"y",Strong.easeOut,getChildByName(draggedMc).y,yEndPoint,.5,true);
                hittingMc = draggedMc;
            }
            else if(hittingMc != "" && hittingMc != draggedMc){
                var tween3:Tween = new Tween(getChildByName(draggedMc),"x",Strong.easeOut,getChildByName(draggedMc).x,xEndPoint,.5,true);
                var tween4:Tween = new Tween(getChildByName(draggedMc),"y",Strong.easeOut,getChildByName(draggedMc).y,yEndPoint,.5,true);
                var tween5:Tween = new Tween(getChildByName(hittingMc),"x",Strong.easeOut,getChildByName(hittingMc).x,xpos,.5,true);
                var tween6:Tween = new Tween(getChildByName(hittingMc),"y",Strong.easeOut,getChildByName(hittingMc).y,ypos,.5,true);
                hittingMc = draggedMc;
            }else{
                var tween7:Tween = new Tween(getChildByName(draggedMc),"x",Strong.easeOut,getChildByName(draggedMc).x,xEndPoint,.5,true);
                var tween8:Tween = new Tween(getChildByName(draggedMc),"y",Strong.easeOut,getChildByName(draggedMc).y,yEndPoint,.5,true);
            }
        }
         
         
         
        else if(hittingMc == draggedMc) {
            hittingMc = "";
        }
         
         else{
            var tween9:Tween = new Tween(getChildByName(draggedMc),"x",Strong.easeOut,getChildByName(draggedMc).x,xpos,.5,true);
            var tween10:Tween = new Tween(getChildByName(draggedMc),"y",Strong.easeOut,getChildByName(draggedMc).y,ypos,.5,true);
        }
    }
    
    

    Import fl.transitions.Tween;
    Fl.transitions.easing import. *;

    ShowText.Visible = false;
    showtext1. Visible = false;
    showtext2. Visible = false;

    var xArr:Array = new Array();
    var yArr:Array = new Array();


    initialize your draggable MovieClips
    for (var i: int = 0; i<>
    This ["mc" + i] .addEventListener (MouseEvent.MOUSE_DOWN, mouseHandler);
    xArr.push (this ["mc" + i] .x);
    yArr.push (this ["mc" + i] there);
    }

    var xpos:Number;
    var ypos:Number;
    var draggedMc:String;
    var hittingMc:String = "";

    function mouseHandler(e:MouseEvent):void {}
    {Switch (e.type)}
    case "mouseDown":
    draggedMc = e.target.name;
    PosX = e.target.x;
    YPos = e.target.y;
    setChildIndex (getChildByName (e.target.name), this.numChildren - 1);
    e.target.startDrag ();
    stage.addEventListener (MouseEvent.MOUSE_UP, mouseHandler);
    break;
    case "mouseUp":
    stopDrag();
    stage.removeEventListener (MouseEvent.MOUSE_UP, mouseHandler);
    checkPosition();
    break;
    by default:
    trace ("Error");
    break;
    }
    }
    function checkPosition (): void {}
    tests whether the draggable object strikes the targetCircle
    {if (getChildByName (draggedMc) .hitTestObject (targetCircle))}
    var xEndPoint:Number = targetCircle.x + ((targetCircle.width / 15)-(getChildByName (draggedMc) .width / 15));
    var yEndPoint:Number = targetCircle.y + ((targetCircle.height / 15)-(getChildByName (draggedMc) .height / 15));
       
    If (getChildByName (draggedMc) == mc0) {}
    ShowText.Visible = true;
    } else {}
    ShowText.Visible = false;
    }
             
    If (getChildByName (draggedMc) == mc1) {}
    showtext1. Visible = true;
    } else {}
    showtext1. Visible = false;
    }
             
    If (getChildByName (draggedMc) == mc2) {}
    showtext2. Visible = true;
    } else {}
    showtext2. Visible = false;
    }
             
    If (hittingMc == "") {}
    var tween1:Tween = new Tween (getChildByName (draggedMc), "x", Strong.easeOut, getChildByName (draggedMc) .x, xEndPoint,.5, true);
    var tween2:Tween = new Tween (getChildByName (draggedMc), "y", Strong.easeOut, getChildByName (draggedMc) there, yEndPoint,.5, true);
    hittingMc = draggedMc;
    }
    ElseIf (hittingMc! = "" & hittingMc!) = draggedMc) {}
    var tween3:Tween = new Tween (getChildByName (draggedMc), "x", Strong.easeOut, getChildByName (draggedMc) .x, xEndPoint,.5, true);
    var tween4:Tween = new Tween (getChildByName (draggedMc), "y", Strong.easeOut, getChildByName (draggedMc) there, yEndPoint,.5, true);
    var temp:int=int(hittingMc.charAt(2));
    var tween5:Tween = new Tween (getChildByName (hittingMc), "x", Strong.easeOut, getChildByName (hittingMc) .x,xArr [temp],. 5, true);
    var tween6:Tween = new Tween (getChildByName (hittingMc), "y", Strong.easeOut, getChildByName (hittingMc) there,yArr [temp],. 5, true);
    hittingMc = draggedMc;
    } else {}
    var tween7:Tween = new Tween (getChildByName (draggedMc), "x", Strong.easeOut, getChildByName (draggedMc) .x, xEndPoint,.5, true);
    var tween8:Tween = new Tween (getChildByName (draggedMc), "y", Strong.easeOut, getChildByName (draggedMc) there, yEndPoint,.5, true);
    }
    }
        
        
        
    of other if(hittingMc == draggedMc) {}
    hittingMc = "";
    }
        
    else {}
    var tween9:Tween = new Tween (getChildByName (draggedMc), "x", Strong.easeOut, getChildByName (draggedMc) .x, xpos,.5, EU tr);
    var tween10:Tween = new Tween (getChildByName (draggedMc), "y", Strong.easeOut, getChildByName (draggedMc) there, ypos,.5, EU tr);
    }
    }

    Note: Once you drag the first position the xpos and ypos are updated to the item newly slipped. That's why itz to another location. Please copy and paste the code it works.

  • Help with Drag and Drop text

    I am trying to create a series of text objects that I can drag and drop on the screen. I'm trying to text fields in a movieClip container from the Drag and Drop will not work on text fields. When I do that, Flash still sees the objects as fields of text rather than the video clips, and I get the following error.

    ReferenceError: Error #1069: property not found startDrag on flash.text.TextField and there is no default value.
    at chris_fla::MainTimeline/startDragging()

    I'm a newbie to this. What I am doing wrong? Thank you!

    Russ

    Use currentTarget instead of the target.

  • How drag and drop a picture into a shape of the object?

    On my old Lion system that I used to be able to drag a picture from iphoto in the shape of the object open in Pages.  I can't be able to do more.  The system changed?  I tried to use Inspector (under help), but it won't let me access the file of the photo on the right.

    You can drag and drop a picture in a form in v4.3 Pages ' 09, but this can be done in any version of v5 Pages. Quite different applications, as well as more recent Pages has lost about 100 features that were in its antecedent.

    Check if you have Pages ' 09 v4.3 in your Applications: iWork ' 09 file. If so, use it.

    Pages v5 requires that you select a shape, and then on the Image tab in the right panel, you choose Image, scale to fill fill, and then select your image for the background. You cannot select this image from the inside, but you can add text to the form that will appear on your image.

  • Firefox bookmarks bar does not allow me to drag-and - drop Web site icons. I went into the display and click on "bookmarks bar".

    Firefox bookmarks bar does not allow me to drag-and - drop Web site icons. I went into the display and click on "bookmarks bar". bookmarks bar but her but its not allowing me to drag and drop the icon on the toolbar. I tried everything it is supposed to do, but his does not work. his frustration.

    Stef. /. \

    Make sure the toolbars like the toolbar 'Navigation' and the 'personal bar' are visible.

    • View > toolbars
    • Right click on empty toolbar space

    Use the toolbar (Customize) to open the Customize and set the toolbar to display items.

    • Make sure the "bookmarks toolbar items" are on the personal bar
    • If "Bookmarks Toolbar items" is not on the bookmarks toolbar, then FRY it in the palette of the toolbar in the window the bookmarks toolbar Customize
    • If the missing elements are in the toolbar palette then drag them from the window, customize the toolbar
    • If you do not see an item on a toolbar in the toolbar palette and then click the button "Restore default" to restore the default toolbar configuration

    You can check the problems caused by a corrupt localstore.rdf file if the above didn't help.

  • I can't make screenshot o do drag and drop on the desktop

    Hi all

    When I do a screenshot (entire window or a selection) I do not see the genereated .png image, but it plays the sound "trigger". If I drag and drop a file on the desktop, the file is not visible.

    If I alt + right click on station Home/Finder icon and re - open Finder, files are visible.

    I tried to remove the com.apple.finder.plist and other files, as illustrated in a tutorial, but after some time of work, it brokes again.

    On the console there are no significant errors.

    Any help is appreciated. Thank you.

    If I understand your description of the problem, no files at all are visible on the desktop. You restart the Finder and the files reappear, but then at some point, they disappear again. Is this correct?

Maybe you are looking for