PDA

View Full Version : 2?'s


hotnix
04-16-2001, 07:47 PM
I have two newbie type questions. the first one is, when trying to move around in my movie i can't seem to get the goto statement to work right. When a button is clicked in the beginning of the movie (frame 11) the 56th frame is supposed to play, instead the last frame plays. when the button in the last frame is clicked (to go back to the 11th) the movie starts in frame 34. i know i have done something just ridiculously stupid but i am at a loss as to what. Also, i am trying to confine a movie clip to a maze. i have accomplished this by controling it with the arrow keys, however i would like to drag it through with the mouse. is there a way to do that?
any help will be greatly appreciated.
hotnix

Jesse
04-17-2001, 03:34 AM
I don't know how you could make a draggable maze. You can't really constrict mouse movement enough for it to work...

As for the other the correct code to goto frame 56 would be:

on (release) {
_root.gotoAndPlay(56);
}

Cheers

Jesse

hotnix
04-17-2001, 05:43 PM
Thanks Jesse!! the goto buttons work now! as far as the maze is concerned the hittest property is what i used to control the mc within the maze with the arrow keys. (which is another mc) would it be possible to stopdrag if one mc hits the other?
hotnix

Jesse
04-18-2001, 03:44 AM
Assuming you have al your walls with instance names of 'wall' and your dragger is called 'dragger', and both are on root you could try something like this:

onClipEvent (enterFrame) {
if (_root.dragger.hitTest("_root.wall")) {
stopDrag ();
}
}


But If I move my mouse really quickly over the wall at just the right moment this code wont work because it only checks once ever frame (so 12 times a second on 12 frames per second).

I'd stick with the keydown idea.

Cheers

Jesse

hotnix
04-20-2001, 05:41 PM
I'll stick with the arrow keys. Thanks again Jesse!
hotnix