Help - Search - Member List - Calendar
Full Version: Dynamic Text - HTML Formatting
WorkTheWeb Forums > Webmaster Resources > Macromedia Flash
Support our Sponsors!
GB
Greetings All

Quick Question, I want to load up HTML in my flash movie. I created a
Dynamic Text box with the instance name "parchment.Text" It is set,
Multiline, Selectable Text, and "Render text as HTML"

I then put on frame 1

myText = new LoadVars();
myText.onLoad = function (success) {
if (success) {
parchmentText.text = myText.varOne;
play();
} else {
trace ("Loading Error");
stop();
}
}
myText.load("home.txt");

in my text file located in the same directory named "home.txt" I have the
following statement
varOne="<TEXTFORMAT LEADING=2><p align=left><font size=8>Date: October 4th
2003<br>Time: 19:42 CST<br>This is very first test posting of the dynamic
text ability done in flash.</font>
</TEXTFORMAT>"

Here is my problem,

It loads the text, but it sure as heck isn't parsing HTML Code at -all-

I am getting what I just typed up there in my Dynamic Text Box.

I am running Flash 2004 Pro (Retail)

Thanks for any insight onto what I am blindly missing.
GB

parchmentText.htmltext = myText.varOne;

Aslo you don't need the quotes in the text file, and you should escape the '=' signs.

GB
Ok I figured it out, but thought I would post just incase anyone else was
wondering.

I changed the name of my instance to parchmentHTML just because it makes
more sense.

I changed my actionscript to this

parchmentHTML.html = true;
myHTML = new LoadVars();
myHTML.onLoad = function (success) {
if (success) {
parchmentText.htmlText = myHTML.varOne;
play();
} else {
trace ("Loading Error");
stop();
}
}
myHTML.load("home.html");

and changed my home.html file to this

varOne=<p align='left'><font size='8'>Date: October 4th 2003<br>Time: 19:42
CST</font><br><font size='12'>Welcome to the home of the Hero's of
Destiny<p>This is very first test posting of the dynamic text ability done
in flash.</font>

Now it works.

Have a good evening



"GB" <[Email Removed]> wrote in message
news:blnql9$g67$[Email Removed]...
QUOTE
Greetings All

Quick Question, I want to load up HTML in my flash movie.  I created a
Dynamic Text box with the instance name "parchment.Text"  It is set,
Multiline, Selectable Text, and "Render text as HTML"

I then put on frame 1

myText = new LoadVars();
myText.onLoad = function (success) {
if (success) {
parchmentText.text = myText.varOne;
play();
} else {
trace ("Loading Error");
stop();
}
}
myText.load("home.txt");

in my text file located in the same directory named "home.txt" I have the
following statement
varOne="<TEXTFORMAT LEADING=2><p align=left><font size=8>Date: October 4th
2003<br>Time: 19:42 CST<br>This is very first test posting of the dynamic
text ability done in flash.</font
</TEXTFORMAT>"

Here is my problem,

It loads the text, but it sure as heck isn't parsing HTML Code at -all-

I am getting what I just typed up there in my Dynamic Text Box.

I am running Flash 2004 Pro (Retail)

Thanks for any insight onto what I am blindly missing.
GB



GB
Change this

parchmentText.htmlText = myHTML.varOne;

to this

parchmentHTML.htmlText = myHTML.varOne;

Now it works =)




"GB" <[Email Removed]> wrote in message
news:blns2s$hgh$[Email Removed]...
QUOTE
Ok I figured it out, but thought I would post just incase anyone else was
wondering.

I changed the name of my instance to parchmentHTML just because it makes
more sense.

I changed my actionscript to this

parchmentHTML.html = true;
myHTML = new LoadVars();
myHTML.onLoad = function (success) {
if (success) {
parchmentText.htmlText = myHTML.varOne;
play();
} else {
trace ("Loading Error");
stop();
}
}
myHTML.load("home.html");

and changed my home.html file to this

varOne=<p align='left'><font size='8'>Date: October 4th 2003<br>Time:
19:42
CST</font><br><font size='12'>Welcome to the home of the Hero's of
Destiny<p>This is very first test posting of the dynamic text ability done
in flash.</font

Now it works.

Have a good evening



"GB" <[Email Removed]> wrote in message
news:blnql9$g67$[Email Removed]...
Greetings All

Quick Question, I want to load up HTML in my flash movie.  I created a
Dynamic Text box with the instance name "parchment.Text"  It is set,
Multiline, Selectable Text, and "Render text as HTML"

I then put on frame 1

myText = new LoadVars();
myText.onLoad = function (success) {
if (success) {
parchmentText.text = myText.varOne;
play();
} else {
trace ("Loading Error");
stop();
}
}
myText.load("home.txt");

in my text file located in the same directory named "home.txt" I have
the
following statement
varOne="<TEXTFORMAT LEADING=2><p align=left><font size=8>Date: October
4th
2003<br>Time: 19:42 CST<br>This is very first test posting of the
dynamic
text ability done in flash.</font
</TEXTFORMAT>"

Here is my problem,

It loads the text, but it sure as heck isn't parsing HTML Code at -all-

I am getting what I just typed up there in my Dynamic Text Box.

I am running Flash 2004 Pro (Retail)

Thanks for any insight onto what I am blindly missing.
GB






PHP Help | Linux Help | Web Hosting | Reseller Hosting | SSL Hosting
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2006 Invision Power Services, Inc.