This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Flash Site Design > July 2007 > Help with moving buttons





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Help with moving buttons
Racecarjoe

2007-07-31, 6:16 pm

I am totally new with flash. I am using the following tutorial which I believe
I followed correctly.
http://www.flash-game-design.com/fl...h-tutorial.html
I have edited the site just a bit adding my own graphics and colors. The
problem is that when you first view the site all the buttons stay in the up
position. Once you click each one once, they function properly. Here is the
script that I have.

stop()
content.gotoAndStop("home")
current = menu.home_button
setMove = true;
yMove = -10
menu.home_button.onPress = function(){
if(this != current){
current._y = 0
setMove = true
content.gotoAndStop("home")
current = this
}
}
menu.league_button.onPress = function(){
if(this != current){
current._y = 0
setMove = true
content.gotoAndStop("league")
current = this
}
}
menu.photos_button.onPress = function(){
if(this != current){
current._y = 0
setMove = true
content.gotoAndStop("photos")
current = this
}
}
menu.downloads_button.onPress = function(){
if(this != current){
current._y = 0
setMove = true
content.gotoAndStop("downloads")
current = this
}
}
menu.forum_button.onPress = function(){
if(this != current){
current._y = 0
setMove = true
content.gotoAndStop("forum")
current = this
}
}
this.onEnterFrame = function(){
if(setMove){
if(yMove < current._y){
current._y --

}else{
setMove = false
}
}

}

Also here is a link to the actual site that I have published.
http://67.175.252.196/New%20Site/Test%20Website.html

Any help would be greatly appreciated.

Racecarjoe

2007-07-31, 10:17 pm

I just figured it out. The buttons just needed to be moved down below the bar. It had nothing to do with the actionscript.
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews