...

View Full Version : Help I have no idea whats wrong



Jimmix
02-06-2009, 12:55 AM
I cant get my site to work. How do I fix this. I cant attach the file though.

heres the code
stop();

function goHome(e:MouseEvent):void {
gotoAndStop("Home");
}
Home_btn.addEventListener(MouseEvent.CLICK, goHome);

function goDivisions(e:MouseEvent):void {
gotoAndStop("Divisions");
}
Div_btn.addEventListener(MouseEvent.CLICK, goDivisions);

function goHistory(e:MouseEvent):void {
gotoAndStop("History");
}
History_btn.addEventListener(MouseEvent.CLICK, goHistory);

function goPhotos(e:MouseEvent):void {
gotoAndStop("Photos");
}
Photos_btn.addEventListener(MouseEvent.CLICK, goPhotos);

function goVideos(e:MouseEvent):void {
gotoAndStop("Videos");
}
Videos_btn.addEventListener(MouseEvent.CLICK, goVideos);

function goSponsors(e:MouseEvent):void {
gotoAndStop("Sponsors");
}
Sponsors_btn.addEventListener(MouseEvent.CLICK, goSponsors);

function goContact(e:MouseEvent):void {
gotoAndStop("Contact");
}
Contact_btn.addEventListener(MouseEvent.CLICK, goContact);


This is a flash website. Heres the link to download
http://www.mediafire.com/?odzlhyhwzwg
problem is after you click divisions and you click back you cant click any other links on the menu. Look and open the website and you'll know what I mean.

gnomeontherun
02-10-2009, 09:36 AM
I can't open the file right now, but are you sure that the buttons are availble in the divisions page?

Jimmix
02-10-2009, 11:41 PM
The buttons arent on the page. Its supposed to be
MAIN Divisions
Then when you click divisions all the button changes to new ones
Then theres a back button. Which when you click it returns back to the main page. Then the buttons no longer work.

gnomeontherun
02-13-2009, 08:51 AM
These buttons actually function?

After looking harder, it finally dawned on me that you are mixing actionscript 2 and 3. I don't know why it didn't dawn on me sooner. The MouseEvent.Click is AS3, but I don't know anything about AS3 really. Try this syntax.


Home_btn.addEventListener("click", goHome);

Jimmix
02-13-2009, 08:56 PM
Ummm. SO how do I kinda get the buttons to work now. Because when I click the button once it goes to the keyframe. But when I re click the other button they no longer work? How will I fix that?

O and the buttons do Work. But I changed it to your code anyway.

gnomeontherun
02-13-2009, 10:06 PM
No, I downloaded your file and I was wrong, its all AS3. I was under the impression from some research I did at work that gotoAndStop was not AS3, but alas it is.

I think that it has to do with the event handlers. I don't know AS3, but something is conflicting with them (or once you click once do you have to reregister events or something?)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum