|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Greetings all... I am new to the ActionScript part of flash and have been getting good at it till now. I am having trouble getting my navigation buttons to work. Here's the deal...
I built the main load SWF, call it mainPage.swf Inside the mainPage.swf I create an empty movie that inturn loads the navigation SWF, call it mainNav.SWF. Now, from inside the mainPage.swf I am trying to use ActionScript to notice a button click from the mainNav.swf and load in a third movie clip onto the mainPage.swf (I have already created the empty clip) I have tried using: _root.mainNav.btWelcome.onPress = function() { content_mc.loadMovie("welcome.swf"); } or: mainPage.mainNav2.btHome.onPress = function() { content_mc.loadMovie("welcome.swf"); } (btWelcome is the button and content_mc is the movie clip within mainPage.swf I want to load) A samle can be found here: URL Any help is greatly appreciated Gil |
|
#2
|
|||
|
|||
|
> create an empty movie...call it mainNav.SWF
I see what you're doing. Here's what I do: Say you have a target clip (your empty movieclip) in your main movie called 'target'. The empty moviueclip that will load in your nav needs to be referred to as its instance name when you're targeting your nav buttons. Code:
_root.createEmptyMovieClip("target", 0);
_root.target.loadMovie("yourMovie.swf", _root.target);
If there's a button you want to add an event handler to in your nav, if it's loaded into the target clip via loadMovie as shown above, you can refer to the button like this: Code:
_root.target.buttonName.onRelease = function() {
//Do something...
}
hth, Mike
__________________
I'm not impatient, I just have a low tolerance for boredom. |
|
#3
|
|||
|
|||
|
Thanks for the help.
|
|
#4
|
|||
|
|||
|
Did you solve your problem?
|
![]() |
| Viewing: Dev Shed Forums > Web Design > Flash Help > navigation difficuilty |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|