- Mouse events, like onPress and onRelease, only work inside buttons, even if the event doesn't involve the button. If you want to script events for key presses, for example, the script has to be on an (invisible) button.
- Here's the script for a button press :
on(Release){
gotoAndPlay("Scene 2", 1);
}
- Or if you want the button to open a URL (Take out the blank if you want the same window.):
on(Release){
getURL("http://somewebsite.com", "_blank");
}
- Here's the script for a key press event:
on (release, keyPress "") {
_root.nextFrame();
this.gotoAndStop();
}
It's not that hard to find these scripts on forums but it seems like it's such a standard thing to use in a Flash animation that it should be easier to find out how to do within the Flash help itself.
No comments :
Post a Comment