I have some HTML loaded from an XML document that includes web links (anchor tags). I am using a TextField object to display the text, and am plugging the XML data into the htmlText property of the TextField, and the text is rendering with HTML markup, links are working etc.
The problem I'm seeing is that a new line is created before and after the link, so html like this:
hello world <a href ="#">this is a link</a> and all of this should be on the same line.
is rendered like this (with specific attention paid to the new lines): Does anyone know of a way to prevent these new lines from appearing when using HTML links within a TextField?
I have a textfield on stage, and I gave it an instance name "iText". I even turrned on the "Render As HTML text" Icon and embeded the font that I used. Then in my actionscript on the keyframe I wrote:
when I preview this, nothing show inside the text field, this is mind boggling, and I'm yet to know what is wrong here. I use Flash 8 by the way. The really strange thing is that when I do:
iText.htmlText = "WORKS!!!!"
the text shows up, but just with no html format, since I removed the bold tags, so something is wrong along the lines of those tags or something else I am not aware of.
I have got a performance problem about TextField.htmlText +=msg.And I know thatTextField.appendText(msg) works better than TextField.text +=msg.So I wonder if there's some method better than TextField.htmlText +=msg?
just because i got no response i am putting this up once again.When i use htmlText in textFields, it does not render smooth. How can this be fixed ?Tried embedding fonts... but nothing seems to work.
I've got two questions; one about whether or not something is natively possible in Flash and another if there is a free or commercial component to fix the problem.I know CSS/HTML in textfields is one of the weak points of Flash, but I still would like to clear something up(couldn' find a definitive 'not possible'through google).I'm trying to display images from HTML/XML as block through CSS in a dynamic textField but can't seem to get it to work.I've tried too many variations to display one piece of code which fails, but it boils down to:
* I load XML in which headings, paragraphs and images(usually within a paragraph) are set.
* I load CSS (or generate with AS for that matter) which set's the properties of the various tags.
* Images always display inline even if just one single char fits beside it in the field. If nothing really fits beside the image,Flash still places text there which is then hidden from the reader. All attempts to have the image's display set to block fail. Also if I try through a surrounding p-tag.
I tried all from XML.ignoreWiitespace,TextField.condenseWhite, adding p-, and br-tags. It just won't work.If there really is no (why not?!) possibility to have it done natively, does anyone know of a solution (paid or free) done previously?
I need hand cursor to appear on roll over spark Label. I've tried useHandCursor + buttonMode properties, but no result. And is there anything like htmlText property for spark Label (I need underline)?
I have an odd predicament that I'm trying to wrap my head around. I have a textField, that is populated by data from an xml file. It contains simple line html line break tags, and when I use the htmlText option, it doesn't seem to recognize those tags, even though they don't show up when I view it online. Here is my code:
Code: //FLASHVARS CODE var varName:String; var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters; for (varName in paramObj) {
[Code]......
I can't figure out how to make it render properly. If I choose a dynamic text field already on the stage it works fine, but then the scrollbar doesn't work. I read that a TextField automatically uses a scrollbar when it gets too long. Can anyone suggest a possible work around for this? I feel the answer is staring me in the face and I just can't see it.
I have an odd predicament that I'm trying to wrap my head around. I have a textField, that is populated by data from an xml file. It contains simple line html line break tags, and when I use the htmlText option, it doesn't seem to recognize those tags, even though they don't show up when I view it online. Here is my code:
Code:
//FLASHVARS CODE var varName:String; var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
[code]...
I can't figure out how to make it render properly. If I choose a dynamic text field already on the stage it works fine, but then the scrollbar doesn't work. I read that a TextField automatically uses a scrollbar when it gets too long.
how could we remove auto tag adding by htmlText Property because when we apply htmlText for a textfield it automatically add <p> and <font> tag. In my project i am saving one textfield property <p align='right'> in server but when i am assigning this value from server its changing to <p align='left'>. So how could we remove this auto formatting by htmlText? As in [URL] link there is written also "When its htmlText property is traced, the output is the HTML-formatted String, with additional tags (such as <P> and <FONT>) automatically added by Flash Player." i want to remove this auto adding tag.
If i don't use any HTML tags, it displays fine. But if I add tags, such as <a> or <b>, etc... the text within the tags does not display. For example, if in the XML text i have:
<node>For more information, <a href=' http://www.link.com'>Click
Here</a> to see the information.When I run the flash move, it displays:For more informationto see the information.If i remove the <a> tags, it displays fine.
I'm trying to create hyperlinks within TextFields by using a combination of plain text and the getCharIndexAtPoint method of the TextField object.
I've got everything nailed down except for the handCursor. To solve this problem I decided to place the TextField within a Sprite container and have the MOUSE_MOVE event attached to the TextField signal to its parent [Sprite container] that it should modify its buttonMode, useHandCursor, and mouseChildren properties to allow the hand cursor to be displayed, which I'm happy to say does work.
Unfortunately when I set the mouseChildren to false and the buttonMode and useHandCursor to true. The TextField within the Sprite container stops tracking the mouse...which I understand why but was wondering if there's some other combination that would allow me to do what I need to do?
I have 3 embedded fonts in my library and I have given them a class name.Now I would like to use these fonts in HTML in a TextField object.How do I do this? I created a stylesheet and entered the font name, but it still picks it from my harddrive, because it doesn't work on other computers where the font is not installed.I have a font embedded named "Edo", and gave it the classname Edo.[code]
when i insert an image over xml into textfield with htmlText, it automatically makes some kind of padding left and above them image. Is there a way to get rid of that padding?
the second instruction just does not work, and the textarea scrolls to the beginning (as a consequence of the first assignment). Has anyone else run into this and have you come up with any workaround?
This only happens in AIR, not FP, and only with TextArea, not with a plain input text.
I am having a major issue with a textfield. I have a dynamic text field which receives html so its htmlText I cant use the regular textFormat as the overrides the bold tags in the html. So I need to use css. Minor complication I have to do inline css as I cant load external data due to the project specs. Not a problem I have done inline css pretty easy. But they want a non web safe font. Again no prob I can embed fonts via the library. The problem is getting the css to use the embed font from the library. I have tried adding the font as a object to my code and then in the css referencing it via myfont.fontName, as a string etc.. 5
HTMLText is displaying really strangely. I'm displaying a textField with htmlText provided through XML, and in this bulleted list it'll display the first line all on one line, keep going off the end of the textareas size (ie. not do multiline) until the last word of the bullet, then put that word at the start of the next line. And it'll put the last word on the next line no matter how long your bullet item is.
eg.
myField.htmlText = "<li>Seek the input of experts</li>;
Would output
'seek the input of
experts'
I've checked and this thread was similar however I've removed all my tweens to test and it hasn't had any effect.
what to do about this? I've tried these to no avail:
how do i get an ordered list using htmltext property of Text component? I tried using this: <ol><li>item</li><li>item</li></ol> but it rendered like an unordered list.
How to set inline style sheet to htmltext of textfield component as mentioned in the xml CDATA. At present , i am using textfield.htmlText propert , but i am not able to get the fontfamily as mentioned in the xml CDATA. The text is also not getting displayed in the correct format. The image is not coming in between the 2 question strings and its getting displayed at the bottom of the question while the 2 question strings("q text info", "with images also") are displayed as a single string. How to reformat the xml so that the image comes in between.
I need to know can we add image in TextArea through StyleableTextField htmlText because my app for device Tablet. (Not possible to use TextLayoutFramework) or Anyother possible to add image into any text component?
i'm making a small "add news" movie for a site in actionscript. When I insert an image in my textField, I can only move the cursor with my keys and not with my mouse anymore. I put the image always in front. I also have to click one time in my textfield, otherwise my text appears under my image. When I click it aligns to the right.
does anyone know in which places does a dynamic textfield wrap (or creates a new line that doesn't exist in the original string), and how to connect it to the proper position in it's htmlText?if it's characters like "", how would i find the place where this "" happened, in the original htmlText?
Is it possible to capture the image loading event like when the image is fully loaded and such when it is assigned to the htmlText of the textFiel???
I have a scrollPane that contains a textField which is loading an image via img tag where there is no scrollbars initially because the textField is not large enough in the beginning, but it is larger than the scrollPane after the image is fully loaded.. and I am trying to update the scrollPane once the image is fully loaded..
I need to add a new String property with accompanying getter/setter methods to a TextField. If I were able to use prototyping in AS3 I would do something like[code]...
I was trying to create these 17 textfields in a for loop. I ended up instanciating them manually and now I am trying to set some of their properties in a for loop. The problem is that when I trace them I just see [object textfield] but not the names. If I try to trace the ".name" I get instance 1, instance 2, etc. The real problem is when I try to set the "y" property I get an error "1010 A term is undefined and has no properties"
Code: var tf1:TextField = new TextField(); var tf2:TextField = new TextField(); var tf3:TextField = new TextField();