-
I have a problem with the scrollpane when I create textfields dynamicly in a new movieclip and then link it to the scrollpane with setScrollContent the movieclip is controled by the scrollpane but it displays outside the area of the scrollpane as well as inside it. Here is the code I am using
<hr>
<blockquote>
root.textFieldRef = new Array();
_root.createEmptyMovieClip("textMovie",1);
scrollPane.setScrollContent(_root.textMovie);
_root.creatTextFields = function ( num ) {
// create movieclip holder for text fields
var mc = _root.textMovie;
// create
for ( var i = 0; i < num; i++ ) {
// create text fields inside mc and space y
mc.createTextField ( "textField" + i, i,10,10 + (30 * i), 0, 0 );
// store texfield instance names in _root array
mc["textField" + i].autoSize = true;
mc["textField" + i].text = "textField" + i;
_root.textFieldRef.push(mc["textField" + i]);
}
return true;
}
function onClick(btn) {
if (btn == pushBtn) {
if (_root.creatTextFields(15)) {
numText.text = textFieldRef.length;
scrollPane.refreshPane();
} else {
trace("Did not work");
}
}
}
</blockquote>
-
Hi,
I had the same problem....I embedded the dynamic textfields to solve the problem. Ok, your movie sizes increases a little, but it works. So perhaps you try it, just embed the font for your textfield.!!
Good luck!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|