Actionscript 3 :: Get Tags From Text?
Mar 19, 2012How to trace out the tags with the hash (#Example #FOO #hello_world #foo-bar #2012) at the end of the text but not the ones within the text? [URL]...
View 3 RepliesHow to trace out the tags with the hash (#Example #FOO #hello_world #foo-bar #2012) at the end of the text but not the ones within the text? [URL]...
View 3 Repliesi am working in a flex application, i have an mx text control or I can use whatever control I need to do display the text value, but what I am trying to accomplish is to be able to format that text value with html 'before' it gets bound to the text control.<mx:Text text="{data.combinedCriteria}" width="99%">In the .as file that manipulates the combinedCriteria property of data,
View 1 RepliesI have HTML file, I changed its extension to .XML.I'd like to convert HTML tags to valid XML document using AS3.
View 6 RepliesI'm trying to get the text out of the content tags in the XML here. I have everything inside and including the feed tags stored in a variable, and it's working correctly. But when I try to make an XMLList for the entries, nothing transfers in.
View 1 RepliesI'm loading some info from an XML document. In the custom tags in the XML doc is text, this text gets loaded into flash and then populates a text field (so different XML elements being referenced, and then amalgamated into one text field)So I have...
Code:
_root.care.htmlText = "<b>Fabric</b><br />"+nFabric[0]+"<br /><br /><b>Features</b><br />"+nFeatures1[0]+"<br />"+nFeatures2[0]+"<br />"+nFeatures3[0]+"<br /><br /><b>Care
[code].....
My HTML tags are not working in a dynamic text box. Im guessing it is cause of the scrolling and maybe it dosn't see <br> so it dosn't allow them. This is the code i am using below.
TextField.prototype.maxviewable = function(){
if(this.maxscroll>1) return this.bottomScroll;
var b = (this.html) ? this.bottomScroll-1 : this.bottomScroll;
if (!this.length) this.text = ">>";
[Code].....
I made a scrollbar in action script §3 all from scratch and loaded an external text file edited in text Wrangler to display in the field, and sudden all my HTMl tags are not responding though added htmText to it. Well, the only tag responding is the link tag, the rest no, like bold, or italic or colors.
View 1 RepliesI 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?
View 2 RepliesI need to find all hash tags in this text using ActionScript 3 (AS3):
Lorem ipsum dolor #sit_amet, consetetur
sadipscing, sed #diam-nonumy
eirmod tempor #invidunt ut labore #et
What's a good method to do this?
i have an xml file .... i have imported it into flash mx 2004, tutorial i have even applied css properties to it ( i know thats prop easy for most of you guys but im happy ) my question is this ... i would like to rotate messages on some kind of timer ... ie xml file - ( im guessing at this point cos its worked so far ... )
<message>
<caption1>this is caption 1</caption1>
<caption2>this is caption 2</caption2>
<caption3>this is caption 3</caption3>
</message>
flash action script ... what i would like to achieve... the flash file to import the xml file into a dynamic text box which i have done, but at the moment it is showing all the captions in one go .. i would like to show.. caption1 .... wait X amount of time ( a variable in seconds ? - how would i do that ? ) a motion tween to get rid of the message ( not sure what yet but i understand the basic principles so will experiment and be creative ) caption2 .... etc.
We have invalid characters in text fields ie: <p> tags, when loading data from a local object (even though the text field is set to render as HTML) ?
Questions:
1) has anyone encountered this before?
2) know of a work around?
3) find/replace script we can run through the local object to replace the any <p> tags arising?
I am loading some text into a dynamic text field from an external text file using the methods described on kirupa's tutorials. I want to be able to bold some text, and make some other text links, using html...
I thought it might work if I just added the html tags to the text file, and the chose to render the dynamic text field as html..but the tags don't do anything, and are still read in as normal text.
there is a menu, and when i press a btn, it attaches a movieclip with some textfield in there. the text reads the xml tags, but doens show the css styles.i got this so far:
[AS]
//attach text holder
var Textos:MovieClip = RaizMC.attachMovie("holder Textos", "conteudos_mc", RaizMC.getNextHighestDepth())
//init TextArea
Textos.texto_txt.html = true;
[code]....
the css file is good, xml loaded correctely, everything seams ok, exept for my textfield. it simply doesnt read the <spam class"someStyle"></spam> i also did the <![CDATA[ ]] on the xml.
I'm trying to load text from an xml file with some html tags in it but its not working.
When I add <br/>
I get this error
Code:
TypeError: Error #1095: XML parser failure: Unterminated attribute.
at ProfileSammy/::xmlLoaded()
at
[Code].....
Using an FLV playback component, I am reading subtitles into a dynamic text box. I'm essentially using the same XML code seen here:URL]..Only problem is, the style tags aren't working for me. They do nothing, and the font style options selected on the stage in the FLA seem to override any style tags.
I'm wondering - does the text box need to be created in Action Script (as opposed to on the stage)? [FYI, I just tried this, this did not seem to work either]. What else could it be?
(Note that I can achieve styling through using CDATA tags, which makes matters more confusing to me. I'd prefer to use the timed text ones if they can work, as they are a little better for readability).
How to place two different texts (using html tags) in column in a datagrid, in which one will be right aligned and the other will be left aligned.
View 2 RepliesI got this text that I want to convert to uppercase...
the problem is that my server is linux, and files are case sensitive.. So I need to convert the text to UpperCase, except what's inside the html tags.
This prototype removes the HTML tags... instead removing the HTML, ingore the text to become upperCase?
Code:
String.prototype.removeHTML = function(){
var temp, i;
var xStr = this;
[Code]....
I'm loading dynamic text from a textfile with some HTML tags in it. When I load it up, everything comes up fine except for the fact that any <a> tags remain active until the next <a> tag comes up. So there will be a whole block of text with a hand cursor that links to the previous <a> tag.
View 3 RepliesIssue: dynamic textfield created at runtime with html text doesn't display bold and italics.
Having the Font symbol in my library with the linkage name "Avenir" :
[Code]...
The textfield totally ignores the bold html tag. The right font is displayed but the html tags are ignored. So if I want one text field to be able to dynamically display bold and italics (html text) using a Font Face in my library...how do I do it? What am I missing?
I'm trying to load text from an xml file with some html tags in it but its not working.
When I add <br/>
I get the error
Code:
TypeError: Error #1095: XML parser failure: Unterminated attribute.
at ProfileSammy/::xmlLoaded()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()
I got this text that I want to convert to uppercase...the problem is that my server is linux, and files are case sensitive..So I need to convert the text to UpperCase, except what's inside the html tags.This prototype removes the HTML tags... convert this to, instead removing the HTML, ingore the text to become upperCase?
Code:
String.prototype.removeHTML = function(){
var temp, i;
var xStr = this;
var total = xStr.length;
[code]....
i'm loading dynamic text from a textfile with some HTML tags in it. When I load it up, everything comes up fine except for the fact that any <a> tags remain active until the next <a> tag comes up. So there will be a whole block of text with a hand cursor that links to the previous <a> tag.
View 3 RepliesI have an input box with a variable name. When the user enters some text and presses a button that variable is sent to a php file using the GET method. Then the info is put into a database. When I checked my database, I found that a load of styling html tags has been included. I want for my input text box to have styled text, but I don't want that styling /html tags to be sent to the php file. I know I could use strip_tags in php to get rid of the html tags, but surely there's a way of not sending the tags at all, just the text content of my variable?
[Code]..
I am browsing for a solution for about 2 hours, but I did not find anything that would help. I have a dynamic text field, and I would like to format it, (to highlight the first 2 words in red, and the rest in italics). Usually I load external .txt files and I use HTML tags for formatting the text inside. But this time I have to do it internally.
View 10 RepliesI'm importing html with <strong> tags and using CSS to style my text however everything it runs into a closing </strong> tag it adds a line break for some odd reason and i was wondering if anyone knows a way to fix this?
View 1 RepliesI have a dynamic textfield on the stage which is rendered for HTML. Then I load the xml text in it, but the CDATA html tags are not working(it works on singleline, but not on multiline)
I tried setting wordWrap/html etc to true but nothing seem to work.
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 doesn't 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 embedded.
View 1 Repliesi am making an flash histroy the desc text shoud be accept the cadata Structures i tried to make this , i dont know where i am missing . i am getting the desc text in ( "filed") inside an mc called " nod" i am loading this mc from library plese check my code
stop();
left.useHandCursor = 0;
var gata:Boolean = true;
[code].....
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've been struggling with this problem for a while:I have a string containing HTML and I'm using a regular expression to get the characters between the tags. I'm then attempting to apply a TextFormat to those characters.The problem is that I'm using the TextField's "htmlText" property instead of it's "text" property (because I don't want the HTML tags to be visible). So, the character index that's returned from the regular expression is incorrect, when I apply the TextFormat.Here is some sample code which illustrates the problem:
var txt:String = "<b>Sample</b> string with bold text";
var tf:TextField = new TextField();
addChild(tf);
[code].....