dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: droptarget nightmare

  1. #1
    Junior Member
    Join Date
    Oct 2000
    Posts
    20

    Thumbs up

    I am building a dressing up game at the moment and have run into a nasty droptarget pain. I have a number of movie clips which I am draggin' and droppin' fairly successfully. My problems is I cannot get the targets to detect that another object has dropped onto the target.

    Eg. I drop a shirt onto the boy and when I try to drop a schoolbag onto him it cannot recognise the shirt as a target.

    The movie clips contain each clothing item as two movie clips - one which displays the item in full and another cut-out to fit the character. Over each of these is a button that traps the on(press) and on(release,releaseOutside).

    Is there something I need to check in the droptarget because the movie clip now contains clips and not buttons ????

    help !?!?!?!?!?!?!?!?!?

  2. #2
    Senior Member
    Join Date
    May 2001
    Posts
    1,838
    Yes, you are right.

    You can trace the _dropTarget.

    If a movieClip "shirt" consists of small moviclips "collar","pocket" and a background graphic;

    The the _dropTaget will be "collar" or "pocket", only when the background area not covered by these two clip was hit, the _dropTarget is "shirt";

    Maybe you can add a check:

    if ((this._dropTarget).substr(0,6)=="/shirt"){trace("got you");}


Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center