# Jubba!

**URL:** https://forum.kirupa.com/t/jubba/20282
**Category:** Uncategorized
**Created:** [May 7, 2003, 3:07am UTC](https://forum.kirupa.com/t/jubba/20282 "2003-05-07T03:07:34Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Lacuna](https://avatars.discourse-cdn.com/v4/letter/l/edb3f5/32.png) [@Lacuna](https://forum.kirupa.com/u/Lacuna)
#### Post date: [May 7, 2003, 3:07am UTC](https://forum.kirupa.com/t/jubba/20282/1 "2003-05-07T03:07:34Z")

</div>

Hey Jubba,

The other night you helped me out with that scroller (thanks by the way) but due to puctuation needs in the text I’ll need to use an imported text file (dynamically loaded text) and I’ve used a few codes but they’re not working. For this instance let’s pretend that my file is called test.txt

I’ve recently tried using

```php

scrollableText = new loadVars();
scrollableText.load("test.txt");

```

at the very bottom of your code where it replaces the text you usually just type in. I want the ‘scrollableText’ which is the var name of the textbox to contain test.txt…any suggestions?

:love: ~ Seretha

---

<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: [May 7, 2003, 3:11am UTC](https://forum.kirupa.com/t/jubba/20282/2 "2003-05-07T03:11:17Z")

</div>

you should have an onLoad function 🙂

```auto
// make a LoadVars object
lv = new LoadVars();
// define 'onLoad' handler
lv.onLoad = function (success) {
        // this function gets called once something has been returned
        // if the file was returned correctly
        // 'success' will be 1
        // otherwise it will be 0 (and something went wrong)
        // remember that your onLoad function should always be declared
        // *before* you try to load in a file (otherwise it might not trigger)
        // typically, this function will look like:
        if (success) {
                // success, variables are available for use, for instance:
               myTextField.text = this.news // make sure you have 'this' infront of the variable name 
		}
}
// load in the file
lv.load("textfile.txt");

```

---

<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: [May 7, 2003, 3:12am UTC](https://forum.kirupa.com/t/jubba/20282/3 "2003-05-07T03:12:21Z")

</div>

Or listen to ahmed… :trout:

DAM YOU!!! 🙂

---

<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: [May 7, 2003, 3:13am UTC](https://forum.kirupa.com/t/jubba/20282/4 "2003-05-07T03:13:21Z")

</div>

lol 😛

sorry jubba… :trout: 😛

---

<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: [May 7, 2003, 3:16am UTC](https://forum.kirupa.com/t/jubba/20282/5 "2003-05-07T03:16:05Z")

</div>

– Ahmed

I changed the ‘myTextField’ to scrollableText and ‘textfile.txt’ to ‘test.txt’ and it doesn’t function at all. Am I suppose to change the lv to reference something in my file as well? Thanks for the quick reply BTW!

---

<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: [May 7, 2003, 3:21am UTC](https://forum.kirupa.com/t/jubba/20282/6 "2003-05-07T03:21:08Z")

</div>

oh…i kind od screwed up (thought you were using textfield with instance name)… do this instead:

```auto
myTextField = this.myTextField // make sure you have 'this' infront of the variable name
        }
}
// load in the file
lv.load("test.txt");

```

---

<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: [May 7, 2003, 3:25am UTC](https://forum.kirupa.com/t/jubba/20282/7 "2003-05-07T03:25:08Z")

</div>

nope. still not working. what’s the lv for specifically…i’m not changing it to anything, should I be?

---

<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: [May 7, 2003, 3:29am UTC](https://forum.kirupa.com/t/jubba/20282/8 "2003-05-07T03:29:23Z")

</div>

I think I should’ve left this question for jubba :trout:

what flash version are you on? and what error does it give you? :q:

try ignoring all the above, and use this code:

```auto
loadVariables("test.txt", this)

```

---

<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: [May 7, 2003, 3:33am UTC](https://forum.kirupa.com/t/jubba/20282/9 "2003-05-07T03:33:36Z")

</div>

actually, no error pops up, the text just doesn’t show (it does pop up a mssg if i enter a .txt that is non-existant tho…weird eh?) and I’m using MX.

:love: ~ Seretha

haha and no that code doesn’t work either. Whatever code it is I’m sure it’ll have to identify that the text has to go into scrollableText tho…hmmmmmmmmmm

---

<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: [May 7, 2003, 3:36am UTC](https://forum.kirupa.com/t/jubba/20282/10 "2003-05-07T03:36:12Z")

</div>

8

---

<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: [May 7, 2003, 3:44am UTC](https://forum.kirupa.com/t/jubba/20282/11 "2003-05-07T03:44:15Z")

</div>

im sure my code is correct though… see these files 🙂

[http://24.141.60.208/seretha.zip](http://24.141.60.208/seretha.zip)

---

<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: [May 7, 2003, 3:47am UTC](https://forum.kirupa.com/t/jubba/20282/12 "2003-05-07T03:47:35Z")

</div>

ahh… i dont see any text

---

<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: [May 7, 2003, 3:48am UTC](https://forum.kirupa.com/t/jubba/20282/13 "2003-05-07T03:48:48Z")

</div>

ahmed -

I think maybe the reason your code isnt working for me is because I’m using Jubba’s custom scrollbar not the components scrollbar. The code seems to differ because of that.

---

<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: [May 7, 2003, 3:49am UTC](https://forum.kirupa.com/t/jubba/20282/14 "2003-05-07T03:49:10Z")

</div>

do you see any text here?

[http://24.141.60.208/seretha/news.swf](http://24.141.60.208/seretha/news.swf)

edit

how you load the text shouldn’t make a different in loading the variable i 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: [May 7, 2003, 3:54am UTC](https://forum.kirupa.com/t/jubba/20282/15 "2003-05-07T03:54:18Z")

</div>

ahmed -

yea i do see that text. I’ve tried using Kirupa’s dynamic tutorial tho and (and ive used those scrollbars before as well) the code doesn’t pull it up for some reason although it DOES somehow recognize it NEEDS to use the file test.txt as when I put a false file in that spot I DO get an error saying file not found…

---

<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: [May 7, 2003, 3:58am UTC](https://forum.kirupa.com/t/jubba/20282/16 "2003-05-07T03:58:54Z")

</div>

how is your text file set up? that might be the problem. 🙂

---

<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: [May 7, 2003, 4:21am UTC](https://forum.kirupa.com/t/jubba/20282/17 "2003-05-07T04:21:46Z")

</div>

well the text file is named ‘test.txt’ and all it contains is the following:

```php

test=
testing with this sentence.

```

---

<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: [May 7, 2003, 4:23am UTC](https://forum.kirupa.com/t/jubba/20282/18 "2003-05-07T04:23:48Z")

</div>

```auto
scrollableText=The text you want to display here

```

try that. Actually name the variable in the text file “scrollableText” the same as the textbox…

---

<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: [May 7, 2003, 4:34am UTC](https://forum.kirupa.com/t/jubba/20282/19 "2003-05-07T04:34:11Z")

</div>

well it makes the ‘the text you want to display here’ show up but not the textfile text from the .txt

---

<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: [May 7, 2003, 4:34am UTC](https://forum.kirupa.com/t/jubba/20282/20 "2003-05-07T04:34:48Z")

</div>

now did you want me to only rename the VARIABLE IN THE TEXT FILE or the name of the file as well?

[Next page](https://forum.kirupa.com/t/jubba/20282.md?page=2)
