The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.39 / 5.00 38,635 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 15,161 ViewsI've got this little problem here...
how do i make a button stay at the 'down' frame when clicked? and not switch back to 'up' once you release the mouse? actionscript can't be placed inside a button...
can anyone help please? oh, it doesn't have to be a button, but something that works in the way i described.
thanks!~
i tried this as well:
two keyframes inside a movie clip, labels are 'up' and 'pressed'. each of the keyframes have stop action.
movieclip has actions:
onClipEvent (enterFrame){
this.gotoAndStop("over")
}
onClipEvent (mouseDown) {
this.gotoAndStop("lighted")
}
it works ok, but when i test movie the following errors appear:
**Error** Symbol=lights 1, layer=Layer 1, frame=1:Line 1: Statement must appear within on/onClipEvent handler
stop();
what does it mean and how to fix it?
It means there's a 'stop ();' on the symbol 'lights 1' which can't be there because you need the 'onClipEvent's for code on symbols.
At 12/6/07 08:42 AM, SkySausage wrote: i tried this as well:
two keyframes inside a movie clip, labels are 'up' and 'pressed'. each of the keyframes have stop action.
movieclip has actions:
onClipEvent (enterFrame){
this.gotoAndStop("over")
}
onClipEvent (mouseDown) {
this.gotoAndStop("lighted")
}
it works ok, but when i test movie the following errors appear:
**Error** Symbol=lights 1, layer=Layer 1, frame=1:Line 1: Statement must appear within on/onClipEvent handler
stop();
what does it mean and how to fix it?
Errmm... i don't think onClipEvent(mouseDown) should be in a MC as it is a Button script.
What i think you should do is make a invinsible button below the movie clip, and then on the button you make some code like:
on(press) {
_root.MovieClip.gotoAndStop(2);
}
That way you can even make a whole animation to happen. And if you want the movie clip (which the viewer think is a button) to highlight on rollover there is this script:
on(rollOver) {
_root.MovieClip.gotoAndStop(2); //Then change press animation to 3
}
on(rollOut) {
_root.MovieClip.gotoAndStop(1);
}
I'm not a god at AS, but i've made something like that, and it worked. Hoplefully you understand what i meant and hopefully you will make it work.
I'm not a god at AS, but i've made something like that, and it worked. Hoplefully you understand what i meant and hopefully you will make it work.
thanks a lot!