Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash Buttons - Need Help 1

Status
Not open for further replies.

Cwnilson

Technical User
Apr 26, 2004
5
US
I am making a Flash Website, and if you keep the code on a button for the page you are on It malfunctions. Say if I was doing a project on cities, and I went to a page entitles "Chicago" if I click on the chicago button while I"m in Chicago it will go to a different page. So the easty solution is taking the ations off. But I"m wondering if anyone knows why it does this, and if it's in Flash 2004?
 
what do you mean it's going to a different page? if it's code that tells it to go to a specific frame or scene/frame, it should take it to the same page again. if you have code saying to go to +3 frames from your current frame, that would be your problem. do you have an fla file i can look through?




Everytime I Look At Myself, I Still Can't Believe How Awesome I Am
strong.gif
 
Yes, I have a fla that you can look through. It's a ver simple project. And not very asthetic. But You can look at it.
 
Change all your gotoAndPlay's to gotoAndStop's on all your buttons' scripts in ALL your scenes.
 
Thank you very much. It worked perfectly. Does anyone know why gotoandplay doesn't work?
 
It works, but gotos and plays. In this case, the stop action you have on each scene's first frame is simply ignored and since you don't want it to play, because your next frame is in fact your next scene, it still plays to the next stop action, which happens to be the next scene.

To have it work, your scenes should of held 2 frames, but with another stop action on the second frame. That way it would of stopped on that second frame.

Easier to just use gotoAndStop, don't you think?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top