# How to scroll external text (notepad edited)

**URL:** https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600
**Category:** Uncategorized
**Created:** [March 28, 2006, 6:31pm UTC](https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600 "2006-03-28T18:31:55Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![hoteurochick](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@hoteurochick](https://forum.kirupa.com/u/hoteurochick)
#### Post date: [March 28, 2006, 6:31pm UTC](https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600/1 "2006-03-28T18:31:55Z")

</div>

Hi Guys,  
for the flash file with code

MyData = new LoadVars();  
MyData.onLoad = function() {  
textbox = MyData[“mytext”];  
};  
MyData.load(“extetx1.txt”);

any way to make that text scrollable when there is a lot of text, more than flash window size? (clipped)???:diss:

regular scroller wont work, i tried silly methods (like hit enter 100times to fill up the window to make it active).

---

<div class="post-metadata">

### Author: ![kathari](https://avatars.discourse-cdn.com/v4/letter/k/a183cd/32.png) [@kathari](https://forum.kirupa.com/u/kathari)
#### Post date: [March 28, 2006, 6:47pm UTC](https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600/2 "2006-03-28T18:47:33Z")

</div>

HI  
I am not really into Flash and a bit unconcentrated at the moment but you should be able to make your text scroll. This is the script I have put in an swf for What I would call “regular” scrolling.  
[AS]loadInfo = new LoadVars();  
loadInfo.load(“textinfo.txt”);  
loadInfo.onLoad = function() {  
main\_txt.htmltext = this.firstText;  
};[/AS]And for the scrolling:  
[AS]up.onPress = function() {  
pressing = true;  
movement = -1;  
};  
up.onRelease = function() {  
pressing = false;  
};  
down.onPress = function() {  
pressing = true;  
movement = 1;  
};  
down.onRelease = function() {  
pressing = false;  
};  
this.onEnterFrame = function() {  
if (pressing == true) {  
main\_txt.scroll = main\_txt.scroll+movement;  
}  
};  
[/AS]where up refers to an “uparrow” mc, down to a “downarrow” mc and main\_txt to the textfield. Of course you need to make sure that the textfield is scrollable. It shouldn’t matter whether the textfield is an html textfield or not. Hope this helps=)

I don’t really remember but I think you need to put the MyData.load like I have done or it won’t work.

---

<div class="post-metadata">

### Author: ![lunatic](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@lunatic](https://forum.kirupa.com/u/lunatic)
#### Post date: [March 28, 2006, 6:48pm UTC](https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600/3 "2006-03-28T18:48:11Z")

</div>

What do you mean scroller won’t work?

---

<div class="post-metadata">

### Author: ![hoteurochick](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@hoteurochick](https://forum.kirupa.com/u/hoteurochick)
#### Post date: [March 28, 2006, 7:01pm UTC](https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600/4 "2006-03-28T19:01:31Z")

</div>

> [@lunatic](#):
>
> What do you mean scroller won’t work?

ok, i mean: when i type text in notepad, some of it will be cropped by size of swf file where it loads. text loads into dynamic text box - i added scrollers to that dynamic type box but its inactive.

?:diss:

---

<div class="post-metadata">

### Author: ![hoteurochick](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@hoteurochick](https://forum.kirupa.com/u/hoteurochick)
#### Post date: [March 28, 2006, 7:02pm UTC](https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600/5 "2006-03-28T19:02:28Z")

</div>

thank you! i will work on that:te:

> [@kathari](#):
>
> HI  
> I am not really into Flash and a bit unconcentrated at the moment but you should be able to make your text scroll. This is the script I have put in an swf for What I would call “regular” scrolling.
> 
> ActionScript Code:  
> [FONT=Courier New][LEFT]loadInfo = [COLOR=#000000] **new** [/COLOR] [COLOR=#0000ff]LoadVars[/COLOR]COLOR=#000000[/COLOR];\</p\>  
> \<p\>loadInfo.[COLOR=#0000ff]load[/COLOR]COLOR=#000000[/COLOR];\</p\>  
> \<p\>loadInfo.[COLOR=#0000ff]onLoad[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
> \<p\>&nbsp;&nbsp;&nbsp;&nbsp;main\_txt.[COLOR=#0000ff]htmltext[/COLOR] = [COLOR=#0000ff]this[/COLOR].[COLOR=#000080]firstText[/COLOR];\</p\>  
> \<p\>[COLOR=#000000]}[/COLOR];  
> [/LEFT]  
> [/FONT]
> 
> And for the scrolling:
> 
> ActionScript Code:  
> [FONT=Courier New][LEFT][COLOR=#0000ff]up[/COLOR].[COLOR=#0000ff]onPress[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
> \<p\>&nbsp;&nbsp;&nbsp;&nbsp;pressing = [COLOR=#000000] **true** [/COLOR];\</p\>  
> \<p\>&nbsp;&nbsp;&nbsp;&nbsp;movement = -[COLOR=#000080]1[/COLOR];\</p\>  
> \<p\>[COLOR=#000000]}[/COLOR];\</p\>  
> \<p\>up.[COLOR=#0000ff]onRelease[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
> \<p\>&nbsp;&nbsp;&nbsp;&nbsp;pressing = [COLOR=#000000] **false** [/COLOR];\</p\>  
> \<p\>[COLOR=#000000]}[/COLOR];\</p\>  
> \<p\>down.[COLOR=#0000ff]onPress[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
> \<p\>&nbsp;&nbsp;&nbsp;&nbsp;pressing = [COLOR=#000000] **true** [/COLOR];\</p\>  
> \<p\>&nbsp;&nbsp;&nbsp;&nbsp;movement = [COLOR=#000080]1[/COLOR];\</p\>  
> \<p\>[COLOR=#000000]}[/COLOR];\</p\>  
> \<p\>down.[COLOR=#0000ff]onRelease[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
> \<p\>&nbsp;&nbsp;&nbsp;&nbsp;pressing = [COLOR=#000000] **false** [/COLOR];\</p\>  
> \<p\>[COLOR=#000000]}[/COLOR];\</p\>  
> \<p\>this.[COLOR=#0000ff]onEnterFrame[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
> \<p\>&nbsp;&nbsp;&nbsp;&nbsp;if [COLOR=#000000]([/COLOR]pressing == [COLOR=#000000] **true** [/COLOR][COLOR=#000000])[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
> \<p\>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;main\_txt.[COLOR=#0000ff]scroll[/COLOR] = main\_txt.[COLOR=#0000ff]scroll[/COLOR]+movement;\</p\>  
> \<p\>&nbsp;&nbsp;&nbsp;&nbsp;[COLOR=#000000]}[/COLOR]\</p\>  
> \<p\>[COLOR=#000000]}[/COLOR];\</p\>  
> \<p\>  
> [/LEFT]  
> [/FONT]
> 
> where up refers to an “uparrow” mc, down to a “downarrow” mc and main\_txt to the textfield. Of course you need to make sure that the textfield is scrollable. It shouldn’t matter whether the textfield is an html textfield or not. Hope this helps=)
> 
> I don’t really remember but I think you need to put the MyData.load like I have done or it won’t work.

---

<div class="post-metadata">

### Author: ![lunatic](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@lunatic](https://forum.kirupa.com/u/lunatic)
#### Post date: [March 28, 2006, 7:04pm UTC](https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600/6 "2006-03-28T19:04:36Z")

</div>

then the scroller isn’t linked to your textbox.

Adding a scroller can be tricky. The best way to do it is to make sure that you have snapping turned on. I think it’s specifically “Snap to Objects” but I always make sure they are all on just in case. 😃 After turning the snapping on, select your dynamic text box so it is highlighted, then drag the scroller from the components box/menu on top of your textbox. You should see the scroller “snap” to your textbox and then in the properties panel the scroller should take on the instance name of your textbox somewhere in it’s properties (I forget exactly where).

If you are still having trouble post your fla and textfile. :hr:

---

<div class="post-metadata">

### Author: ![hoteurochick](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@hoteurochick](https://forum.kirupa.com/u/hoteurochick)
#### Post date: [March 28, 2006, 7:10pm UTC](https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600/7 "2006-03-28T19:10:35Z")

</div>

yes i did snapping, got the instance name, all correct, still dead. basically does not react with notepad text size. i will work on it, maybe i shoud do animated scroller,not sure, need to think…thank you.

> [@lunatic](#):
>
> then the scroller isn’t linked to your textbox.
> 
> Adding a scroller can be tricky. The best way to do it is to make sure that you have snapping turned on. I think it’s specifically “Snap to Objects” but I always make sure they are all on just in case. 😃 After turning the snapping on, select your dynamic text box so it is highlighted, then drag the scroller from the components box/menu on top of your textbox. You should see the scroller “snap” to your textbox and then in the properties panel the scroller should take on the instance name of your textbox somewhere in it’s properties (I forget exactly where).
> 
> If you are still having trouble post your fla and textfile. :hr:

---

<div class="post-metadata">

### Author: ![kathari](https://avatars.discourse-cdn.com/v4/letter/k/a183cd/32.png) [@kathari](https://forum.kirupa.com/u/kathari)
#### Post date: [March 28, 2006, 7:20pm UTC](https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600/8 "2006-03-28T19:20:04Z")

</div>

How did you do to make that quote html-tagged?!:cyclops:

---

<div class="post-metadata">

### Author: ![gonzolo](https://avatars.discourse-cdn.com/v4/letter/g/d2c977/32.png) [@gonzolo](https://forum.kirupa.com/u/gonzolo)
#### Post date: [March 28, 2006, 7:20pm UTC](https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600/9 "2006-03-28T19:20:59Z")

</div>

[http://www.gonzolo.dk/css\_og\_flash/ffhtextscrollbar.mxp](http://www.gonzolo.dk/css_og_flash/ffhtextscrollbar.mxp)

this should work also u can skin this

---

<div class="post-metadata">

### Author: ![hoteurochick](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@hoteurochick](https://forum.kirupa.com/u/hoteurochick)
#### Post date: [March 28, 2006, 7:24pm UTC](https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600/10 "2006-03-28T19:24:13Z")

</div>

ok , there is a file: im sure i forgot to do sth stupid.

> [@kathari](#):
>
> How did you do to make that quote html-tagged?!:cyclops:

---

<div class="post-metadata">

### Author: ![kathari](https://avatars.discourse-cdn.com/v4/letter/k/a183cd/32.png) [@kathari](https://forum.kirupa.com/u/kathari)
#### Post date: [March 28, 2006, 7:31pm UTC](https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600/11 "2006-03-28T19:31:38Z")

</div>

YOu need to take away “textbox” in the var field (and keep it as the textfield name which you have already done)and change the “set variable” statement to: textbox.text = mytext;  
[AS]MyData = new LoadVars();  
MyData.load(“exttxt1.txt”);  
MyData.onLoad = function() {  
textbox.text = MyData[“mytext”];  
};[/AS]

---

<div class="post-metadata">

### Author: ![kathari](https://avatars.discourse-cdn.com/v4/letter/k/a183cd/32.png) [@kathari](https://forum.kirupa.com/u/kathari)
#### Post date: [March 28, 2006, 7:38pm UTC](https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600/12 "2006-03-28T19:38:11Z")

</div>

Sorry about the set variable script. Just look at the action script code. It’s correct there.

---

<div class="post-metadata">

### Author: ![hoteurochick](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@hoteurochick](https://forum.kirupa.com/u/hoteurochick)
#### Post date: [March 28, 2006, 7:41pm UTC](https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600/13 "2006-03-28T19:41:54Z")

</div>

**:love: thank you.**  
thank you all for the help.

> [@kathari](#):
>
> YOu need to take away “textbox” in the var field (and keep it as the textfield name which you have already done)and change the “set variable” statement to: textbox.text = mytext;
> 
> ActionScript Code:  
> [FONT=Courier New][LEFT]MyData = [COLOR=#000000] **new** [/COLOR] [COLOR=#0000ff]LoadVars[/COLOR]COLOR=#000000[/COLOR];\</p\>  
> \<p\>MyData.[COLOR=#0000ff]load[/COLOR]COLOR=#000000[/COLOR];\</p\>  
> \<p\>MyData.[COLOR=#0000ff]onLoad[/COLOR] = [COLOR=#000000] **function** [/COLOR]COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]\</p\>  
> \<p\>&nbsp;&nbsp;&nbsp;&nbsp;textbox.[COLOR=#0000ff]text[/COLOR] = MyData[COLOR=#000000][[/COLOR][COLOR=#ff0000]“mytext”[/COLOR][COLOR=#000000]][/COLOR];\</p\>  
> \<p\>[COLOR=#000000]}[/COLOR];  
> [/LEFT]  
> [/FONT]

---

<div class="post-metadata">

### Author: ![hoteurochick](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@hoteurochick](https://forum.kirupa.com/u/hoteurochick)
#### Post date: [March 30, 2006, 5:44pm UTC](https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600/14 "2006-03-30T17:44:39Z")

</div>

I have a question if is any way to remove that flashing message

\_level0.contents.textbox

- text is added to a swf movie, which is an external loading into main movie, and empty m\_c “contents”.  
:crazy:

> [@hoteurochick](#):
>
> Hi Guys,  
> for the flash file with code
> 
> MyData = new LoadVars();  
> MyData.onLoad = function() {  
> textbox = MyData[“mytext”];  
> };  
> MyData.load(“extetx1.txt”);
> 
> any way to make that text scrollable when there is a lot of text, more than flash window size? (clipped)???:diss:
> 
> regular scroller wont work, i tried silly methods (like hit enter 100times to fill up the window to make it active).

---

<div class="post-metadata">

### Author: ![lunatic](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@lunatic](https://forum.kirupa.com/u/lunatic)
#### Post date: [March 30, 2006, 6:25pm UTC](https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600/15 "2006-03-30T18:25:26Z")

</div>

“flashing message?” :h:

Do you have a trace somewhere in your code? 🙂

---

<div class="post-metadata">

### Author: ![hoteurochick](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@hoteurochick](https://forum.kirupa.com/u/hoteurochick)
#### Post date: [March 30, 2006, 6:45pm UTC](https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600/16 "2006-03-30T18:45:55Z")

</div>

just before text shows, at very first time it loads, that messages appears.  
a trace?:puzzled:

> [@lunatic](#):
>
> “flashing message?” :h:
> 
> Do you have a trace somewhere in your code? 🙂

---

<div class="post-metadata">

### Author: ![lunatic](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@lunatic](https://forum.kirupa.com/u/lunatic)
#### Post date: [March 30, 2006, 7:11pm UTC](https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600/17 "2006-03-30T19:11:09Z")

</div>

where does it appear? If it appears in a window called “output” then you have a trace somewhere in your code.

Trace allows you to check what’s going on. You can trace the output of a variable from a calculation, the property of a movieclip, or the current frame your playhead is on. You can also output simple text like “hello”. It is a great debugging tool actually because you can put trace(“hello”) after a line of code and if you see “hello” in the output window then you know the line of code above the trace fired. If you don’t see “hello” then something is wrong with the code. Make sense?

So look through all the places you have code and see if you can find the trace. It will look like:  
trace(something here)

---

<div class="post-metadata">

### Author: ![hoteurochick](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@hoteurochick](https://forum.kirupa.com/u/hoteurochick)
#### Post date: [March 30, 2006, 7:55pm UTC](https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600/18 "2006-03-30T19:55:27Z")

</div>

thank you.

yes i have for preloader

trace(this.file)

> [@lunatic](#):
>
> where does it appear? If it appears in a window called “output” then you have a trace somewhere in your code.
> 
> Trace allows you to check what’s going on. You can trace the output of a variable from a calculation, the property of a movieclip, or the current frame your playhead is on. You can also output simple text like “hello”. It is a great debugging tool actually because you can put trace(“hello”) after a line of code and if you see “hello” in the output window then you know the line of code above the trace fired. If you don’t see “hello” then something is wrong with the code. Make sense?
> 
> So look through all the places you have code and see if you can find the trace. It will look like:  
> trace(something here)

---

<div class="post-metadata">

### Author: ![lunatic](https://avatars.discourse-cdn.com/v4/letter/l/73ab20/32.png) [@lunatic](https://forum.kirupa.com/u/lunatic)
#### Post date: [March 30, 2006, 8:06pm UTC](https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600/19 "2006-03-30T20:06:10Z")

</div>

okay well you can just either get rid of it or comment it out (put // in front of it) and then you won’t see it anymore

:hr:

---

<div class="post-metadata">

### Author: ![hoteurochick](https://avatars.discourse-cdn.com/v4/letter/h/6f9a4e/32.png) [@hoteurochick](https://forum.kirupa.com/u/hoteurochick)
#### Post date: [March 30, 2006, 8:11pm UTC](https://forum.kirupa.com/t/how-to-scroll-external-text-notepad-edited/183600/20 "2006-03-30T20:11:11Z")

</div>

.:wasted:  
well still shows up, no change…

but anyhow thank you for help.

> [@lunatic](#):
>
> okay well you can just either get rid of it or comment it out (put // in front of it) and then you won’t see it anymore
> 
> :hr:
