Skip to main content
Participant
December 21, 2006
Question

createEmptyMovieClip, createTextField as ScrollPane contentPath

  • December 21, 2006
  • 2 replies
  • 249 views
I'm trying to add textfields to a movieclip, then use it as the contentPath on a ScrollPane.
How do you dynamically alter a movieclip that doesn't have an instance (resides only in the library)?

I've also tried creating an empty movieclip, adding a textfield then setting the contentPath:

createEmptyMovieClip("scollPaneContent_mc", 1);
var myTextField:TextField = spContent_mc.createTextField("myTextField", 1, 0, 0, 150, 20);
myTextField.text = "Hello World";
myScrollPane.contentPath = "scollPaneContent_mc";

This code throws: Error opening URL "file:///D|/SD%5FWeb%5FNew/scrollPaneContent_mc"

If I have an empty movieclip in the library named scrollPaneContent_mc, there is no error, but there is no textfield added either.

Thanks,
Carl
This topic has been closed for replies.

2 replies

carlmal2Author
Participant
December 22, 2006
Actually found everything I needed to know, this guy is great! Thanks for your repsonse.

http://www.kirupa.com/developer/flash8/scrollpane_dynamic_mc.htm
December 22, 2006
YOu cant give an instace name as contentPath for a scrollpant.
It should be a Linkage Idenifier name...