When doing a button you have to have what the person is going to do with the button before you can tell the button the task assigned...If you are going to attach the actionscript directly to the button..use this:
on(release){
gotoAndStop(frame number or frame label);
}
The recommended method is to put your script in the first frame of your timeline in a layer you label "action". Give your button an instance name, for example, myButton_btn. Use a script something like this:
myButton_btn.onRelease = function(){
gotoAndStop(frame number or frame label);
};
Hi thanks for the reply, I have got the button working just copied and pasted the text from Flash 5 to flash 8, what does concern me is that in flash 5 you have 'basic actions' and from there you just click what you want and it generates the code, cant seem to find the same type of thing in flash 8 i'm looking in Global functions > Timeline control, I guessed it would be in there.
I haven't found the new system in Flash 8 to be very useful because it's about as hard to find where the proper code is as it is to just write the stuff in the first place. Of course, I'm not being very fair since I haven't used the script assist much and I've become accustomed to "rolling my own" since MX2004.
Yes, I agree, I liked the basic actions selection in Flash5 too. In Flash8 you need to know where the functions would be before you can use it and I guess most people needing script assist have no idea where to start looking for it.
I have always been a fan of Macromedia, but this new version will hamper people who are just starting out using Flash 8, adding a button action should be so straight forward. The script assist is ok if you have the correct script in there, but its no use if you get it wrong as it wont help you until you get it right.
I'm not sure I understand. If I have a button on the stage, bring up the Actions Panel with Script Assist on, I can double-click "goto" under Timeline Control and it automatically enters for me:
on (release) {
gotoAndPlay(1);
}
With fields above to customize the action. What's different about this then Basic Mode in Flash 5?
Ignore it for the most part, just type in your frame number.
Don't you have a small panel to the left of the actions panel with all the folders in it? And below the folders, a yellow folder named Index? Open Index, then all the actions in all the folders above that are there, laid out in alpabetical order. That's all I use, I never used the folders, cause I never learned where they all were.
FINALLY someone else has the same problem that I am having. Scripting in 8 is so much more difficult for someone like me who only uses the 'basic functions' on Flash 5. I just don't understand scripting very well otherwise.
Anyway, the answer to black_phoenix's question, albeit 3 years later, is that the mouse events function is now under Global Functions > Movie Clip Control > On