-
Button not working
Hello,
This is my first time posting here and I came across this site while searching the net for an answer to my dilemma that is yet unresolved. first off I am brand new to flash 8 and I am attempting to make a guild website for an upcoming mmo. I have already got the entire site built in flash and the only thing left is to get 4 of my 5 buttons working. Buttons 1-4 currently do not work and button 5 works (only because it links to a url, which wasn't hard to find out how to do). Buttons 1-4 are supposed to link to a movie clip that is within a movie clip but everything I have read has failed to produce a working result.
I have been searching for about 2 days to get this working and I am almost 100% positive that it is something very simple or some simple mistake that i have made in the script, but alas I am about to stab myself in the eye....
Can someone please take a look at the .fla file and for the love of all that is holy please make buttons 1-4 work and then tell me exactly how you did it and explain it so a newb can understand it.
The four buttons not working are:
Home
About Us
Events
Join Us
The four buttons reside on their own layer titled "Buttons" and should link to another layer titled "Content" that has a movie clip on it titled "Content_mc" and inside that movie clip are the four movie clips for each of the four buttons "Home_mc, About Us_mc, Events_mc, and Join Us_mc".
Example:
when clicked on the home button the Home_mc would be displayed in its box. When clicked on the about us button the About Us_mc would be displayed in its box. Sounds easy but for the life of me i cant get it to work.
I suspect that the issue is one of two things:
1) I am not using the right command
2) I am not using the right path
Both of which i don't know how to resolve. Any help with this is greatly appreciated.
Last edited by Cautha; 08-07-2010 at 10:15 PM.
-
Outstanding I found a post here in these forums that sent me to another site that gave me just what i needed. I had to do a bit of reorganising.
I deleted the content_mc and the 4 movie clips inside it and made another layer under the background layer and then just added text boxes and labeled them. Then I added an actions layer and used the following to get all the buttons working:
stop ();
Home_btn.onRelease = function() {
gotoAndStop("HomePanel")
}
AboutUs_btn.onRelease = function() {
gotoAndStop("AboutUsPanel")
}
Events_btn.onRelease = function() {
gotoAndStop("EventsPanel")
}
JoinUs_btn.onRelease = function() {
gotoAndStop("JoinUsPanel")
}
That did the trick and it now works but I have one other issue. When I press Ctl+Enter to test the movie i get the following error output, but if I close the error window everything works fine including the buttons? whats causing this error and is it something I need to worry about?
**Error** Scene=Scene 1, layer=Buttons, frame=1:Line 1: Statement must appear within on handler
onRelease = function (){
**Error** Scene=Scene 1, layer=Buttons, frame=1:Line 1: Statement must appear within on handler
onRelease = function (){
**Error** Scene=Scene 1, layer=Buttons, frame=1:Line 1: Statement must appear within on handler
onRelease = function (){
Total ActionScript Errors: 4 Reported Errors: 4
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|