homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
Forum Library, Charter, Moderator: open

Flash and Shockwave Forum

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

5+ Year Member

Msg#: 3530189 posted 12:42 pm on Dec 18, 2007 (gmt 0)

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!



WebmasterWorld Senior Member 10+ Year Member

Msg#: 3530189 posted 2:03 pm on Dec 18, 2007 (gmt 0)

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


5+ Year Member

Msg#: 3530189 posted 1:31 pm on Dec 19, 2007 (gmt 0)

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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Flash and Shockwave
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved