I seem to have a similar problem to this post here:
http://www.actionscript.org/forums/s...ght=scrollpane
But the answer provided doesn't appear to work.
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:
Code:
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:
1119: Access of possibly undefined property nested_mc through a reference with static type flash.display:DisplayObject.
If I try to access the nested_mc as suggested in the link I posted up top b using a trace function like this:
Code:
trace(MovieClip(myScrollPane.content.nested_mc).alpha)
I get the same error...
What gives? What is the best way to access content within the scrollpane component?
Any advice is greatly appreciated!