-
1. Re: button
kglad Sep 15, 2009 6:18 PM (in response to jaysondking)are any mouse handlers defined for the movieclip that contains your button?
-
2. Re: button
jaysondking Sep 15, 2009 7:20 PM (in response to kglad)Yes, there are... I even went back just now and rewrote a smaller one for a single button to see. I entered...
stop();
//handle events for buttons...
photosoeight.addEventListener(MouseEvent.CLICK, clickSection);
function clickSection(evtObj:MouseEvent) {
//trace shows what's happening... in the output window
trace("The Photosoeight button was clicked");
//go to the cestion clicked on...
gotoAndStop("photos2008");
}
I do not get it... I know it is possible because I am following the Lynda lesson and it works fine there. The buttons all work fine inside the movie clip, there is a layer for buttons, a layer for actionscript, timelines... etc... Soon as I leave that movie clip and go back to scene 1 they no longer show as functioning buttons? Or in the preview?
-
3. Re: button
kglad Sep 15, 2009 10:19 PM (in response to jaysondking)do you see that trace output?
-
4. Re: button
jaysondking Sep 16, 2009 6:42 AM (in response to kglad)No, there isn't a trace output because it is like the button does not exist when i preview the swf file. There are trace outputs for the similar code for the main timeline because the buttons work. I cannot click, rollover, anything... the buttons created within the movie clip layers.
-
5. Re: button
kglad Sep 16, 2009 8:14 AM (in response to jaysondking)you create a movieclip. on that movieclip's timeline you create a button, give it an instance name and assign mouse listener code for that button on the movieclip's timeline. you then add that movieclip to the main timeline, give the movieclip an instance name and assign it mouse listener code on the main timeline. is that all correct?
well, that can't be correct because that's what you should do and that would work without problem. so, what did you do that was different?