Loading text in a dynamic text field

hi\rI am using the following code to load text into a text field \rthis works fine when the files are on my pc(and in same folder) but after i uploaded the files on the web server \rthe text does not load although both the swf and the home.txt are in the same diectory \ron (release) {\rloadVariablesNum(“home.txt”, 0);\r}\rplease ,any one help me about this \r\rthanks

I don’t have an answer to your question, i have some questions of my own. i hope both our questions can be answered! \r\rHello, \r\rI’ve been having a few problems with flash mx. any help would be\rgreatly appreciated. one of them is a flash mx compent question and the\rother is related (although i think it can be solved with flash 5\rtechniques which i do not know). here are my questions:\r\r1. I know how to use the scroller component when you type text in the\rdynamic text field, however, when i try to import text, the field shows\rup, yet it will not scroll. How does one achieve this?\r\r2. I have a main movie file (“FILE A”) with a masked movie clip, and i\ram loading a second one (“FILE B”) into it (into the movie clip in FILE\rA). FILE B contains imported text from a .txt file which has HTML code\rin it. in FILE B, i use the loadVariables script which targets it to\r_root.movieclipname . \rFILE B shows up nicely, however the imported text does not. When i use\rthe option “embed characters” in FILE B, they show up in FILE A, but the\rHTML tags do not, and the words with tags in them do not show up as\rwell. How can i remedy this?\r\r\rwell those are my questions. i hope someone can help. \rthanks in advance.

to load a dynamic text field you do this:\r\r1. make a dynamic text feild then give it the variable var_text\r\r2. then convert the text feild into a movie clip\r\r3. then paste the code below into the actions of the movie\r\ronClipEvent (load) {\r loadVariables(“test.txt”, “”);\r}\ronClipEvent (data) {\r this.var_text = text;\r}\r\r\rnow inside ure text file u need to put text= then what ever u want to have loaded up… and also the text file must be in the same folder as ure .swf\r\rcheers

xs, you have to put the absolute path.\rWoo, I heard about these problems with loading and scrollbar component. I don’t think it works at all. I have to try that out. About your 2nd question, too many words, sorry.\r\rpom 0]

Woobee, I finally got the answer to your first question. What you have to do is tell Flash that the scrollbar applies to the text you’ve just loaded. That means you have tu put this where you want to load :

 // let's say you named you textfield 'content'\r\r// and the scroller 'scrollerpom'\r\rscrollerpom.setScrollTarget(content);

Otherwise, the text loads, but the scroller bar isn’t active.\r\rpom 0]

By the way, there’s another trick about scrollers : if you want the scroller to appear only if it needs to, put this in the first frame of your animation :

 // 'content' is now the ** var** of the text, not the instance name\r\r_root.onEnterFrame = function () {\r\r       if(content.maxscroll>1) scrollerpom._visible=true;\r\r       else scrollerpom._visible=false;\r\r}

pom 0]

thanks. i’m going to try it now. i like this forum.

hey pom, it’s not working :frowning: . i dont’ know what i’m doing wrong. can you send me a sample file via email? it’s my username@yahoo\r\rthanks.

I have been hunting everywhere to figure out how to have dynamic text loaded from a file AND scroll it using the UI Component. The answer lies here:\r\rwww.macromedia.com/suppor…rollmx.htm\r\rknock yourselves out.

That works like a charm! thanks. however, i’ve noticed when i load the file that contains it into another movie (into a movieclip) WITH A MASK, the text does not show up. can someone tell me what i’m doing wrong? thanks.\r