im new…and uneducated. im making an image able to drag and drop, all thats fine and dandy, but i want to close it once clicking a button attached to the image. the image name right now is called appear. so the drag and drop code goes as
on (press, dragOver) {
startDrag(_root.appear);
}
on (release, rollOut, dragOut) {
stopDrag();
}
now to make a button thats able to close the image and attach it to this item, what code would go with it?
my work would go
on (press, release) {
clear.Appear
}
doesnt work, because im new to writing actionscript i dont know the right code. please help if possible
put your close button outside of the drag and drop area (as in over it, and not inside it). That way your close button will be active at all times. Otherwise, the drag is always active, so they never get to “press” the close button.
but than how can i get it to group with the image and follow it around? if its in a new layer i dont believe you can group the two. that and i already do have the seperate button made with that code. its just not closing.
please help, right now im working with
on (press) {
stop.appear
}
on( release) {
exit.appear;
}
whats the proper code for the close image? would it be exit? clear? something other. ive tried going through all the different syntaxes provided, i couldnt seem to find the one needed.
Iammontoya wasnt’ saying that the close button should be outside of the movieclip that is being dragged, just that it should be on the top layer of that movie clip.
It might help if you could attach the FLA file that you’re working on to your post.