I've built the preloader to the site I'm designing, and after it finishes I've got a gotoAndStop on the main timeline that jumps to a frame that contains a movieclip which has the instance name 'mainbox'. Inside that movieclip(which is only 1 keyframe long) I have various layers containing various movieclips which load up the homepage content.
One of these movie clips is my navbar. It's contained in a movieclip called 'menu' and each of the buttons are themselves movieclips with instance names of 'home_bt', 'gallery_bt' etc.
I'm trying to address an inline onPress function from within the 'mainbox' movieclip. I've put the actions layer as the first layer in the 'mainbox' movieclip. So to address the gallery button should be: menu.gallery_bt.onPress.
Here's my code:
It's not working, and I'm sure there's a very simple reason for that, but being a noob I'm not sure what it is
If someone could fill me in I'd be grateful.
One of these movie clips is my navbar. It's contained in a movieclip called 'menu' and each of the buttons are themselves movieclips with instance names of 'home_bt', 'gallery_bt' etc.
I'm trying to address an inline onPress function from within the 'mainbox' movieclip. I've put the actions layer as the first layer in the 'mainbox' movieclip. So to address the gallery button should be: menu.gallery_bt.onPress.
Here's my code:
Code:
stop();
menu.gallery_bt.onPress = function():Void {
trace("event has been captured");
};
It's not working, and I'm sure there's a very simple reason for that, but being a noob I'm not sure what it is