Goosey
02-11-2003, 04:28 AM
Im really confused about one thing: using the technique of
on(release){
_root.gotoAndPlay(x);
}
in a button works perfectly, however the same code will fail to function in a movieclip.
If i use the technique of
onClipEvent (mouseUp) {
checkX = _root._xmouse;
checkY = _root._ymouse;
if (this.hitTest(checkX, checkY, true)) {
_root.gotoAndPlay(2);
}
on a movieclip then it will work perfectly.
ok everything so far seems to tell me that on(release) something that should be used only with buttons.... BUT there is a wildcard thrown in:
if I do:
on(release){
trace("YEA IM HERE TO CONFUSE YOU!");
_root.gotoAndPlay(x);
}
then you will get "YEA IM HERE TO CONFUSE YOU!" in the output window... So how exactly does on(release) work with movieclips? It seems that maybe it works fine with some commands and not others?
Im sorry if I sound like a total newbie (but I am, and this is the newbies forum right?).. this just really confuses me.
I suppose I can use the mouse-x-y-hit-detection technique whenever I want to use a movieclip as a button (or embed a button in the movieclip), but really.. why doesn't on(release) function as one expect it would?
on(release){
_root.gotoAndPlay(x);
}
in a button works perfectly, however the same code will fail to function in a movieclip.
If i use the technique of
onClipEvent (mouseUp) {
checkX = _root._xmouse;
checkY = _root._ymouse;
if (this.hitTest(checkX, checkY, true)) {
_root.gotoAndPlay(2);
}
on a movieclip then it will work perfectly.
ok everything so far seems to tell me that on(release) something that should be used only with buttons.... BUT there is a wildcard thrown in:
if I do:
on(release){
trace("YEA IM HERE TO CONFUSE YOU!");
_root.gotoAndPlay(x);
}
then you will get "YEA IM HERE TO CONFUSE YOU!" in the output window... So how exactly does on(release) work with movieclips? It seems that maybe it works fine with some commands and not others?
Im sorry if I sound like a total newbie (but I am, and this is the newbies forum right?).. this just really confuses me.
I suppose I can use the mouse-x-y-hit-detection technique whenever I want to use a movieclip as a button (or embed a button in the movieclip), but really.. why doesn't on(release) function as one expect it would?