Formating / Aligning Text In A Textfield Without Html-tags?
The perfect solutions would be to use <table> tags and load an extern file to the textfield but since flash does not support the table tag but only a few html-tags how can you align "table content" in a flash textfield in a clever way?
Is the solution really to use multiple textfields - it will be a mess?
Thx in advance Tom
FlashKit > Flash Help > Flash MX
Posted on: 03-03-2003, 05:30 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Aligning Images With Text With Html Tags In Xml
I have a text box within flash that is pulling in xml. The xml is coded with html that inserts images before the text starts. The problem is the image is not properly aligned with the text. Is there anyway to make the image line up with the text better? Can someone help me out with this? Thanks.
p.s. The image need to be within the xml so it can be scrollable with the text.
MX2004PRO[AS2.0] Text Disappears In Html Textfield When <b></b> Tags Are Added
This definatly seems strange to me(because I have not yet figured it out) but when I add the tags <b></b> or <i></i> to a string that I'm putting into an html textfield, the text inbetween the tags disappear.
Code:
my_txt.html = true;
my_txt.multiline = true;
my_txt.htmlText = " <b>Bold Text</b><br>regular text<br>
the previous code would display a blank line, then regular text in the my_txt textfield.
Does anyone know what my problem is?
Formating A Textfield With HTML
Hi,
I'm trying to format a text field using HTML by changing the htmlText property. Nevertheless it doesn't seem to work as it thought it works, because Flash puts some html code in advance with the format set during the design time.
Before going any further, let me show you a part of the code that changes the text field:
ActionScript Code:
_viewMC.pageLinksMC.pageLinks.htmlText = "";
// changes the page numbers
for(var i = 1; i <= newTotalPages; i++){
// if processing the current page then make the number gray
if(i == newCurrentPage){
_viewMC.pageLinksMC.pageLinks.htmlText = "<font color='#AAAAAA'>";
}
// opens the link tag (a click on a number generates an onPageClick event)
_viewMC.pageLinksMC.pageLinks.htmlText += "<a href='asfunction:onPageClick," + i + "'>";
// adds the number to the string
_viewMC.pageLinksMC.pageLinks.htmlText += String(i);
// closes the link tag
_viewMC.pageLinksMC.pageLinks.htmlText += "</a>";
// closes the color tag
if(i == newCurrentPage){
_viewMC.pageLinksMC.pageLinks.htmlText += "</font>";
}
// if not the last page then put a comma next to the number
if (i < newTotalPages){
_viewMC.pageLinksMC.pageLinks.htmlText += ", ";
}
}// end for
trace("pageLinks is: " + _viewMC.pageLinksMC.pageLinks.htmlText);
The _viewMC.pageLinksMC.pageLinks refers to an actual TextField object on the stage (well, on the pageLinksMC movieclip, to be more accurate).
The result is on the final trace is:
<P ALIGN="CENTER"><FONT FACE="Arial" SIZE="10" COLOR="#323232" LETTERSPACING="0" KERNING="0">1, 2, 3, 4, 5, 6, 7, 8, 9, 10</FONT></P>
For some reason my html code is simply ignored. I was expecting that each number was wrapped on a <font> </font> tag set, but no, for some reason Flash is refusing those changes. The only HTML code that is on the field is really the format set during the design time (font, size, color, alignment, everything is according to the text field properties set in design time).
Do you have any idea why Flash isn't accepting my html code?
HTML Textfield Shows My Html Tags?
My html properties of my textfield are set on true and STILL he shows all my html tags? (property is set with actionscript AND in properties panel)
The XML with the html content looks like this:
====================================
<?xml version="1.0" encoding="utf-8" ?>
<texts>
<text><![CDATA[ <p>Vai kaut reizi esi</p>]]></text>
</texts>
====================================
Code:
var xmlTexts:XML = new XML();
xmlTexts.ignoreWhite = true;
xmlTexts.onLoad = function(ok) {
if (ok) {
var varText = this.firstChild.firstChild;
mvcText1.txt.html = true;
mvcText1.txt.htmlText = new String(varText);
//mvcText1.txt.htmlText = "<p> this is text </p><p> this is text </p><p> this is text </p>";;
trace("HTML set on "+mvcText1.txt.html);
}
};
xmlTexts.load("texts.xml");
<still Visible HTML-TAGS In Dynamic Textfield>
Here is the problem:
I have an external text in a dynamic textfield. That works fine.
I tried to put in some html-tags in the textfile, and in flash I pushed the button "Render text as html". WHY do I still see te html tags in my swf? Is it a bug or something else??
This is my code in the first frame of the scene:
mijnLoadVars = new LoadVars;
mijnLoadVars.load("tekstwho.txt");
mijnLoadVars.onLoad = function(success) {
if (success) {
tekstveldwho.text = this.tekstwho;
}
};
Do I have to add something ???
pfooh, I hope someone can help me out because I just dont't get it.
Thanks,
Maaike
<still Visible HTML-TAGS In Dynamic Textfield>
Here is the problem:
I have an external text in a dynamic textfield. That works fine.
I tried to put in some html-tags in the textfile, and in flash I pushed the button "Render text as html". WHY do I still see te html tags in my swf? Is it a bug or something else??
This is my code in the first frame of the scene:
mijnLoadVars = new LoadVars;
mijnLoadVars.load("tekstwho.txt");
mijnLoadVars.onLoad = function(success) {
if (success) {
tekstveldwho.text = this.tekstwho;
}
};
Do I have to add something ???
pfooh, I hope someone can help me out because I just dont't get it.
Thanks,
Maaike
Html P Tags Are Not Line Breaking In Textfield
hi- i am passing a string to a function that builds an HTML ready textfield...the string is passing just fine, but the only issue is the html p tags are not display in block (they are not line breaking);
Code:
var tHTML:String="<p class='g'>"+date+"</p><p class='g'>"+caption+"</p><p class='g'>"+description+"</p>";
and the textfield looks like this:
Code:
var tf:TextField= new TextField()
tf.selectable=false;
tf.embedFonts=true;
tf.styleSheet=this.pa.css;
tf.x=10
tf.y=10
tf.autoSize=TextFieldAutoSize.LEFT;
tf.width=mcc.width-10;
tf.height=mcc.height-10;
tf.name="tbox";
tf.htmlText=tHTML;
mcc.addChild(tf)
what am i missing here?
How To Strip Unessery Tags From Html Textfield Before Posting?
Right guys this is one that has crossed my path a few times. i never did get round to looking into how to do this.
If i want to set my dynamic text field to html it outputs the text as
Quote:
<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="12" COLOR="#000000">What you need to know about renting out your flat – the basics</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="12" COLOR="#000000"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="12" COLOR="#000000">As you can see from our site, there is a lot of information about renting out a flat to take on board and it can be difficult to know where to start. What basic information as a landlord about renting out a flat do you need to know?</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="12" COLOR="#000000"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="12" COLOR="#000000">First of all you need to decide what type of property you would like to rent out. There are three basic types of houses to let and the rent you can charge will be dependent on the type of property you go for. The types of property include:</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><LI><FONT FACE="Arial" SIZE="12" COLOR="#000000"></FONT></LI></TEXTFORMAT><TEXTFORMAT LEADING="2"><LI><FONT FACE="Arial" SIZE="12" COLOR="#000000"><B>Fully Furnished </B> – As the name suggest the property is rented out with the full range of furniture, including kitchen equipment </FONT></LI></TEXTFORMAT><TEXTFORMAT LEADING="2"><LI><FONT FACE="Arial" SIZE="12" COLOR="#000000"><B>Partly Furnished</B> – The property is rented out with the basic furniture (e.g. beds, sofas etc) </FONT></LI></TEXTFORMAT><TEXTFORMAT LEADING="2"><LI><FONT FACE="Arial" SIZE="12" COLOR="#000000"><B>Unfurnished</B> – The property is let with kitchen equipment, curtains and carpets </FONT></LI></TEXTFORMAT>
This is to be posted to a database. I feel that flash is adding a lot of unnecessary tags.
Some of the tags i do need like: <li><b><u><font face color="#0000FF">
The rest is unneed gunff.
Is there an easy way to strip it down before posting to the databse?
Cheers
Paul
HTML Formatting In Textfield - Tags Aren't Working
Hi!
I'm having a problem trying to format external text that loads into my dynamic text field.
Movie clip instance = mclip
Text field instance = textfield1
_root.mclip.textfield1.text = "<b>hello</b>";
//The bold tags just show up as part of the string
//And yes, my textfield has the "Render text as html" button pressed.
_root.mclip.textfield1.text = "<b>" + "hello" + "</b>";
//This doesn't work either
A variable targeted on the timeline of the moveclip works to format the text, but I don't know how to target a variable one level down.
Thanks,
M
Can TextField SelectionBeginIndex And SelectionEndIndex Recognise HTML Tags?
Hi
I have created a basic Word style toolbar for a Flash Movie which allows the user to change the selected font within a TextField. I have installed custom Superscript and Subscript fonts due to Adobe not including support for them (which is very annoying).
the problem is that the selectionBeginIndex function, which give you the starting position of the selected text, seems to ignore HTML tags which means my starting position is not correct. There are a bunch of html tags at the start of the textfield and more later on once the user starts formating the text.
So essentially I am looking for a way to get the starting position of the selected text which inlcludes the HTML tags.
Any help will be most appreciated.
Thanks
How To Strip Unessery Tags From Html Textfield Before Posting?
Right guys this is one that has crossed my path a few times. i never did get round to looking into how to do this.
If i want to set my dynamic text field to html it outputs the text as
Quote:
<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="12" COLOR="#000000">What you need to know about renting out your flat – the basics</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="12" COLOR="#000000"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="12" COLOR="#000000">As you can see from our site, there is a lot of information about renting out a flat to take on board and it can be difficult to know where to start. What basic information as a landlord about renting out a flat do you need to know?</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="12" COLOR="#000000"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Arial" SIZE="12" COLOR="#000000">First of all you need to decide what type of property you would like to rent out. There are three basic types of houses to let and the rent you can charge will be dependent on the type of property you go for. The types of property include:</FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><LI><FONT FACE="Arial" SIZE="12" COLOR="#000000"></FONT></LI></TEXTFORMAT><TEXTFORMAT LEADING="2"><LI><FONT FACE="Arial" SIZE="12" COLOR="#000000"><B>Fully Furnished </B> – As the name suggest the property is rented out with the full range of furniture, including kitchen equipment </FONT></LI></TEXTFORMAT><TEXTFORMAT LEADING="2"><LI><FONT FACE="Arial" SIZE="12" COLOR="#000000"><B>Partly Furnished</B> – The property is rented out with the basic furniture (e.g. beds, sofas etc) </FONT></LI></TEXTFORMAT><TEXTFORMAT LEADING="2"><LI><FONT FACE="Arial" SIZE="12" COLOR="#000000"><B>Unfurnished</B> – The property is let with kitchen equipment, curtains and carpets </FONT></LI></TEXTFORMAT>
This is to be posted to a database. I feel that flash is adding a lot of unnecessary tags.
Some of the tags i do need like: <li><b><u><font face color="#0000FF">
The rest is unneed gunff.
Is there an easy way to strip it down before posting to the databse?
Cheers
Paul
How To Make Kirupa's Dynamic Textfield Scrooler Read HTML Tags?
Whats up
You guys at Kirupa have a very nice Dynamic Textfield Scrooler available for download. I, trying to use, did have a little problem tough. I need to use HTML tags in my text and although I did toggle on the "Render text as HTML" button, it doesn't seem to make any difference
I attach the fla here for you to have a look!
Please help
How To Make Kirupa's Dynamic Textfield Scrooler Read HTML Tags?
Whats up
You guys at Kirupa have a very nice Dynamic Textfield Scrooler available for download. I, trying to use, did have a little problem tough. I need to use HTML tags in my text and although I did toggle on the "Render text as HTML" button, it doesn't seem to make any difference
I attach the fla here for you to have a look!
Please help
Formating Dynamic Text With HTML
Please respond, if you can help. I've been trying to figure this out on my own for several days now to no avail. I've made this post before on other forums and I haven't recieved a response. Perhaps it is because it is a common question and they are tired of answering it. Please point me in the general direction, I will figure out the rest. I would REALLY apprieciate ANY help .
Here is a short explaination of what I am attempting to do, and the first few steps I have taken to achieve this goal:
I have created a scrolling, dynamic text box within a movie clip. I would like to BOLD the headings within the dynamic text. I have used HTML within the TEXT FILE (not the text field). For example:
var7=<B>Subject Heading</B>
Question #1: Did I apply the HTML in the correct way? And is it o.k. to place the HTML tags in the TEXT FILE?
Should It look like this instead?:
var7.text.htmlText=<B>Subject Heading</B>
I then highlighted the TEXT FIELD in the movie clip and selected "render text as HTML" in the Properties Pane.
Next I attempted to embed "ArialBold" Font. But when I tried to export the Bold Font I ran into some difficulties. I selected Options>Linkage and in the Symbol Linkage Properties dialog box, I could not figure out which option to choose (Export for ActionScript, Export for runtime Sharing, Import for runtime Sharing).
The book I am using "ActionScript the definitive guide" by Colin Moock says to select "Export this Symbol". I am using MX and I belive this book predates MX. I'm assuming that I should choose "Export for runtime Sharing". But it requires a URL before Exporting. This file is for a C.D. that will not appear in a browser window. What should I do about the URL I am being asked to inclued before export? And do I also have to embed the normal Arial font in addition to the "ARIAL BOLD"?
When The .fla is exported it loads the text perfectly, the only problem is that the <B> and </B> appear within the text field as well.
What step am I missing or confusing? Thank you for responding to my post.
Formating HTML Text Within Flash5 Using AS
In Flash I created a textbox with text in it. The font is Verdana 10pts and it's formated to HTML.
1. What I want to do is first of all to apply an AS to the entire textbox and set the FONT FACE to "Verdana,arial" so in case the user doesn't have Verdana, Flash will automatically chose Arial as replacement font.
2. Is this possible and if not is there a way to make sure that in case type face is being replaced by default, that the original textbox is never pushed bigger than the indicated size???
So basically I want to be sure that the way I see the HTML text here, also other people will see it.
Thanks!
Formating Dynamic Text With HTML
PLease respond, if you can help. I've been trying to figure this out on my own for several days now to no avail. I've made this post before and I haven't recieved a response. Perhaps it is because it is a common question and you are tired of answering it. Please point me in the general direction, I will figure out the rest. I would REALLY apprieciate ANY help :( .
Here is a short explaination of what I am attempting to do, and the first few steps I have taken to achieve this goal:
I have created a scrolling, dynamic text box within a movie clip. I would like to BOLD the headings within the dynamic text. I have used HTML within the TEXT FILE (not the field). For example:
var7=<B>Subject Heading</B>
Question #1: Did I apply the HTML in the correct way? And is it o.k. to place the HTML tags in the TEXT FILE?
Should It look like this instead:
var7.text.htmlText=<B>Subject Heading </B>
I then highlighted the TEXT FIELD in the movie clip and selected "render text as HTML" in the Properties Pane.
Next I attempted to embed "ArialBold" Font. But when I tried to export the Bold Font I ran into some difficulties. I selected Options>Linkage and in the Symbol Linkage Properties dialog box, I could not figure out which option to choose (Export for ActionScript, Export for runtime Sharing, Import for runtime Sharing). The book I am using "ActionScript the definitive guide" by Colin Moock says to select "Export this Symbol". I am using MX and I belive this book predates MX. I'm assuming that I should choose "Export for runtime Sharing". But it requires a URL before Exporting. This file is for a C.D. that will not appear in a browser window. What should I do about the URL I am being asked to inclued before export? And do I also have to embed the normal Arial font in addition to the "ARIAL BOLD"?
When The .fla is exported it loads the text perfectly, the only problem is that the <B> and </B> appear within the text field as well.
What step am I missing or confusing? Thank you for responding to my post.
HTML Formating Text From Imported XML File
Can somebody explain, how can i edit (i mean HTML formating) text, which will be imported from XML file in the dynamic text field?
Please see my simle example file and give some info.
www.flashmedia.cz/flashkit/xml/20030406/menu.xml
Thanks Hans
Aligning HTML Text... How?
I know that macromedia says that flash text boxes that display HTML text supports the 'align' attribute, but I don't know exactly what that tag or whatever should look like.
I have tried:
<align="center">myText</align>
<center>myText</center>
<div align="center">myText</div>
but none work. How do I do this?
Thanks in advance!
Dynamic HTML Text Not Aligning
I posted this in the wrong category but am not sure how to delete the other one.
I've tried about a thousand variations of this and just can't get it to work.
I have an xml file that has text written with <[[CDATA tags because it contains some html tags for some hyper links.
What I'm trying to do is loop through these xml nodes and write the text content into a dynamic text field and have this right aligned.
Options I've tried so far:
1. Drawing the text box on the page, set as html and right align - NOT WORKING
2. Use AS to create TextField and set html =true, create a TextFormat, align to right, embed fonts etc - NOT WORKING
3. In my xml page I've inserted <p align=right> around the text - NOT DISPLAYING.
Please help me with this solution, I've got a deadline looming and its the one thing holding me back.
Oh and by the way, did I mention that the textbox is scrolling
Many thanks for your help
Mark
Rendering As Html AND Aligning Dynamic Text?
I just cant seem to get flash MX to render dynamic text as html AND have it align. Gone are the days (flash 5) when you set your text variable to html, and coded "div align='right'" or "a align='right'" tags in your html to align, or used "u" tags to underline, etc.
I understand that MX has incorporated MANY style functions for text, but I CANT get html and align working together ...
I have tried all manner of combinations of the textField = new TextFormat(); method, but to no avail, aswell as combinations of html settings, html code, and alignment settings.
I need to have text align right, then with a rollover comand, underline, then back to normal with a roll out (but always aligned right!). I have each working individually, but never together!
please help! please?
jamin.
[MX04] HTML Tags Needs To Be Disabled In Dynamic Html Enabled Text Fields
Hi Buddies,
Am loading some dynamic text from an xml which has html tags inside dat text. I jus loading dat specified texts into a dynamic text fields where html is enabled and assisgned as a htmlText instead of normal text.
It works fine, but the thing is, i want to disable certain html tags to be rendered but it shud display as it is as a normal texts.
Is there any way to do dat
Dont Want To Render < HTML > Tags In HTML Enabled Dyna Text
Hi All,
Is there any way to display < HTML > tags in the HTML enabled dynamic text field with out actually rendering it ? one constraint is, I want to enable the HTML feature for that text field all the time. because, i want to render some other tags.
The problem is in my text field unable to display msgs having <> characters i.e. even if I say < hello > it is not displaying anything, because, it is treating it as HTML tag and trying to render it. Is there any work around to display this text as it is ??
Thank all in adv,
Embedding Html In Xml Tags, When Rednering Text As Html
Quick question,
I have a site that reads all content from an external xml. The text box that reads this info renders the content as html; does anyone know how to go about putting an html tag in an xml tag so that flash can read it?
So would it be possible to do:
<content>
" Welcome to the site<br>we are happy to have you here<br><img src="logo.jpg"> "
</content>
HTML Text Tags
I'm using HTML text formatting with a Textfield.
At the moment the <u> underline tag works fine but the <b> bold tags don't work or the italics tag doesnt work either.
I read somewhere that a font with bold and italics needs to be "available".
I'm just using a textfield with Arial as the font - which is embeded.
How do I make the bold and italics work?
Putting Text Into Movie Using Dynamic Text And Html Tags?
If i declare a variable name for a text box in flash, then using action script fill in the variable using html tags does it follow all the same rules as straight html as if i were creating a page in notepad or does it need to be formated differently?
HTML Tags In A Dynamic Text Box...
According to flash, i can put HTML tags (HREF, Bold, etc...) in a text file that is being loaded into a movie, and have the html text formats work inside of the flash text box. I have checked the HTML box in the dynamic text popup, but when i add the html tags, the text within the tags disappears when the file is loaded into flash. what am i doing wrong?
How To Use HTML Tags In FLASH4 Text
I am using Flash4. I created a textfield and loaded a text file to it. Now, I would like to use some HTML tag for the text in order to jump to a web page, like <A HERF>tag.
I know there is such function for FLASH5, but I only have Flash 4.
Is it possible to create a like clicking a word on a textfield for FLASH4?
Please help me!
Text File With Html Tags?
Hi
here's quite a simple question:
I want to load a text file into a scrolling mc but with the top line of the text only in bold type.
I understand that it's possible to use a few of the basic html tags for formatting text using Flash 5 but when I click on the html option it either doesn't work or the whole text is in bold. Is there a way round this - an easier system maybe?
Does the html option work for all platforms and with Flash 5 and 6 players?
many thanks
HTML Tags In Dynamic Text
I pasted HTML code in to a dynamic text box in KoolMoves.
It only recognizes <A>.
Is there a way to get it to recognize all the other tags?
Text Files And Html Tags
I'm interested in importing text files into my flash movie, but I'd like to 'spruce them up' a bit. I've disovered that when you want to start a new paragraph, in your text file you cannot have spaces between the lines because if they do, when you export the swf the gaps between the paragraphs will be huge. What I'm interested in learning how to do is add bold or italicized text to my text files. Is there a tutorial or a link to a previous post that someone can offer to help me learn how to do this??
I'd really appreciate it, thanks for reading...
Dynamic Text Box And HTML Tags
Hi there!
I'm trying to show text in a dynamic text box, with HTML tags like b, font and so on. Problem is that font tags are recognized, but bold and italic ones just dissapear! What's happening with my bold and italic?? Does somebothy have similar problems or is it a Flash-Crash?
Thanks for your help,
Fery
Dynamic Text Box And HTML Tags
Hi there!
I'm trying to show text in a dynamic text box, with HTML tags like b, font and so on. Problem is that font tags are recognized, but bold and italic ones just dissapear! What's happening with my bold and italic?? Does somebothy have similar problems or is it a Flash-Crash?
Thanks for your help,
Fery
Dynamic Text Box And HTML Tags
Hi there!
I'm trying to show text in a dynamic text box, with HTML tags like b, font and so on. Problem is that font tags are recognized, but bold and italic ones just dissapear! What's happening with my bold and italic?? Does somebothy have similar problems or is it a Flash-Crash?
Thanks for your help,
Fery
Strip Html Tags From Text
I am working one a flash based text editor I have it generate html but it is generating [HTML]<p>[/HTML] tags and I want to replace them with [HTML]<br>[/HTML]. Unfortunetely it is more complicated then just <P> tag the tag looks like this.
[HTML]<P ALIGN="LEFT"><SPAN style="color: #000000;font-size: 12px;font-family: Arial;"></P>[/HTML]
I need that replaced with a <br> tag. it will also be surounded with other text but always the same. it is being puplished flash 6 AS 1.
I tried building a function based on this code]
Code:
var my_str:String = "P,A,T,S,Y";
var my_array:Array = my_str.split(",");
for (var i = 0; i<my_array.length; i++) {
trace(my_array[i]);
}
it is supposed to be sompatible with flash 6 as 1 but it seem to not work
I am at a loss any help will be great
Text In Movie HTML Tags
Does anyone know if search engines can pick up on the <!--text used in the movie--> content? I notice when I publish movies the generated HTML includes this tag and all the text in the movie. I want to know if the robots pic it up or not. If not there is no point having it.
Comments please
Html Tags In Dynamic Text
Hello Im using flash mx 2004:
Script im using
Code:
stop();
LoadVarsText = new LoadVars();
LoadVarsText.load("two.txt");
//assign a function which fires when the data is loaded:
LoadVarsText.onLoad = function(success) {
if (success) {
trace("done loading");
//Now that we know the data is loaded,
//set the text content of the Text Field
//with the instance name "scroller" equal to the
//contents of the variable
scroller.text = this.var1;
} else {
trace("not loaded");
}
};
The text loads fine and I have the "Render text as HTML" option selected however is not recognizing my tags. text that should look bold looks < b>bold</ b>
Any guesses ? Thanks in advance
Bill
Anchor Tags In HTML Text
Can I use anchor tags in an textField set to HTML, to trigger actionscript without it being treated as an external link (and navigating away from the page)?
Thanks
Use Html Tags, But Not From Text File
ok, i am trying to control the color of certain parts of a dynamic text field using html color tags, but i am not loading the text from a text file. i want to hard code the varible directly in flash.
for example:
ActionScript Code:
_root.item.varItemLgTitle="<font color="#ff0000">text 1</font><br><br><font color="#000000">text 2</font>";
i have the dynamic text field set to render html, and multiline. but it doesnt work. however it works when loaded from a text file. for this particular project... i need to hard code it into the swf though and not use external text file.
i am thinking it must be some url encodding issue or something...
oh yeah, and i have to export as flash 5, so i cant use and of the new mx font attributes.
HTML Tags In Dynamic Text
I am planning on building a website in flash with 90 percent of the site in dynamic text. Will flash read the html tags in a text file as text or html and code it as a browser would.
HTML Text Won't Render Tags In AS 3.0
I have some dynamic text that I need to put a subscript on. My text variable is:
textBody = "Look for the O<sub>3</sub> molecules."
But when it renders I get the tags and everything even though the Render text as HTML button is selected for the dynamic text box. I've also tried other tags and it ignores them too.
Removing Html Tags From RSS/XML Text
I have managed to get rid of unwanted line breaks and returns in the RSS text I am bringing in to populate my dynamic text fields. The Dynamic Text fields are set up not to render text as html, are multiline and have the fonts embedded. I keep seeing things like, <p style=""> at the beginning of the story or <THI.TO> in the middle of the story. Is there any way of deleting anything that appears as <anything> and replace with a space? Here is the code I am currently using to eliminate the line breaks. Also is there any way of turning hyphenation on? Forrest
Attach Code
var myvara:String = dtfaa.text;
dtfaa.text = myvara.split("
").join(" ");
dtfaa.text = dtfaa.text.split("
").join(" ");
dtfaa.text = dtfaa.text.split("").join(" ");
Formatting Xml Text With Html <tags>
I am calling text from an external .xml file, however I am running into some formatting problems,
every time I wrap a <tag> around the text, the <tag> itself shows up in the game
doesn't anyone have any links or resources I can use, I couldn't find anything out there
Html Tags For Dynamic Text?
I use a lot of dynamic text but I have no idea about html tags to make text bold or different sizes or colours.
can any post a help website or give me some pointers?
External Text With Html Tags? O_o
Hi, I am "trying" to load a text grom a *.txt file to my dynamic text filed with as3.0 everythink is fine but only the aligne and font color tags work... when I try to do bold or anythink It just dont work its strange.. any idea? I am seting multiline, html and wordWrap to true I am embeding the font.... my txt file is just a simple txt with tags in it ;/
HTML Tags In Imported Text Files
Hi, I've been testing out the HTML tags supported in Flash 5 and some only seem to work when Actionscripted from within Flash (i.e. not when used in imported files).
They are:
<
creates the less than sign <
>
creates the more than sign >
&
creates the ampersand &
"
creates speech marks “
'
creates an apostrophe ‘
I must be doing something wrong, right? I'm a bit confused by the whole concept of escape characters (/) so maybe this has something to do with it.
Cheers
Dan
Html Tags Showing In Text Field
myTextfield.html=1;
myTextfield.text="a<br>a";
shows:
a<br>a
I don't want to see <br> in there I just want it to breal row
how can I fix that?
HTML Tags Do Not Work In Dynamic Text
Got one small problem with Flash MX: I try loading rich formatted text into a dynamic text field from an external file. Text without any tags is diplayed properly, but tagged text (f.e. <b>like this</b>) just does not appear. HTML rendering is set in the object properties, so it should work, but ist doesn't. Anybody has an idea?
Parsing HTML Tags From Text File
I have a text file with a variable declared parsing out text within a paragraph element like so:
Code:
networkingText="<p> Networking in an interesting field if you are creative, driven, and eager to learn about the growing world of technology.</p>";
I set my text field to be dynamic, render as html and give it an instance name of networkingText_txt. The text loads fine in my action script layer but I can't get rid of the paragraph tags in my text box. In other words, the HTML tags are not parsing out correctly.
Am I missing something?? Any hints would be appreicated.
Using HTML Tags In A Dynamic Text Field
Sorry for having to ask this seemingly "frequently asked question" but I am never able to search for some reason. It doesn't work.
Anyways, I have a dynamic textfield that I've loaded an external .txt field into. My question is real simple: How do I make certain words bold with html? I'm a newbie...so please explain in idiot's terms.
Thank you all.
|