Yahoo Clever wird am 4. Mai 2021 (Eastern Time, Zeitzone US-Ostküste) eingestellt. Ab dem 20. April 2021 (Eastern Time) ist die Website von Yahoo Clever nur noch im reinen Lesemodus verfügbar. Andere Yahoo Produkte oder Dienste oder Ihr Yahoo Account sind von diesen Änderungen nicht betroffen. Auf dieser Hilfeseite finden Sie weitere Informationen zur Einstellung von Yahoo Clever und dazu, wie Sie Ihre Daten herunterladen.
Can you explain why this button isn't working? Flash CS3?
I'm making a site in Flash CS3. It's a pretty basic one but I've run into a problem which I can't get my head around.
I have a load of buttons within Movie Clips that work fine, but sometime after doing the initial programming I decided to add a new button onto each page linking back to the homepage and it just won't seem to work properly.
I really don't understand why because they coding I've done for it is the same as the ones that do work. I already have two separate buttons linking to the homepage, so all I figured I'd have to do is put this one next to them in the action script - but this JUST DOESN'T WORK. and I really can't figure out why.
Here's the code
header_mc.home_btn.addEventListener(MouseEvent.CLICK, gohome); - WORKS
header_mc.logo_btn.addEventListener(MouseEvent.CLICK, gohome); - WORKS
about_mc.back_btn.addEventListener(MouseEvent.CLICK, gohome); - DOESN'T WORK
function gohome (event:MouseEvent):void{
gotoAndStop(1);
}
I have chekced all the syntax and the instance names and the targeting and that's all fine. The error is: TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Charlotte4_fla::MainTimeline/Charlotte4_fla::frame1()
The button I'm having a problem with is not on Frame 1, it is on frames 2-5. To check if this was the problem I put the button in the same movie clip as the working ones on each frame - but it still wouldn't work.
That was literally the only difference (I can find) between the new button and the old working ones - so I really don't get it - I can't see what is going wrong at all. Any Ideas?
at the very least can someone just explain what the error message means? What does "null object reference" mean? I've found loads of people online explaining how to fix particular occurences of this error but it seems to come up so often that a tonne of things must trigger it. Maybe if I understand the error I can figure it out myself!
Sorry this was pretty long, I hope you read it all without wanting to punch me in the throat.
Cheers
2 Antworten
- Anonymvor 9 JahrenBeste Antwort
Thismust be due to the programming problem.
Report this problem to the programming service to get things fixed.
- herandezLv 4vor 5 Jahren
i'd desire to advise you shop on with AS2 utilizing fact AS3 in all fairness stepped forward even for a freelance Flash developer. Assuming you have a button and you have given it an social gathering call like "home_btn". you will desire to specify which physique to play interior the timeline with the aid of using: home_btn.onRelease = function() { gotoAndPlay("residing house"); // you will have a physique named "residing house" }