-
Why doesn't this script work??
I have a script that make a tekstfield and put a scrollbar next to it.
the text comes from a *.txt file.
but it doesn't seem to work.
Code:
_root.loadVariables("1.txt"); // txt loader
drawWekomsTekst = function(){
// welkoms content
_root.createTextField("myTextField", 1, 0, 0, 50, 200);
myTextField.wordWrap = true;
myTextField.text = textField;
initialization = {_targetInstanceName:"myTextField", horizontal:false};
_root.attachMovie("FScrollBarSymbol", "myScrollbar", 2, initialization);
myScrollBar._x = myTextField._width;
myScrollBar.setSize(myTextField._height);
clearInterval (drawWekomsTekstfunc);
}
//intervals
drawWekomsTekstfunc = setInterval( drawWekomsTekst, 100);
i hope that somebody can help me with it. if i don't load the text from *.txt and insert directly with "myTextField.text = "text";
it works fine.
thanx
grafx::..
-
iguanagirl32
what's not working? Post the FLA...
-
it doesn't scroll the tekst loaded in to the tekstfield..
-
Hi grafx,
try this:
Code:
mydepth =100 // z depth
s = new LoadVars();
s.onLoad = drawWekomsTekst;
s.load("1.txt");
function drawWekomsTekst(){
_root.createTextField("myTextField", 1, 0, 0, 50, 200);
myTextField.wordWrap = true;
myTextField.text = this.textField;
initialization = {_targetInstanceName:"myTextField", horizontal:false};
_root.attachMovie("FScrollBarSymbol", "myScrollbar", 2, initialization);
myScrollBar._x = myTextField._width;
myScrollBar.setSize(myTextField._height);
myScrollBar.setScrollContent("myTextField");
}
Hope this helps some,
Dunc
-
thanx alot.
it wasn't easy to put in the movie where it should be but it works now.
thanx
grafx::..
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
|