ActionScript 2.0 :: Disable Some HTML In HtmlText?

Mar 15, 2010

In an application I'm writing, there's a chat section. Whenever anyone says something I show their name in bold, and a picture using an img tag, so therefore I make my chat area a dynamic text box with html enabled. However, this means anyone in the chat can start typing html tags all over the place and I do not want this to happen.

Is there a way I can encode a string to html entities so that I can prevent this sort of thing happening?

View 1 Replies


Similar Posts:


ActionScript 3.0 :: Disable Scrolling Of Text Field With HtmlText?

Oct 23, 2009

I thin the fastest way to explain the problem is to show the [code]...

So that is my AS code and it all works fine except when you move your mouse over that text field and scroll the wheel the text in the text field scrolls one line. And i really cant have that, it all works fine if there is no changing of font size but i will also need to change that so is there a solution just to disable scrolling on text field?

View 1 Replies

Html :: Import Flex RTE HtmlText To TLF TextFlow?

Jan 5, 2011

I am working as a developer on a Flex/Air application and we are using the buggy Flex RTE (RichTextEditor) to let the user manage his notes. At the moment I am trying to evaluate how costly it would be for us to build a new text component using the TLF (Text Layout Framework).Really important is the question if we can import the HTML text, produced by the RTE straight away. I know that there are some limitations regarding lists with TLF 1.1, but does it work in general?

I have just tried to grab some HTML formatted text from RTE like:

[Code]...

View 1 Replies

Html :: Remove Font Tags From HtmlText?

Jan 16, 2012

I'd like to remove the font tags from the htmlText string produced by a TextField leaving the surrounding nodes and any bold etc tags within intact.

Example partial output of htmlText:

<P ALIGN="LEFT"><FONT FACE="ChampagneLimo" SIZE="18" COLOR="#000000" LETTERSPACING="0" KERNING="0">Lorem Ipsum</FONT></P>

My plan was to avoid trying anything with regex and create an XML object.

However if I create a new XML object containing a root node and then attempt to appendChild the htmlText string so that I have a valid XML object to manipulate I run into a problem with html entities, see example below:

<html>&lt;P ALIGN="LEFT"&gt;&lt;FONT FACE="...

How can the font tags be stripped from htmlText and how can I create a valid XML object from the htmlText string? My plan was to use the XML replace() method

View 1 Replies

ActionScript 2.0 :: Html Tags In HtmlText = Statement?

Mar 11, 2004

A friend is building a blog, with entries placed in a database, pulled out with php, and then passed to flash. It all goes well except for one thing...problems with html. She's using a tutorial from webmonkey and here's all the actionscript, as it originally was created:

Code:
//function to load external data using the loadVars() object
//l=name of loadVars object
//n=name of text field [code]....

the result: everything loaded in the .swf except the title of her entry over the entry itself. There is a bold html tag around that part, she removed it and voila! The title appeared. But now there's another html tag that starts off a line of code, and it's failing. Click on the entries, and nothing loads except the - between the date and title. Here is that section of code:

Code:
for (i=0; i<this.n; i++) {
n.htmlText += "<u><a href='asfunction:_root.loadArc,"+this["id"+i]+"'>"+this["title"+i]+" - "+this["date"+i]+"</a></u><br>";
}

She found that by hardcoding a variable defined by the loadArc function, which is pulled in as arcNum, the whole thing works...but of course, can only pull in one entry with the one id number she coded.She also has removed the <u> tags, but the <a href must obviously remain to make her entries clickable.why having html at the front of this statement in the for loop is causing the entire line to fail, and no variable to pass? It's an interesting stumper. To see this in action, here is the page: http:[url].... In that directory you can also find the .fla file and the php results from the database. Tester.html is her second flash movie, also in that directory and completely barebones, and she received the exact same results.

View 1 Replies

Flash :: Supported Html Tags In The HtmlText Parameter Of Components?

Feb 1, 2011

Am working on a flash component that is supposed to display some dynamic text which might include HTML formatting. This text is displayed in a label component (AS3), and i would want it to render correctly, like create a line break when <br> is inserted, but it doesn't!

So am wondering what the supported HTML tags in the label component, and in general all other flash components?

View 1 Replies

Actionscript :: Htmltext. Removing A Table Tag From Dynamic Html Text?

Dec 15, 2011

I am consuming XML which I have no control over. the XML has HTML in it which i am styling and displaying in a HTML text field. I want to remove all the html except the links.

Strip all HTML tags except links is not working for me.

does any one have any tips? regEx?

the following removes tables. var reTable:RegExp = /<tables+[^>]*>.*?</table>/s;

but now i realize i need to keep content that is the tables and I also need the links.

View 2 Replies

Flex :: Text Htmltext Missing Out/cutting The Full Html Text?

Feb 12, 2011

I am trying to implement htmlText for a text component as the returned string is in html format (with the html tags etc). If I put a text=.... i get the full text, but with the tags (which i want converted to html). So i use htmlText=.... and it formats it fine, but cuts half the text from the variable. The text im supposed to get back has tons of html tags, and maybe its cutting it somewhere because of the tag its not able to escape... How do i fix this?

View 1 Replies

Html :: Disable The Flash Menu?

Mar 23, 2011

how to disable the flash right click menu in the below code

<span style="width: 400px; height: 280px; position: relative; display: block; overflow: hidden; z-index: 2;" id="mObjCont0" class="MagicMagnifyPlusContainer"><span style="display: block; top: 0px; left: 0px; position: absolute; width: 400px; height: 280px; z-index: 200;">

[code].......

View 1 Replies

Flex :: Disable Eclipse Warning About Generated Html?

Jul 25, 2009

When developing Flex projects, Eclipse gives warnings about the default index.html file generated by Flex Builder. The file is in the 'target' folder (or "generated artifacts" folder. Yes, I'm also using Maven). Can I eliminate or disable this warning?The code which generates the warning is below, though I would definitely prefer not changing the html - as I say this is the template suggested by Adobe. Eclipse warns of "Undefined attribute name (xxx)" for scroll on the body tag, and most of the embed attributes.[code]

View 1 Replies

Disable Antialiasing For Text In HTML Components (Windows)?

Jan 30, 2010

I have an AIR application that uses the HTML component to display a significant portion of content (I set the html myself, it is not loaded remotely). The text displays normally on Mac (I think Mac antialiases all text by default). However, on windows, the text displays anti-aliased regardless of the OS settings. It ends up giving everything a red tint.

Ideally, I'd like to be able to control whether or not the text gets anti-aliased. Does anyone know if there's a way to to this in Flex / AIR?

View 1 Replies

Html :: Rendering HTML Text Containing Advanced HTML Tags Like <strong> - <em> - <span> And Advanced HTML Entities In Flex

Aug 4, 2011

I am designing a web application in Flex 4 and currently facing an issue rendering advanced HTML tags and entities in Flex 4. All I want to do is basically render an HTML text coming to me something like the one given below:-

[Code]....

View 3 Replies

ActionScript 2.0 :: Swf In An Html - Click On The Button In Aaa.html And Have The Action Occur In Bbb.html?

Sep 20, 2009

hopefully this is possible:

-1 large html (home.html) file houses 2 html files (aaa.html and bbb.html)
-aaa.html consists of 1 swf button
-bbb.html is empty

question: is it possible to click on the button in aaa.html and have the action occur in bbb.html? (for example, clicking the button in aaa.html will load a swf in bbb.html)

View 2 Replies

ActionScript 3.0 :: HtmlText <img> Tag?

Jan 12, 2011

if I use an <img src='images/pic.jpg' /> within a text box that is using classic text, dynamic text as its settings, it has been assigned "render text as html" and has been set to multiline, it works great, that is when my image is in the top of the text area. When I move the image to the end of the scrolling text, it makes my text block larger to accommodate the text instead of making it just scroll more.

View 2 Replies

ActionScript 3.0 :: Htmltext <img> Won't Appear?

Feb 29, 2012

context: flashplayer 9, in the same folder as the .fla I have an images folder and inside that the png I wish to display

For the life of me I can't get the img tag to work in a textfield Here is my code, what the bleep am I missing here!! (the other html tags seem to work but not image)

import flash.display.Sprite;
import flash.text.StyleSheet;
import flash.text.TextField;

[Code].....

View 2 Replies

IDE :: No Space After <p> In HtmlText?

Feb 3, 2009

I have been working with htmlText and everything is loading and appears fine with one minor exception. For some reason there is no space between paragraphs defined by the <p> tag. There will be a line break, but not the extra space between the paragraphs.

View 2 Replies

ActionScript 2.0 :: <br> In HtmlText?

Apr 26, 2011

I been doing more programming in other languages through the past two flash changes and am now using CS5 (and AS 2.0) for work. Tell me, why doesn't this work:

Code:
this.createTextField("test",1,100,100,500,500);
test.html = true;
test.htmlText = "Hi<br><br>Hi";
No breaks show up - it appears as "HiHi"
I've tried <br /> and <BR> etc. embedFonts && regular.

View 2 Replies

ActionScript 3.0 :: XML - HtmlText And CSS Formatting?

Nov 6, 2008

I (well, a rather angry client) found an oddity I would like to consider a bug in formatting htmlText coming fom XML's toString() method with css.

If somehow an empty tag ends up in XML like <h1></h1>, all of the following text in the field is formatted to the CSS defined props of h1. In the (simplified DocumentClass) code below I have an XML object which has an empty h1-tag after the first sentence of the first paragraph. Placing the XML it in the field renders the text following the empty tag as bold and with the fontsize set for h1.

Strangely, if the html source is initialized as a string and put straight in the textField (see commented code), all formatting is OK.

View 10 Replies

Layout Mess Up If Use Css In HtmlText?

Jul 2, 2009

layout mess up if use css in htmlText.ike if I do

<p><span style='display:inline;color:#6b97fe'>Tel:</span>1234567</p>
there would be a line break after </span>
OR

[code].....

View 2 Replies

ActionScript 3.0 :: GetCharBoundaries And HtmlText?

Jul 21, 2010

I am having an issue using getCharBoundaries() with htmlText.  In the following code, I am trying to get the location of <img> tags, so that I can then move the image to where the <img> tag in the text, rather than the image being placed on the next line.  getCharBoundaries returns an actual rectangle when I use plain text, but when it's htmlText, the function returns null (I put in a trace statement just to make sure of whether I was getting null or not).  I've read that getCharBoundaries() can be unpredictable; does anyone know of a workaround or why this might be happening? 

[Code]...

View 3 Replies

ActionScript 3.0 :: HtmlText: <img Src= From Library?

Feb 23, 2011

I have a htmlText Field, and I wanna embed a Movieclip from my library into the text.I've tried everything for about 5 hours, nothing worked, even though the Adobe Help stated that it's possible:src: Specifies the URL to an image or SWF file, or the linkage identifier  for a movie clip  symbol in the library. This attribute is required  all other attributes are optional. External files (JPEG, GIF, PNG,  and SWF files) do not show until they are downloaded completely.

View 9 Replies

Professional :: Specify Dynamic Url In HtmlText?

Apr 6, 2011

I am populating a dynamic text box with some information that comes from an xml.
 
//fill in the text
     infoBox.informationText.htmlText=
     "<font size='16' color='#FFFAF0'>"+calledMarkerIndex+[code]....
 
I am also placing an image in the text box which you can see from the url above.I would like this url to be dynamic just like the other variables that are filling in the text box calledMarkerIndex, calledMarkerDate, calledMarkerDescription.
 
I have another variable which specifies the url I'd like named calledMarkerContent. I've tried simply chaning the text piece for this but it does not work.
 
"<img src='calledMarkerContent'/>"+

 I feel like maybe I am just making a scripting error.  Or maybe I cannot use a dynamic variable in this place. 

View 1 Replies

Actionscript 3 :: Flash - CS4 <b> Tag In With HtmlText?

Mar 2, 2010

I have the following setup:wo textfields on the stage with Arial normal and Arial bold, both embedded. I then have another textfield which I am setting like so:tb.htmlText = "Test <b>Test</b>";For some reason, the bold text is not displaying as bold, but as regular weight. I have tried embedding the fonts in the library, using the [Embed] meta tag and even resorted to using CSS to force the fontFamily. Weirdly, I can use Font.enumurateFonts and see both fonts are embedded, but the textfield refused to use the bold version inside the < b > tags.I've been told this is a problem with Flash CS4 on a mac and that it will work on PC. I refuse to believe this is the case, however. Surely Adobe would have fixed this by now?

View 3 Replies

ActionScript 3.0 :: Using GetCharBoundaries() With HtmlText

Jul 21, 2010

I am having an issue using getCharBoundaries() with htmlText. In the following code, I am trying to get the location of <img> tags, so that I can then move the image to where the <img> tag in the text, rather than the image being placed on the next line. getCharBoundaries returns an actual rectangle when I use plain text, but when it's htmlText, the function returns null (I put in a trace statement just to make sure of whether I was getting null or not). I've read that getCharBoundaries() can be unpredictable; I've attached the code as a txt file. Update: Even if I try calling getCharBoundaries on a character a few positions before the img tag, so that it's an actual character and not markup, I still get a null value returned.

View 1 Replies

IDE :: HtmlText Leading And Kerning?

May 30, 2007

problem stated in my title. Attach is my code.

Code:
this.createTextField("myText",this.getNextHighestDepth(),23,72,300,400);
//bgPic._alpha = 25;
var titleS:TextFormat = new TextFormat();
titleS.font = "TradeGothic";

[Code]...

View 3 Replies

ActionScript 2.0 :: How To UNBREAK HtmlText

Mar 14, 2008

I am trying to create a menu with htmlText. That is, using a textField with several "html links" that call a function (<a href='asfunction:......).I have an array with the menu's options and I use a FOR loop to create each "html link".The problem is that I need the links in one line (at least until the maximum length of the textfield's line is reached..). I was doing this:content.htmlText += "<a href:asfunction...>..." ...but the line breaks. I tried to do:

content.htmlText = content.htmlText + "<a href:asfunction...>..." ...
but it does not work, either. And, if I do:
content.htmlText = content.text + "<a href:asfunction...>..." ...

[code].....

View 1 Replies

ActionScript 3.0 :: EmbedFonts And HtmlText?

Jun 4, 2009

I am reading some CDATA text from an XML file. This text has HTML tags in it.I want to place this text into a dynamically created textfield that has embedFonts set to true. However,when I set this to true, the html formatting doesn't work. Instead, I only see the text without any of the formating.

Now, when I comment out my embendFonts = true statement, the html formatting works, but I loose my linked, library font. (Since the font Futura is on my machine, it stil uses a jaggy (system?) version of it, I'm assuming this would be a problem on a different machine).Is it possible to use embedFonts with htmlText? Am I calling this stuff in the wrong order?

Code:
copyTformat.font = myFont.fontName;
copyTformat.size = 18;
var tf:TextField = new TextField();[code].....

View 4 Replies

ActionScript 3.0 :: Using Java In <mx:htmltext>?

Jun 10, 2009

Im my html webpage I'm using this code

Code:
<div id="example"></div>
Code:
<script type="text/javascript">
flashembed("example",

[code]....

and I wonder if i could still get this effect trough htmltext. or does it has to be done in another way

View 4 Replies

ActionScript 3.0 :: HtmlText And GetCharBoundaries?

Jul 21, 2010

I am having an issue using getCharBoundaries() with htmlText. In the following code, I am trying to get the location of <img> tags, so that I can then move the image to where the <img> tag in the text, rather than the image being placed on the next line. getCharBoundaries returns an actual rectangle when I use plain text, but when it's htmlText, the function returns null (I put in a trace statement just to make sure of whether I was getting null or not). I've read that getCharBoundaries() can be unpredictable; does anyone know of a workaround or why this might be happening?

Even if I try calling getCharBoundaries on a character a few positions before the img tag, so that it's an actual character and not markup, I still get a null value returned.

[Code]...

View 1 Replies

ActionScript 3.0 :: HtmlText Working In Cs3 But Not Cs5

Oct 8, 2010

I'm trying to use flashmo_225_bar_slider and the html description text works in flash cs3 but not cs5,

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved