Drag and drop

  • Ami
  • Newbie
  • Newbie
  • Ami
  • Posts: 6
  • Loc: Malaysia

Post 3+ Months Ago

hi, need help here.

here is the fla file. it can drag into the green box. i want to count how many grey box already have in the green box. i can drag the grey box into the green box n the code i write is just for count how many time the grey box had click it doesnt use. i want it can count how many grey box already drag into the green box.

later will click on go btn n it will go to target according counting.

i try to use on(release) on the green box n st the green box as btn but it cant count for me when i release the grag grey box.

i put at grey box code.


who know please reply me .
Code: [ Select ]
on (press) {
    startDrag(this, true);
}
on (release) {
    stopDrag();
    /*count++;
    trace(count);
    if (count == 1) {
        tellTarget ("m1") {
            gotoAndPlay(2);
        }
    }
    if (count == 2) {
        unloadMovie("m1");
        tellTarget ("m2") {
            gotoAndPlay(2);
        }
    }
    if (count == 3) {
        unloadMovie("m2");
    }*/
    if (this._droptarget == "/green_box") {
        _root.green_box.gotoAndStop(2);
    }
}
  1. on (press) {
  2.     startDrag(this, true);
  3. }
  4. on (release) {
  5.     stopDrag();
  6.     /*count++;
  7.     trace(count);
  8.     if (count == 1) {
  9.         tellTarget ("m1") {
  10.             gotoAndPlay(2);
  11.         }
  12.     }
  13.     if (count == 2) {
  14.         unloadMovie("m1");
  15.         tellTarget ("m2") {
  16.             gotoAndPlay(2);
  17.         }
  18.     }
  19.     if (count == 3) {
  20.         unloadMovie("m2");
  21.     }*/
  22.     if (this._droptarget == "/green_box") {
  23.         _root.green_box.gotoAndStop(2);
  24.     }
  25. }


n for the green box i duuno how to match it with the count for the dragging n also the go btn.

anyone know please reply me here cos very urgent for this.

Post Information

  • Total Posts in this topic: 1 post
  • Users browsing this forum: No registered users and 3 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.