# Load new text on click

**URL:** <https://forum.kirupa.com/t/load-new-text-on-click/22309>\
**Category:** flash\
**Created:** [June 2, 2003, 3:14pm UTC](https://forum.kirupa.com/t/load-new-text-on-click/22309 "2003-06-02T15:14:34Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![kmax](https://avatars.discourse-cdn.com/v4/letter/k/e36b37/32.png) [@kmax](https://forum.kirupa.com/u/kmax)\
**Post date:** [June 2, 2003, 3:14pm UTC](https://forum.kirupa.com/t/load-new-text-on-click/22309/1 "2003-06-02T15:14:34Z")

</div>

Hello, here are the basics of what i am trying to do in flash mx:

have 4 or 5 text links.

have a text “area”

when you click each link you get new text about that subject.

I have been through the tutorial on dynamic text and that works great.

But this is going to be made into a projector and I dont know how those text files will work with a projector.

Also, I need to figure out how to make the text change each time a link is clicked.

Please let me know if you know of a tutorial or something that will help me figure this out.

Thanks for your time,  
Kenny

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 3, 2003, 9:15am UTC](https://forum.kirupa.com/t/load-new-text-on-click/22309/2 "2003-06-03T09:15:11Z")

</div>

I think this could be what you are after: [http://oddhammer.com/unicode/tutorial.htm](http://oddhammer.com/unicode/tutorial.htm).

I have used text files with a projector before and it worked. Just keep the text files in the same folder as the projector is.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 3, 2003, 11:54am UTC](https://forum.kirupa.com/t/load-new-text-on-click/22309/3 "2003-06-03T11:54:47Z")

</div>

That tutorial is good…  
But they dont have any scroll bars on theirs…

Thats the prob with mine right now…  
I have it working great…

But the scroll bar does not work right…

It has something to do with the fact that I have a variable on the text area…

I made one without the dynamic text and the scroll bar works great… so i dont know whats up…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 3, 2003, 12:34pm UTC](https://forum.kirupa.com/t/load-new-text-on-click/22309/4 "2003-06-03T12:34:16Z")

</div>

Can you post the fla file here?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 3, 2003, 12:50pm UTC](https://forum.kirupa.com/t/load-new-text-on-click/22309/5 "2003-06-03T12:50:07Z")

</div>

Thanks… here it is…  
i could not make it small enough to upload here for some reason…

If you click on button 2… it looks like the scroll bar works…

but if you highlight the text you will see that there is a lot more text at the bottom…

[http://www.forhisglory2003.com/flashdemo/demo.fla](http://www.forhisglory2003.com/flashdemo/demo.fla)

the text files are also there…

thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 3, 2003, 2:17pm UTC](https://forum.kirupa.com/t/load-new-text-on-click/22309/6 "2003-06-03T14:17:32Z")

</div>

The fla file only appeared in the post not the text files.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 3, 2003, 2:25pm UTC](https://forum.kirupa.com/t/load-new-text-on-click/22309/7 "2003-06-03T14:25:48Z")

</div>

sorry… they are in that dir on the server…

[http://www.forhisglory2003.com/flashdemo/test.txt](http://www.forhisglory2003.com/flashdemo/test.txt)  
[http://www.forhisglory2003.com/flashdemo/test2.txt](http://www.forhisglory2003.com/flashdemo/test2.txt)  
[http://www.forhisglory2003.com/flashdemo/test3.txt](http://www.forhisglory2003.com/flashdemo/test3.txt)

thanks again

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 3, 2003, 7:07pm UTC](https://forum.kirupa.com/t/load-new-text-on-click/22309/8 "2003-06-03T19:07:37Z")

</div>

This must be part of the problem.  
I am using a variable for the dynamic text area…  
And using an instance name…  
Look at this note I found on the Macromedia site.

Note: Do NOT give the text field a variable name. But do give it an instance name. In this example the instance name is ‘scroller’ and line type popup is set to ‘multiline’.

That must be why the scrollbars dont work…

Thats all I can think…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 4, 2003, 2:03am UTC](https://forum.kirupa.com/t/load-new-text-on-click/22309/9 "2003-06-04T02:03:57Z")

</div>

Sorry about the delay but unfortunately I can’t work it out maybe someone else might be able to.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 4, 2003, 2:40am UTC](https://forum.kirupa.com/t/load-new-text-on-click/22309/10 "2003-06-04T02:40:58Z")

</div>

There is no need to double post…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 4, 2003, 2:43am UTC](https://forum.kirupa.com/t/load-new-text-on-click/22309/11 "2003-06-04T02:43:17Z")

</div>

Electrogeek… I dont know what you mean…  
Unless I hit my back button or something…  
and it submitted it twice…

anyway… sorry if i was a pain…

peace out

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 4, 2003, 2:46am UTC](https://forum.kirupa.com/t/load-new-text-on-click/22309/12 "2003-06-04T02:46:09Z")

</div>

I just deleted a second thread you posted on this same subject. Let’s keep it to one thread, creating more threads will only confuse people more.

No harm done…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 4, 2003, 2:55am UTC](https://forum.kirupa.com/t/load-new-text-on-click/22309/13 "2003-06-04T02:55:43Z")

</div>

If you want to keep a thread alive, next time just reply to the same thread so that it gets moved to the top of the section so others will see it.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 4, 2003, 8:20pm UTC](https://forum.kirupa.com/t/load-new-text-on-click/22309/14 "2003-06-04T20:20:31Z")

</div>

Well I looked this up on the macromedia site… and they have an example of using a dynamic text area… but they say not to use assign a variable to the text area…

And to make this work we assigned a variable to the text area…

So I dont know if this will work or not…

Anyone ever done this before?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 5, 2003, 2:46am UTC](https://forum.kirupa.com/t/load-new-text-on-click/22309/15 "2003-06-05T02:46:52Z")

</div>

Still no takers for this one?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 5, 2003, 3:44am UTC](https://forum.kirupa.com/t/load-new-text-on-click/22309/16 "2003-06-05T03:44:04Z")

</div>

I don’t understand why your file size is so huge for what it’s doing. I didn’t check, but do you have a lot of things in your library that you are not using? Anyho–

I ripped out your component because it obviously loads once, and that’s it. That’s my guess anyway. I made some extra buttons and when you rollOver them they will scroll no matter what is in them.

Hope that works for you. Here’s the link to it (to lazy to zip):

[http://www.freddythunder.com/flas/kmax.fla](http://www.freddythunder.com/flas/kmax.fla)

:beam:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 5, 2003, 11:26am UTC](https://forum.kirupa.com/t/load-new-text-on-click/22309/17 "2003-06-05T11:26:46Z")

</div>

ya know… i still pretty new to flash…  
so yeah… i probably have a ton of stuff in the library thats not used. 🙂 just making symbols… then deleting those layers etc…

i will try that in a bit when i get to work where there is flash mx…

thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 5, 2003, 12:15pm UTC](https://forum.kirupa.com/t/load-new-text-on-click/22309/18 "2003-06-05T12:15:35Z")

</div>

thanks! that works.  
i still dont know why the scroll bar wont work…  
but oh well… .these custom buttons look better anyway…

now i can start building my app… thanks man.

kj

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 5, 2003, 12:21pm UTC](https://forum.kirupa.com/t/load-new-text-on-click/22309/19 "2003-06-05T12:21:03Z")

</div>

What does this line do?  
scrollInt = setInterval(scrollText, 1000/24, this.a)

It looks like it sets the speed… I was trying to learn how this works…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 5, 2003, 1:13pm UTC](https://forum.kirupa.com/t/load-new-text-on-click/22309/20 "2003-06-05T13:13:39Z")

</div>

By the way, about those buttons, I noticed after I posted it that I didn’t adjust the over state of the down button, you may want to fix that.

setInterval is a timer script kinda like getTimer();. I’m have too much of a grasp on how it works, because I use getTimer more. Kax gave that code to me a few months ago and I used it on a project. There is a thread where LostInBeta explains it. It’s here:  
[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=24289&highlight=getTimer](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=24289&highlight=getTimer)

You are absolutley right, though, it sets a timer. The funtion is to scroll the text.  
(-:

[Next page](https://forum.kirupa.com/t/load-new-text-on-click/22309.md?page=2)
