# Loadmovie, url = loaded from textfile

**URL:** <https://forum.kirupa.com/t/loadmovie-url-loaded-from-textfile/9948>\
**Category:** Uncategorized\
**Created:** [December 21, 2002, 3:04pm UTC](https://forum.kirupa.com/t/loadmovie-url-loaded-from-textfile/9948 "2002-12-21T15:04:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seticus](https://avatars.discourse-cdn.com/v4/letter/s/46a35a/32.png) [@Seticus](https://forum.kirupa.com/u/Seticus)\
**Post date:** [December 21, 2002, 3:04pm UTC](https://forum.kirupa.com/t/loadmovie-url-loaded-from-textfile/9948/1 "2002-12-21T15:04:20Z")

</div>

Well, this is my problem: I have a textfile: with:

1. some text to be loaded into a textbox
2. an url of an image I want to load into a movieclip

```auto
loadVariables("mytextfile.txt", "_root");
urlpic = _root.urlintext;
loadMovie(urlpic, "_root.pic");

```

This doesn’t work, and neither does: url1 = \_root.url1.text;  
I know this can be a stupid question, but I haven’t got any idea…

---

<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:** [December 21, 2002, 3:07pm UTC](https://forum.kirupa.com/t/loadmovie-url-loaded-from-textfile/9948/2 "2002-12-21T15:07:08Z")

</div>

well what have you got your textfile?  
Also check if the text file is in the same folder as the flash movie!

---

<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:** [December 21, 2002, 3:12pm UTC](https://forum.kirupa.com/t/loadmovie-url-loaded-from-textfile/9948/3 "2002-12-21T15:12:42Z")

</div>

oh that’s not the problem, he just won’t use the text inside the url-textbox because I loaded it into it using loadvars. If you really want to know what’s in my text-file:

```auto
urlintext=here comes the url for my pic&text=here comes my 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:** [December 21, 2002, 3:36pm UTC](https://forum.kirupa.com/t/loadmovie-url-loaded-from-textfile/9948/4 "2002-12-21T15:36:32Z")

</div>

what is “url1 = \_root.url1.text;”?  
btw you testing it client-side?

---

<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:** [December 21, 2002, 4:04pm UTC](https://forum.kirupa.com/t/loadmovie-url-loaded-from-textfile/9948/5 "2002-12-21T16:04:53Z")

</div>

oh sorry, my mistake, I copied the wrong text, it should be this:  
“urlpic = \_root.urlintext.text;” doesn’t work. And tell me how I should test it client-side? Never done that 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:** [December 21, 2002, 4:25pm UTC](https://forum.kirupa.com/t/loadmovie-url-loaded-from-textfile/9948/6 "2002-12-21T16:25:18Z")

</div>

I mean that you did not upload it did ya? You just tested the main movie on your computer?

---

<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:** [December 21, 2002, 9:35pm UTC](https://forum.kirupa.com/t/loadmovie-url-loaded-from-textfile/9948/7 "2002-12-21T21:35:46Z")

</div>

that’s right, does that change anything? I don’t think so (could be) have you got any idea how to assing the text inside a textbox to a variable and then use the variable as a loadmovie-url, 'cause it really doesn’t work when you use my script above… 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:** [December 22, 2002, 8:36am UTC](https://forum.kirupa.com/t/loadmovie-url-loaded-from-textfile/9948/8 "2002-12-22T08:36:16Z")

</div>

how come iyt won’t work… this is pissing me off!  
Gimme the fla, textfile n’ stuff I wanna see wut’s wrong!! :pirate:

---

<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:** [December 23, 2002, 6:31pm UTC](https://forum.kirupa.com/t/loadmovie-url-loaded-from-textfile/9948/9 "2002-12-23T18:31:58Z")

</div>

here u go… download the source fla…

also use this code

myvars = new LoadVars();  
myvars.load(“text.txt”); // here you could make this path dynamic  
myvars.onLoad = function(){  
//this is where you tell what flash what to do with the variables loaded from the txt file.  
\_root.textf.text = myvars.title;  
loadMovie(myvars.url,\_root.pic);   
}

oh yeah and also a test.jpg file in the root to test, i forgot to include it in the zip

Jakub Koter
