Skip to main content
Participant
August 23, 2006
Answered

access buttons in MC nested in MC nested..

  • August 23, 2006
  • 3 replies
  • 340 views
Hi everyone, I would greatly appreciate if anyone could help me out with the following..

I have a MC instance in main timeline in one layer and another layer called 'actions' (only one keyframefor both)
This MC is containing another MC2
The MC2 is containing another MC3
This MC3 is containing buttons.

In a main timeline :

stop();

trace("waiting for click");
_root.finalIntro_mc.roller_mc.OldIntro_mc.starwars_btn.onRelease = function(){
trace("success");
}

will not do anything....and that's the problem. If I put the same piece of code into 1st MC's timeline then it works. All instances have their names. It seems like I cannot access button that is in more than 3 nested MC's.

Any ideas ? you can download the FLA from the website : http://home.exetel.com.au/news/oldintros1.fla

Thank you !
This topic has been closed for replies.
Correct answer SydVajco
wbexperience....yes, the button like StarWars (better said that one only is enough) doesn;t return me the trace command.
This is the code I want to have on the first frame of the main timeline (to acces the button from here)
stop();

trace("waiting for click");
_root.finalIntro_mc.roller_mc.OldIntro_mc.starwars_btn.onRelease = function(){
trace("success");
}

But it didn't work. Test it.
However, after several hours of completely disassembling the MC I've found where the problem was. It's in the First MC, where the mask is. I have several keyframes for the mask as well, but right after I made the mask just one with in just one keyframe lasting for the whole time, then it worked.
Guys, thanks a lot anyway ! I'm about to post another thread - loading the external video with sound...I'm stucked...need some help.. cheers.

3 replies

Inspiring
August 23, 2006
I've downloaded your code, examined it and run it. The folder opens when you click on the verticle control bar.
The scroll buttons work. But the StarWars, Carshow, and other buttons do not. I didn't see any code written for the buttons.
Are these the buttons that you are referring to? If so, you've got to attach code to the buttons or better yet, write code referencing these buttons in the _root timeline along with the other code.
SydVajcoAuthorCorrect answer
Participant
August 23, 2006
wbexperience....yes, the button like StarWars (better said that one only is enough) doesn;t return me the trace command.
This is the code I want to have on the first frame of the main timeline (to acces the button from here)
stop();

trace("waiting for click");
_root.finalIntro_mc.roller_mc.OldIntro_mc.starwars_btn.onRelease = function(){
trace("success");
}

But it didn't work. Test it.
However, after several hours of completely disassembling the MC I've found where the problem was. It's in the First MC, where the mask is. I have several keyframes for the mask as well, but right after I made the mask just one with in just one keyframe lasting for the whole time, then it worked.
Guys, thanks a lot anyway ! I'm about to post another thread - loading the external video with sound...I'm stucked...need some help.. cheers.
August 23, 2006
> the one you have donloaded is exactly the case in which it works only if thecode
> is inside the finalIntro_mc
I also moved the code to frame 1 and it still seemed to work fine. I tried you're latest one, and it also seemed to work fine. Maybe I don't know how it's supposed to work? Here's how it works for me:
1) when it loads, there's a thin bar with an arrow
2) clicking the arrow causes the drawer to expand, and the button/bar/arrow reverses to indicate a closing button
3) there are scroll buttons that scroll the content
4) clicking the thing bar with arrow causes the drawer to close
August 23, 2006
Seemed to work fine on the _root to me.
SydVajcoAuthor
Participant
August 23, 2006
Hey ABeall, thanks for post....shall I consider it as you think is a bug ??

I've now done some very very basic app where are another 3 mc involved and it works....simply I need some one to have a look at that FLA available for download and tell me what's wrong..otherwise I'm doomed... thx