View Full Version : Help I have no idea whats wrong

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

heres the code

function goHome(e:MouseEvent):void {
Home_btn.addEventListener(MouseEvent.CLICK, goHome);

function goDivisions(e:MouseEvent):void {
Div_btn.addEventListener(MouseEvent.CLICK, goDivisions);

function goHistory(e:MouseEvent):void {
History_btn.addEventListener(MouseEvent.CLICK, goHistory);

function goPhotos(e:MouseEvent):void {
Photos_btn.addEventListener(MouseEvent.CLICK, goPhotos);

function goVideos(e:MouseEvent):void {
Videos_btn.addEventListener(MouseEvent.CLICK, goVideos);

function goSponsors(e:MouseEvent):void {
Sponsors_btn.addEventListener(MouseEvent.CLICK, goSponsors);

function goContact(e:MouseEvent):void {
Contact_btn.addEventListener(MouseEvent.CLICK, goContact);

This is a flash website. Heres the link to download
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.

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

02-11-2009, 12:41 AM
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.

02-13-2009, 09: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);

02-13-2009, 09: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.

02-13-2009, 11: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?)