Happy new year all!!
I’d like to invoke a function inside a mc from it’s parent, but I want to have the reference to the clip be dynamic. When I path the mc directly and invoke the function it works, how would I make that same reference work dynamically.
Here’s a sample of what I’m trying to do:
var myArr:Array = new Array();
myArr[0] = "galleryContainer_mc.eventGallery1_mc.imgContainer_mc";
trace(myArr[0]);
// This works
toggle_btn.onRelease = function() {
galleryContainer_mc.eventGallery1_mc.imgContainer_mc.videoToggle();
}
// But this doesn't work
toggle_btn.onRelease = function() {
myArr[0].videoToggle();
}
I know I’m fried, but that seems like it should work, am I missing something really basic here? Any advice would be really helpful at this point. Thanks!