PDA

View Full Version : Still trying click, expand etc!


numpty
05-23-2003, 02:16 PM
Well I have been doing other things in the meantime!

So far I have this on a piece of a jigsaw puzzle that I want to be dragged to the correct slot - lock into place, grow to fit and stay there:

onClipEvent (load) {
startDrag (this, true);
wizardgone = new size (this);}
onClipEvent (enterFrame) {
if (this.hitTest (_root.wizardgone)) {
wizard.setscale;
setProperty (_target, _y,_y);
stopDrag();
_xscale = 200;
_yscale = 200;
}
}

On a movie clip.

Two things wrong with it, a: the piece moves just on the cursor movement, not on a hold and drop (which I had working with buttons before) and b: when it finds wizardgone it expands to the correct size, but it does it any old how any old where so that the final piece of the puzzle appears to be out of the box. The button is still part of the Movie Clip but the code used for the button:

on (release) {
stopDrag ();
_xscale = 200;
_yscale = 200;
generalclick.start();
}
on (press) {
startDrag ("");
}

appears to be overidden by the code for the clip. How can I regain my drag and drop ability, whilst getting the piece to evaluate it's position agains the 'wizardgone' mc? (or co-ordinates I'm not fussy!)