Drag and drop counter which activates a animation when certain number is reached

     Hi there guys, I was wondering if anyone could help me with this problem, I'm using adobe edge to create a drag and drop game and I want edge to use a counter to track how many draggable parts have been dropped in their repective targets, when a certin number of elements have been dropped I would like edge to automaticly reveal a button so the user can move on. I have the code and I think I may be on the right track but I may be miss placing some code
Any help woud be great
   // insert code to be run when the symbol is created here
         yepnope({nope:['jquery-ui-1.10.4.custom.min.js', 'http://code.jquery.com/jquery-1.11.0.js'], complete: init});
         function init(){
                   //Use the code! Draggable! Droppable!!
                   sym.$('Leftpole3').draggable({opacity:.5, revert:'invalid'});
                   sym.$('Leftpole2').draggable({opacity:.5, revert:'invalid'});
                   sym.$('Leftpole1').draggable({opacity:.5, revert:'invalid'});
                   //Droppable
                   sym.$('Leftpole3target').droppable({
                             accept:sym.$("Leftpole3"),
                             drop: function () { 
                                                  sym.setvarible("count", count + 1)
                             sym.getSymbol("Leftpole3").play();  
                   sym.$('defaultpole3').droppable({
                             accept:sym.$("Leftpole3"),
                             drop: function () {
                   sym.$('Leftpole2target').droppable({
                             accept:sym.$("Leftpole2"),
                             drop: function () {
                                                  sym.setvarible("count", count + 1)
                                                  sym.getSymbol("Leftpole2").play();
                   sym.$('defaultpole2').droppable({
                             accept:sym.$("Leftpole2"),
                             drop: function () {
                   sym.$('Leftpole1target').droppable({
                             accept:sym.$("Leftpole1"),
                             drop: function () {
                                                  sym.setvarible("count", count + 1)
                             sym.getSymbol("Leftpole1").play();
                   sym.$('defaultpole1').droppable({
                             accept:sym.$("Leftpole1"),
                             drop: function () {
         // Set the value of a Symbol variable
         sym.setVariable("count",0);
         if("count"==3) {
            sym.getSymbol('Text2').play();

Hi,
I don't know whether you have sorted this problem out but I have a drag drop just the same as you have described and I have got it working.
I found that adding the if statement for the count ==3 to the droppable, drop: function works.
You will just have to have it like this for example:
drop: function ()
     sym.setvarible("count", count + 1)
     if (count ==3)
          sym.getSymbol('Text2').play();
This is the way have it working, hope it helps

Similar Messages

  • Cant drag and drop from file-roller to nautilus when using List View

    Hi, im using file-roller and i can only use drag and drop feature from file-roller when i use Icon View. If i select List View i cant drag and drop.
    Is that an expected behavior or its a bug? Is there a patch or work around? (File Roller 2.20.1 and Gnome 2.20.2)
    I think its a problem with file-roller cause in my other box, running ubuntu 7.10 i have the same problem, but i can drag and drop from ark even when using List View.
    Thx!

    Well, sorry for the double post, but after a little research i found this is a bug, actually a not yet implemented feature. There is a patch and probably its going to be merged in next version.
    Ill try to apply the patch myself, if it works could the maintainer Jan de Groot put it on the repository?
    Here is the bug: http://bugzilla.gnome.org/show_bug.cgi?id=171655
    Here is the patch: http://bugzilla.gnome.org/attachment.cg … ction=view
    Cya

  • Drag and Drop Interaction - Incomplete

    Hi
    I have began using the Drag and Drop Interaction which is working really well. I have one issue that I cannot see how to do,  I hope there is a possible solution somewhere.
    All other questions have an incomplete caption that appears when you click submit but have not selected any options or selected any hotspots. Is there a way to make this happen with the D&D interaction? I use this as part of an assessment and would like it that the user cannot skip until they have at least attempted to drag an item.
    Can anyone assist?
    Thanks

    I suppose it is a validated D&D since you are talking about a question. If not everything is done, it is clearly a Failure, which means that you can use the Failure event to trigger a conditional advanced action that checks if all drag actions have been done that were expected. For that reason you'll have to track the drag actions, maybe by using the Object actions and a counter...
    Drag&Drop tips - Captivate blog

  • Rated drag and drop

    Hello everyone. I apologise for asking a question that has probably been answered previously. I have a dilemma with my animation that I have tried prowling the Internet for for quite some time now and I have yet to find a solution to fit what it is I'm after.
    The animation that I am making in Edge is a drag and drop game which gives students varied results based on how they do. Currently I have the elements dragging and dropping in their correct locations. Once they are in their locations though they do not drag again, making the students have no choice but to get everything correct. After the animation is complete the timeline plays and stops at a marker (Which will be altered based on the answers the students have provided at a later point).
    What I need from this animation is to:
    allow students to drag and drop elements into both correct and incorrect locations.
    to be able to drag them again after placing them.
    to keep a track of the amount of elements that have been dropped.
    I would be incredibly grateful for any comments and feedback on this. I hope I am not the only one who has tried to do this. It feels like I am the only one who is having a problem like this!
    Here is my code currently as well as I am sure I am at least halfway there. The final line (sym.play();) is just for the timeline playing and will change at a later point.
    // insert code to be run when the composition is fully loaded here var dragForms = ['Drag1', 'Drag2', 'Drag3', 'Drag4', 'Drag5']; var dropForms = ['Drop1', 'Drop2', 'Drop3', 'Drop4', 'Drop5']; var Pos = [ {'x':29,'y':115}, {'x':29,'y':160}, {'x':29,'y':205}, {'x':29,'y':250}, {'x':29,'y':295} ]; Pos.sort(function() {return 0.5 - Math.random()}); for (i=0;i

    Hi,
    Excellent helpfull demonstration for dragNdrop.
    I am trying to place if else condition with no success.
    I've changed the code to this
    f
    for (i=0;i<3;i++){
      sym.$(draggableEl[i]).addClass('C');
      sym.$('.C').draggable({
      revert: 'invalid'
      sym.$(droppableEl[0]).droppable({
      accept:'.C',   // use class for accept
      drop: handleDropEvent
    for (i=3;i<6;i++){
      sym.$(draggableEl[i]).addClass('CB');
      sym.$('.CB').draggable({
      revert: 'invalid'
      sym.$(droppableEl[5]).droppable({
      accept:'.CB',   // use class for accept
      drop: handleDropEvent
    and I want:
    if drag fruit with class "C" to basket5
    to alert ("This fruit is for Basket0");
    else if drag fruit with class "C" to basket0
    to alert ("Excellent, Right Basket");
    if drag fruit with class "CB" to basket0
    to alert ("This fruit is for Basket5");
    else if drag fruit with class "CB" to basket5
    to alert ("Excellent, Right Basket");
    How can I done it?
    Can you help me?
    Thank you!

  • Drag and Drop (re-order) Thumbnails in Organizer

    I am using Photoshop Elements version 5.0.2
    I would like to re-order pictures in an order that will make sense for me in my business. I suppose I can go through each pix and change the time on them, so I can then sort by time stamp.
    Is there an easier way to do this? I was hopeful that I could drag and drop them in Thumbnail view - but I cannot.
    Thank you,
    Jamie

    >Is there anyway to delete the photos in the main well, without losing them from my collection?
    As I understand the design, the main well is intended to be all the photos that you are managing with Photoshop Elements.
    Collections are used to display a specific group of those photos in your chosen sequence for any given activity.
    I suspect that since you are using a consumer product such as Photoshop Elements for your business purpose, you may need to make some compromises like having a default (the main photo well) display sequence which you see first when starting PSE that is not what you would choose.
    This is not bad if PSE does what you want - just additional steps to switch to the Collection view and also to maintain (drag and drop) the sequencing of the collection when you add additional photo files to a Collection.

  • Drag and drop imported photos in iPhoto '09 causes duplication of old existing photos and loss if new photos

    Good Afternoon All,
    I'd be grateful for any help with the following problem.
         After importing about 30 photos from my camera into iPhoto '09 (version 8.1.2), I selected the first group of 10 and dragged and dropped them into an existing album in my iPhoto library.        I repeated this process with another  group of photos , dropping them into a different existing album. Again, I repeated this process with the last remaining photos from the original imported group of 30.
          This is exactly the same process I have used successfully on many previous occasions when adding to my iPhoto library of 6000+ photos.
           However when I later opened each of the 3 existing albums to check on the 30 new photos none of these new photos were visible.     Instead each of the three albums now contained between 5 and 15 duplicates of old photos from different and unrelated albums in addition to their normal content.       These duplicates were not present before I imported the 30 new photos.    I then opened every Album in my entire library of 6000+ photos  without finding any sign of the 30 new photos.   These 30 photos have also disappeared from "Last Import" which now shows a blank page with 0 imports.
         I still have the 30 new photos saved on my camera and could import them again. My concern is that with my very limited diagnostic skills re. my iMac OS X (10.6.8) I may aggravate the problem
    Thank you

    Morning Terence
                             Thank you for your suggestion. When I held the Option Key and opened iPhoto the resulting menu showed 2 libraries , "iPhoto Library" and "iPhoto Library (default )". 
         I then recalled that 12 months ago I had created this duplicate library when attempting to recover some lost photos.    On opening each of these two libraries in turn, I notice that they are not identical.  Rather than create another new library, I imported some new photos into "iPhoto Library "  and was then able to drag and drop successfully into this library.    When I tried to do the same with "iPhoto Library (default )"  all the problems originally described re-occured.
         Having found the problem is in the Default library I would now like to move some photos from it into "iPhoto Library" and then remove the Default Library.
         Could you recommend how best to do this or is it not a good idea?
    Regards.....Gilvin

  • What is the policy for drag-and-drop in training mode?

    Hi,
    I've captured an application in training mode. It contains one drag-and-drop action which obviously is done in full motion recording.
    Only thing is, this doesnt work when you then do the simulation as a user.
    Can drag-and-drop working in this mode? It seems not.
    Can anyone advise?
    Thanks,
    Joan

    Hi there
    I'm guessing that you mean to ask if one is able to force a user to perform a drag-and-drop as part of a simulation?
    Unless you program it in Flash or some other application it isn't avaiable. Check the link below for more.
    Click here to view
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • Drag and drop problem from wizard inside another drop

    I am using JDK 1.5.0_11 Swing.
    I am facing a Drag and Drop problem which is described below:
    A drag and drop operation invokes a wizard, from which another wizard is invoked. Within one of the panels of this 2nd wizard, I am trying to do a drag and drop from a JTextarea to a JTree node, but am NOT able to. I am not getting any exceptions. I have written a transfer handler for the JTree node to handle the text transfers from a JTextArea. When I try to do a drag and drop from a JTree node to another JTree node I'm getting the 'InvalidDNDOperation: drag and drop in progress' exception.
    When the 2nd wizard is invoked directly, I am able to do the drag and drop from JTextArea to a JTree node and also from a JTree node to another JTree node.
    I tried spawning a new thread for the 2nd wizard, but am still unable to initiate drag and drop.
    Should I be spawning a new thread for the 1st wizard?
    Message was edited by:
    sbandyop

    Please post Swing questions in the Swing forum: http://forum.java.sun.com/forum.jspa?forumID=57

  • Flash Drag and Drop interaction

    I have created a Flash SWF with a drag and drop interacation.
    Previewed in Flash, it works perfectly; the mc object can be picked
    up, and locks on the target when released, and dynamic text
    displays to tell the user that the match is right.
    When imported into Captivate, the swf appears to be a static
    file. Nothing can be moved.
    I redid it using older actionscript allowing it to be
    exported as a Flash v6 file; in this version, the mc object can be
    moved, but does not lock on the target when dropped, and the
    dynamic text box is blank.
    Both Flash and Captivate are CS3.
    Is this simply not compatible in Captivate? Searching for
    help on drag and drop isn't helpful because it brings up info
    relative to the drag and drop quiz, which is not what I need; this
    file is dragging and dropping images.
    Any assistance will be greatly appreciated, thanks!

    I don't know how much help it will be but you should check
    out
    this
    link to a page at Paul Dewhurst's web-site "RaisingAimee". You
    may not be able to get to that page until you register as a user on
    Paul's site. If you run into that, register, then try the link
    again.
    If this is any help to you, drop a few pieces-of-eight in
    Paul's PayPal account, and maybe send him a personal "thank you" on
    his Shout Box. If it doesn't work, it might be because those
    particular FLAs were created for version 1, as I remember, and may
    be to some extent version-specific. In any case, it might be worth
    a try.
    ~best wishes for your success,
    Larry

  • Error in drag and drop with a Tree component

    Hello, everybody.
    I'm doing a drag and drop with two trees.
    But, when I drag from a tree to another show this error:
    "oracle.job.RowNotFoundException:JBO25020: View line of oracle.jbo.Key[4.4] key not found in ViewTreeNodeRepository13_71."
    Besides that, in my property SelectionListerner, when I have this line: "#{bindings.TreeNodeRepository.treeModel.makeCurrent}" there is a warning that says: "Reference makeCurrent not found".
    Anyone can help me?
    Thanks!

    Hi,
    +Besides that, in my property SelectionListerner, when I have this line: "#{bindings.TreeNodeRepository.treeModel.makeCurrent}" there is a warning that says: "Reference makeCurrent not found".+
    Don't worry, its a designtime warning because the EL cannot be resolved. MakeCurrent is a method on the FacesCtrl binding equivalent to ADF, which is applied at runtime and not available at design time
    +But, when I drag from a tree to another show this error: "oracle.job.RowNotFoundException:JBO25020: View line of oracle.jbo.Key[4.4] key not found in ViewTreeNodeRepository13_71."+
    In drag and drop, ADF Faces performs the drag. However, the rest of the drop handling is up to the developer. Without any more information of what yur drop handler is doing, this question cannot be answered
    Frank

  • [ASK] Show Object with Drag and Drop Condition

    Hello guys,
    I just finished making my simple drag and drop quiz which i've already mentioned in the previous thread. But i still have a problem. I've searched through the Internet, but i didn't find any case similar with my case.
    Please take a look at this picture :
    I want to hide the "nextbutton" (D button) then show (unhide) the button with some conditions, here are the conditions :
    If "p=>~q" square dragged on "A" white square && "~q" square dragged on "B" white square && "~p" square dragged on "C" white square then,
    Button D = visible
    else
    Button D = not visible
    How can i do this in actionscript 3.0?
    Any help would be appreciated. Thank you very much.

    I'm sorry, i haven't told you that i've already tried to do it with hitTestObject function, but it doesn't work, the D button never shows up even i dragged the squares on the right spot, here is some of the actionscript :
    Square_4 = pnotq
    Square_5 = notq
    Square_1 = notp
    /* Stop at This Frame
    The Flash timeline will stop/pause at the frame where you insert this code.
    Can also be used to stop/pause the timeline of movieclips.
    stop();
    //Hide and Show Actionscript
    if(Square_4.hitTestObject(Target_2) && Square_5.hitTestObject(Target_1) && Square_1.hitTestObject(Target_3)){
    Next.visible=true;
    } else {
    Next.visible=false;
    //ButtonMode Actionscript
    Square_1.buttonMode = true;
    Square_4.buttonMode = true;
    Square_5.buttonMode = true;
    //Some part of the Drag and Drop Actionscript
    (I made drag and drop for all the squares (1-7))
    var startX:Number;
    var startY:Number;
    Square_4.addEventListener(MouseEvent.MOUSE_DOWN, pickMe);
    Square_4.addEventListener(MouseEvent.MOUSE_UP, dropMe);
    function pickMe(event:MouseEvent):void {
        event.target.startDrag(true);
        startX = event.target.x;
        startY = event.target.y;
    function dropMe(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 == Target_2){
            event.target.removeEventListener(MouseEvent.MOUSE_DOWN, pickMe);
            event.target.removeEventListener(MouseEvent.MOUSE_UP, dropMe);
            event.target.buttonMode = false;
            event.target.x = Target_2.x;
            event.target.y = Target_2.y;
        } else {
            event.target.x = startX;
            event.target.y = startY;

  • Audio on drag and drop source

    Hello all,
    I am looking for a way to get a drag and drop source play an audio file when clicked, Such that the user click first to listen to the audio and then places the source on the right target.
    Any idea or workaround will be appreciated.
    thanks in advance.

    Just tested this out, have also a look at this screenshot:
    In this example I used shapes for target (Targx) and Drag Sources (Dragy). I created a duplicate for each drag source, located in the same place, but without stroke/fill and acting as a button. Those are the BtAudioz objects on the timeline They can be under the drag sources since those are non-interactive and will not limit the functionality of the shape buttons. I don't know what your actions are for the D&D, which will pause at 1.5secs, so I just pushed the pausing of the audio buttons bit closer to the end. It depends on your situation. To prevent releasing the playhead when one of the buttons is clicked, you have to use an advanced action to play the audio clip, or, which I did here, a shared action. That action has only one command 'Play Audio' and the audio clip will be the parameter if you use a shared action as I did. It works perfectly.

  • I cant drag and drop songs from my music library to my i phone (no entry sign appears)?

    i cant drag and drop songs which i have purchased directly from my i phone 5 to my music library (no entry sign appears)? why is this?
    also i cant change my email address in i tunes, any ideas on this one too?
    Cheers all.

    Hello Alfonso,
    In order to do this, you'll need to enabled 'manual mode' on your iPhone.
    Managing content manually on iPhone, iPad, and iPod
    http://support.apple.com/kb/HT1535
    Cheers,
    Allen

  • Unable to drag and drop out of aperture

    Hi,
    As of a few days ago i've had a slight problem with my aperture libary.
    I can no longer drag and drop images out of aperture onto the desktop or other apps etc.
    I have not changed anything it was working fine until just recently - I haven't modified or done anything to change the behaviour.
    Aperture settings has previews enabled.
    I have attempted to regenerate previews by selecting images and clicking regenerate
    I have rebuilt permissions
    I have rebuilt the entire library
    I have re-installed aperture
    I have manually deleted previews and thumbnails from within the aperture library to force a rebuilt.
    Nothing works.
    I cannot drag out files
    with the exeption I can drag and drop files which have had edits done to it - so the original master has been edited and it's created a modified version.
    As I said - previews are enabled and I can also right click and export version or master without issues for any files.
    I have latest versions of aperture 3.

    Dan,
    can you please clarify  a few points?
    Aperture settings has previews enabled.
    Have you enabled "New projects automatically share Previews"?
    How is "Share Preview with iLife set"?
    I have manually deleted previews and thumbnails from within the aperture library to force a rebuilt.
    Has the rebuild worked?  Have you checked in the "Masters" folder, if the previews actually exist for the images, that will not be dragged?
    Have you checked each project in question, of the Previews for that project are enabled?
    Select each of the the projects in question and ctrl-click (right-click) the gear-icon in the upper right corner of the Library inspector. Check the setting for "Maintain previews for project".
    If the previews are disabled in that menu, you cannot drag previews from the library.
    Regards
    Léonie

  • Drag and drop does not work in Exported release build

    I am using the built in DragManager class to handle some drag and drop functionality in an application.  When running from flex builder, It runs exactly as expected, but when I export the project to a release build, Dragging only works in the vertical direction.  How is this possible?  What might be causing such strange behavior.
    Any help would be much appreciated.

    Sorry, I will try to be more clear.  I am using drag and drop simply to move items around on a Canvas.  This works perfectly when running from flex builder, but when i export a release build it starts behaving strangely.
    I can drag items up or down on the canvas no problem, but as soon as I try to drag items left or right, there is no response.  On a windows machine, it gives me the black circle with a slash through it icon, implying that the drag is not accepted.  On Mac, there is no icon, it simply will not drag. 
    Hope that clarifies it, I could really use some help figuring this issue out.
    Update:
    I can confirm that the call to DragManager.acceptDragDrop is being reached in both cases, but the DragEvent.DRAG_DROP event is not being handled in the release build, (it is reached when run from flex builder)

Maybe you are looking for