The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 12 of 12

Thread: help with drag n drop

  1. #1

    help with drag n drop

    I have this drag n drop that is refusing to work right. It does drag and drop, but doesn't execute what I'm telling it to do when the submit btn is clicked.

    I need it to either say "Congrats", or say "try again and reset" or say "Sorry".

    I'm attaching the file stripped from graphics if anyone can help me..Please do!!!!!

    Thanks
    Attached Files Attached Files

  2. #2
    else if (firstTry) {
    for (var i =1;i<=itemcount;i++) {
    var obj = eval('item'+i);
    obj._x = obj.start_x;
    obj._y = obj.start_y;
    }
    feedbackText = tryagainFeedback;
    firstTry = false;
    }

    in the function checkAnswers() make sure the variable in the for loop has no capital letter in it. you a had written for (var i =1;i<=itemCount;i++) {

  3. #3
    Thank you! I fixed that but for some reason it's still giving me the spinning ball, i.e. an abort script mesg.

    I'm doomed!

    I've tried everything and the script abort msg doesn't go away..

  4. #4

    Thank you, Macaroni !!

    The spinning ball went away. Now I just have to make the rest button to work..If you have any ideas, please let me know.

    You helped me tremendously!!:

  5. #5

    Reset dragged clips to original location

    I have this to initialize my clips:

    Code:
    function initializeItem(obj) {
        obj.startx = obj._x;
        obj.starty = obj._y;
        obj.returnFlag = false;    
    }
    but If a code a button to reset the clips using:
    Code:
    resetBTN.onRelease = function{
    obj.startx = obj._x;
        obj.starty = obj._y;
    }
    it doesn't put them back where they were before they were dragged and dropped to the target clips.

    Everything else is working fine, but I tried different combinations to reset the clips and nothing happens.

    Any lights?? The file is still the one in the original post, with the correction marked by Macaroni ( thanks again!!)

    Brisa

  6. #6
    I haven't looked at your file but if you want your obj mc to go back to it's initial _x and _y you have to do

    Code:
    resetBTN.onRelease = function{
    obj._x = obj.startx;
    obj._y = obj.starty;
    }

  7. #7

    Kritical

    I tried that too and it didn't work.

    Still in search for help.

    Thank you!!!

    Bri

  8. #8
    ok first ull need to make a loop and to make sure u return all the boxes return.
    and then reset all the variables u have used. so....

    resetBTN.onRelease = function(){
    for (var i=1;i<=itemcount;i++) {
    var obj = eval('item'+i);
    var tarObj = eval('targetClip'+i);
    tarObj.full = false;
    obj._x = obj.startx ;
    obj._y = obj.starty;

    }
    resetClip = false
    }

    i think that should work.

  9. #9
    just had another look...and i ull need to change this "else if" statement.

     
    else if (firstTry) {
    for (var i =1;i<=itemcount;i++) {
    var obj = eval('item'+i);
    var tarObj = eval('targetClip'+i);
    tarObj.full = false;
    obj._x = obj.startx ;
    obj._y = obj.starty;
    }
    feedbackText = tryagainFeedback;
    firstTry = false;
    }

  10. #10

    Macaroni Ted

    onegaishimasu.

    Arigato
    Domo arigato
    Arigato gozaimasu
    Arigato gozaima****a
    Dan san
    Ookini
    Ookini arigatou
    Kora doshi
    Ohkini
    Ookini
    Oshoshina
    Nihwee-deebiru

    Obrigada
    Thank you
    Gracias
    Merci
    Danke

    hmm..I hope I got one of them right!!)(would you please let me know?)

    Your first answer was what I was looking for and there's not so many ways to thank someone that help me SO MUCH!!

    Have a great day!! And thank you, again)

  11. #11
    LOL your welcome
    dou itashima****e!

    onegaishimasu=please
    Arigato
    Domo arigato
    Arigato gozaimasu
    are all fine

    Ookini is how people say thank you in and around Kyoto!



    edit:: it wont let me type S*H*I*T as part of a word??

  12. #12

    LOL

    s*h*i*t* happens..hehehe..

    Thanks for the time, answers and Japanese lessons too..hehehehehhe

    Brisa
    Last edited by Brisa; April 6th, 2006 at 12:22 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012