Hi all,
I’ve seen several posting on various sites with this question but never found an answer that actually works.
Very simply, I create an instance of a scrollpane on my stage and I load in a mc from my library that has another mc nested within. I want to access that nested mc and I don’t seem to be able to:
import flash.display.MovieClip;
import fl.containers.ScrollPane;
//MyBox is the class name of the mc in my library
var myMovieClip:MyBox = new MyBox();
//
var myScrollPane:ScrollPane = new ScrollPane();
myScrollPane.name = "myScrollPane";
myScrollPane.source = myMovieClip;
addChild(myScrollPane);
trace(myScrollPane.content.nested_mc.alpha)
When I run this I get the following error:
[COLOR=red]1119: Access of possibly undefined property nested_mc through a reference with static type flash.display:DisplayObject.[/COLOR]
I’ve tried to access the nested_mc by using the content property as I’ve seen noted in one post on actionscript.org like this:
trace(MovieClip(myScrollPane.content.nested_mc).alpha)
but I get the same error…
What gives? What is the best way to access content within the scrollpane component?
Any advice is greatly appreciated!