Jump to content


Problem With Menu?


  • You cannot reply to this topic
3 replies to this topic

#1 recordlovelife

    Young Padawan

  • Members
  • Pip
  • 83 posts
  • Gender:Male
  • Location:New Jersey

Posted 10 August 2006 - 10:58 AM

Please Look At This Website


Please refer to the image of the timeline below before reading. The website has seven buttons, scene 1 has the preloader, and then the seven pages are on 5, 10, 15, 20, 25, 30, and 35, with stop actions on each.

I made 7 buttons inside a movie, and they are programmed to move the _root timeline when clicked. That all works fine, but if you click the same button twice, it will advance to the next page. To try and fix the error, I would put a gotoAndPlay(5), or the number of the previous scene where the current page lives in hopes it will send it back to the main page. But it doesn't, while looking at the Bandwidth profiler, I can see it is just blowing over that AS an moving to scene 10, which would be the next page.

Here is the code I used in the buttons...


_root.links.home.onPress = function(){
	_root.gotoAndPlay("home");
}

the links are all contained in a movie clip with an instance name of "links", the home link button is instance named "home", and you can see in the attached pic, I labeled the _root timeline "home", "news", "music", etc...


Also, the client mentioned something about the font on the buttons ONLY on the home page is a little faint or faded. But Im using the same movie clip for every page of the site?

Let me know please,
Thanks as always

Attached Files



#2 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 10 August 2006 - 11:36 AM

since the buttons are working fine, you already got the issue of adressing out of the way, one of the most common errors happening while working with Flash.

Instead of using a gotoAndPlay function, I would rather go for the gotoAndStop(). Why? As the function says, the timeline will only jump to that frame and nothing else, if you do that you can also remove all those stop actions you have in your actions layer ( besides of the first one :D )

eg. your code would look like this:

_root.links.home.onPress = function(){
	_root.gotoAndStop("home");
}

Let me know if this was the issue, if not then I have some other solutions in my mind. :P

GL
Funkysoul

#3 recordlovelife

    Young Padawan

  • Members
  • Pip
  • 83 posts
  • Gender:Male
  • Location:New Jersey

Posted 10 August 2006 - 12:34 PM

View Postfunkysoul, on Aug 10 2006, 12:36 PM, said:

since the buttons are working fine, you already got the issue of adressing out of the way, one of the most common errors happening while working with Flash.

Instead of using a gotoAndPlay function, I would rather go for the gotoAndStop(). Why? As the function says, the timeline will only jump to that frame and nothing else, if you do that you can also remove all those stop actions you have in your actions layer ( besides of the first one :D )

eg. your code would look like this:

_root.links.home.onPress = function(){
	_root.gotoAndStop("home");
}

Let me know if this was the issue, if not then I have some other solutions in my mind. :P

GL
Funkysoul

it worked, as always, I owe my Flash life to you.
Thank you so much again!

#4 funkysoul

    The Funky Stuff

  • Publishing Betazoids
  • PipPipPipPip
  • 2,307 posts
  • Gender:Male
  • Location:Zurich, Switzerland
  • Interests:Music: HIM, HIM, HIM, Cafe del Mar, Linkin Park, Fort Minor, Coldplay, Eric Jordan<br />Sports: Snowboarding, KiteSurfing, Extreme Sports<br />Computer: Flash, After Effects, Actionscript

Posted 10 August 2006 - 12:50 PM

:P





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users