so, i have a button, i put the button in a movieclip. Everything works fine when i ctrl+alt+enter that movieclip, button works. Then i go to my scene, and i place the movieclip on my scence. When i test that, ctrl enter, the button doesnt work anymore. Any idea what can be the cause of this?
First of all, how are you currently handling the button’s click event? Are you using a listener, a clickHandler, or an onSomething event?
the button is an actual button, with an ‘over’ keyframe, so it should change colors when i go over it, but it doesnt… well, it doesnt do it when i put the whole thing (movieclip+button) in the scene…
I tried doing it with a movieclip first, but then i thought my reference was wrong, but even a simple button doesnt work :s…
Do you mind sending me the file? I can take a look at it and let you know what’s wrong with it.
If you want to, send it to chad@justchad.net .
http://members.lycos.nl/chemik/enkelBol.swf
the button is just a test…but it makes its point
this is the movieclip, you might want to resize your window, cuz it’s not really meant to be that big
http://members.lycos.nl/chemik/FlashProject.swf
here it is imported in the scene.
i’ll look for the fla’s if you’d need them
Yeah, if you could send me the FLA, I’m sure I can help you out… It’s probably just a case of needing an extra set of eyes… Which, conveniently enough, I have. In a jar. For just this occassion.
Er…
Anyway, yeah, send me the FLA if you can, I’d be glad to help out.
OK… I just got home, and got the file, unfortunately, stuffit doesn’t want to decompress your RAR file… I can take a look at it tomorrow morning when I get to my office, if you want.
can you post a link to the fla so others can download it and help you more
yeah, if you could re-post this, I’d appreciate it to! I forgot to leave the email you sent me on my server, and don’t have the file here at my office… I would like to try to help you figure this out though…
http://members.lycos.nl/chemik/FlashProject.rar
knowing myself, it’ll probably be something very stupid…
Well, it’s definitely a strange issue… I can spend more time trying to get the button to work for you later on today, but for the time being, you could try using the hitTest() function to see what area of the map has been clicked, and set up a switch statement, or a fairly ugly if block to fire off whatever code you want to fire for each country… That would probably be the way I would go with it, just because it doesn’t seem to NEED to be a button. But as for why the button isn’t working, I’m sure there’s some sort of scoping issue in the file, but I’m not terribly good at dealing with animated things (I’m a developer more than a designer… :\ ) it takes me a bit longer to figure those issues out.
Like I said, I can definitely spend more time looking at this later on if this post isn’t sufficient enough to get you rolling.
tnx for looking at it, but i was making it at first with eg. America as a button, and i gave it a instance name, so at first i thought the reference was all wrong, or the scope wasnt sufficient or whatever, but now it is a very simple button, how come it doesnt lit up? Very Very annoying