# Flash Geniuses..unwanted code appears in my text field

**URL:** <https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613>\
**Category:** flash\
**Created:** [December 15, 2002, 5:52am UTC](https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613 "2002-12-15T05:52:48Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ter](https://avatars.discourse-cdn.com/v4/letter/t/7c8e57/32.png) [@ter](https://forum.kirupa.com/u/ter)\
**Post date:** [December 15, 2002, 5:52am UTC](https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613/1 "2002-12-15T05:52:48Z")

</div>

I used the Kirupa tutorial on loading text in a flash file dynamically from a txt file and after my txt file displays in flash it is followed by unwanted html code that it displays for some reason. I can’t figure out why it is doing this so if anyone knows how i can fix this please let me know… If you want to see what I am talking about, it is at:  
[http://snow.prohosting.com/solrise](http://snow.prohosting.com/solrise)  
click on a picture and scroll to bottom of text

THanks,  
Ter

---

<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 15, 2002, 6:01am UTC](https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613/2 "2002-12-15T06:01:23Z")

</div>

let’s see your txt file. and maybe the code that parses the txt file would help too.  
🙂  
jeremy

---

<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 15, 2002, 6:30am UTC](https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613/3 "2002-12-15T06:30:03Z")

</div>

the actionscript I use is the following:

loadText = new loadVars();  
loadText.load(“bios/david1.txt”);  
//creating the loadVarsText function  
loadText.onLoad = function() {  
scroller.text = this.davidtext;  
};

it’s calling up a .txt file from the server which is on a dreamweaver page which contains the following:

davidtext=texthereandhereandhereandhere

---

<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 15, 2002, 6:32am UTC](https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613/4 "2002-12-15T06:32:42Z")

</div>

this is your problem:

Flash does not support anything beyond HTML 1.0 which is pretty much just basic font manipulation, links and emails. ie. you can do coding that deals with font size style face etc, but nothing beyond that… your text file should not contain anything beyond things like this:

```php

myText=<FONT SIZE="15"><B>COMPANY PERSONNEL</B></FONT>
<FONT SIZE="14"><B>Corporate Office / Warehouse</B><BR>International Importers, Inc.<BR>5221 S. Millard Avenue<BR>Chicago, IL 60632
General Office: Accounting, Inquirers, etc.<BR><A HREF="MAILTO:iii5221@intl-importers.com"><FONT COLOR="#0000ff"><U>iii5221@intl-importers.com</U></FONT></A>...

```

Just a little part of a text file loaded into one of the sites I’ve done.

Hope this helps… let me know if you need anything else.

Peace

---

<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 15, 2002, 6:51am UTC](https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613/5 "2002-12-15T06:51:41Z")

</div>

Hey I appreciate your replys. I still can’t figure out why flash is displaying the extra code because the text file contains only an equals statment and the text which is plain. It appears that flash is reading and displaying the code of the banner which the prohosting site puts on the page. Any ideas on what I can do to have it not read that?

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 15, 2002, 7:02am UTC](https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613/6 "2002-12-15T07:02:22Z")

</div>

hmmmm… well if there is any way you can get your hosting to remove that code - because as long as it is auto coded into the txt file, flash will put it in as stuff it thinks you want people to see. Paying for your own server would be the easiest and best fix… who is the pre hosting service? Maybe we can find a work around…

---

<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 15, 2002, 7:05am UTC](https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613/7 "2002-12-15T07:05:30Z")

</div>

we could try this too… post your txt and I’ll post it on my own server then you could update your AS code to load the txt file from this location:

[http://www.grafikdesigns.com/tryText.txt](http://www.grafikdesigns.com/tryText.txt)

Peace

---

<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 15, 2002, 7:07am UTC](https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613/8 "2002-12-15T07:07:55Z")

</div>

the last option would at least let you know that the only prob is your hosting service…

Peace

---

<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 15, 2002, 10:06pm UTC](https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613/9 "2002-12-15T22:06:15Z")

</div>

That sounds like a good idea. I appreciate that. I’ll attach the david1.txt file to this post.

Would the updated actionscript I write to call david1, for example, look like the following:

[http://www.grafikdesigns.com/tryText.txt/david1.txt](http://www.grafikdesigns.com/tryText.txt/david1.txt)  
or  
[http://www.grafikdesigns.com/david1.txt](http://www.grafikdesigns.com/david1.txt)

thanks a ton.  
ter

---

<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 16, 2002, 12:51am UTC](https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613/10 "2002-12-16T00:51:30Z")

</div>

the second one would do it

Peace

---

<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 16, 2002, 1:34am UTC](https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613/11 "2002-12-16T01:34:01Z")

</div>

ummmm… I dont see the text file attached?

Peace

---

<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 16, 2002, 1:29pm UTC](https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613/12 "2002-12-16T13:29:17Z")

</div>

## Hey, I’m not sure why the txt file did not attach. I’ll just give you the david1.txt file here. It is as follows:

davidtext=Two friends influenced my life in music. The first was a longhaired, hippie art student who sat outside on steps and street corners playing the blues from his heart. This was a release that I had wanted and needed for years.  
The second friend, who influenced my life in more ways than one, was a mission trip leader, who made his own praise songs. The music he sang poured out of him so naturally and frequently that it was just a part of his personality.

I guess if I could honestly say what I am inspired by, it would be summed up in three words: encompassing, powerful, and sublime.  
Everything from art masterpieces, powerful bass notes, break dancing, or just people empowered by God have been an obsession in my life.

* * *

I appreciate it  
Ter:)

---

<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 16, 2002, 5:39pm UTC](https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613/13 "2002-12-16T17:39:40Z")

</div>

Hey ter…

The problem as I see it is that you are using HTML and Javascript tags ect.

You can HTML enable your textbox to accept html formatted text such as using bold tags, italics tags, font color tags, link tags, etc.

But what you are doing is including your javascript items for a pop up window, which should be included in between the head tags of the html page your movie is in.

So you can’t use Noscript tags, or table tags, or Script tags. Just font formatting tags.

To HTML enable your text box you can do this…

```auto
loadText = new loadVars();
loadText.load("bios/david1.txt");
//creating the loadVarsText function
loadText.onLoad = function() {
<B>scroller.html = true;</B>
scroller<B>.htmlText</B>= this.davidtext;
};

```

---

<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 16, 2002, 6:38pm UTC](https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613/14 "2002-12-16T18:38:54Z")

</div>

Thanks for your help. I HTML enabled the script and it works now. yeah!

🙂 🙂

---

<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 16, 2002, 6:39pm UTC](https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613/15 "2002-12-16T18:39:26Z")

</div>

No problem 🙂 Glad I could help.

---

<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 16, 2002, 7:25pm UTC](https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613/16 "2002-12-16T19:25:43Z")

</div>

whops… I just assumed you HTML enabled it and your server was addding some code flash didnt understand - jeez its always the little things I miss - infact today I found what was wrong with a PHP/Flash issue thats been bugging me for a few weeks… and I found it as I was posting the code for someone to review - there was nothing wrong with the code - EXCEPT that I was neglecting to call an entire function I wrote before submitting the vars!!! grrrrrrr:bad: - but I had to laugh. 😛 \<:}

Peace

---

<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 16, 2002, 7:38pm UTC](https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613/17 "2002-12-16T19:38:18Z")

</div>

hey I appreciate your help bro. I’m still learning the ropes of flash and its cool to get this kind of help.

I know this a dumb question, but what is the command for loading an swf into an swf upon entering a frame?

I use the following code on a button to load a movie but I forget the syntax to load a movie upon entering a frame.

on (release) {  
loadMovieNum(“photos.swf”, 1);

thanks  
Ter

---

<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 16, 2002, 7:43pm UTC](https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613/18 "2002-12-16T19:43:26Z")

</div>

Right click on the frame and choose “Actions” to open the Actions panel.

Add this…

loadMovieNum(“photos.swf”, 1);

Tah Dah 🙂 That is all there is to it.

Ryall: I know what you mean. I spent a week writing a function in Javascript and could not for the life of me figure out why the overall thing wasn’t working. Turns out, I spent all that time writing the function, but I forgot to call the function in the script…LOL! I felt stupid, but I couldn’t help but make fun of myself.

---

<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 16, 2002, 8:42pm UTC](https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613/19 "2002-12-16T20:42:51Z")

</div>

OMG adding the call to the function didnt fix it!!! I am STILL missing something - grrrrrrrrrrrrrrr this is driving me nuts! esp since it is soooooo basic - maybe I’ll post my code again ina new thread :sigh:

Sheesh

Peace

---

<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 16, 2002, 8:45pm UTC](https://forum.kirupa.com/t/flash-geniuses-unwanted-code-appears-in-my-text-field/9613/20 "2002-12-16T20:45:10Z")

</div>

If it is PHP and Flash, h88 should be able to help no problem.

I don’t work serverside Flash so I have no clue.
