Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies


how to activate home, and help buttons on a flash site



12:42 pm on Dec 18, 2007 (gmt 0)

5+ Year Member

Hi all, I am new to the forum, and even newer to Flash. I am writing an e-book for kids, and on each page there is a home, help, next and back button. I figured out how to do the back and next buttons, but how do you do the actionscript for the home button? I named the instance
home_btn, so I thought you could just do it like a function for the next and back buttons,


home_btn.onRelease = function(){
if (_root._currentframe ==?) {

this is obvoiusly not working. If I have 14 frames, what do you put in the currentframe= #, 1-14?,
why cant I say

home_btn.onRelease = function(){
what do I put here?

Sorry this is not so concise, I am up agianst a deadline, and freaking out. any help would be greatly appreciated if any of this makes sense, thanks!


2:03 pm on Dec 18, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member

Imnot sure what the 'if' is for? Surely hitting the home button, you always want to gotoAndStop(1);?

Could you just get rid of the if?

sorry if im missing something


1:31 pm on Dec 19, 2007 (gmt 0)

5+ Year Member

Hi, thanks for the idea. I finally got it, your right, I didnt need the if, or even the function. I didnt realize there you have to put actions in the button itself(right click actions when hit button)and not just in an action layer. so a simple onRelease, gotoAndStop worked great. Thanks.

Featured Threads

Hot Threads This Week

Hot Threads This Month