Search Results

Search found 38 results on 2 pages for 'htmltext'.

Page 1/2 | 1 2  | Next Page >

  • [AS3] htmlText not showing bold or italics font

    - by Conor
    So I have a MovieClip asset with a dynamic textfield sitting inside of it. I export my .fla as a .swc to use within Flash Builder 4, and create instances of the asset with code, populating the text dynamically from XML. My issue is that even though I have htmlText enabled, bold and italics tags don't appear to be working. I have a feeling it is because when I created the asset in Flash CS4, the text field makes you specify the font, and the subset of that to use (Regular, Bold, Oblique, etc). Is there any way to get the htmlText to render bold and italics tags properly without having to completely rethink the way I'm creating all these fields?

    Read the article

  • Flash AS3 and XML: way to fix line breaks in htmlText that uses <b> tags in the xml?

    - by HeroicNate
    I'm importing text in from an xml file and i'm using htmlText to try to keep some styling with tags. I have both the regular and bold face font embedded, and the bolding works fine. The problem is that it ads spaces around the words in bold like a paragraph indent and then makes a line-break after them. What's going on, is there a way to fix? fromxmlText.htmlText = theXML.contenttext; If I pull the text in from a txt file it will work fine, but taking it out of an xml file causing funky formatting. lil' help?

    Read the article

  • How to do binding inside htmltext CDATA

    - by Hichem
    I couldn't find a way to bind a variable inside the htmlText property of a Text component i want to be able to do something like this : <mx:Text id="bodyText" styleName="bodyText"> <mx:htmlText > <![CDATA[<img src='assets.OrangeRect' align='left' hspace='0' vspace='4'/> Bonjour {UserData.name} ]]> </mx:htmlText> </mx:Text> i want to bind UserData.name

    Read the article

  • htmltext of TextArea in Flex 3 disappears when embedding fonts!

    - by Ali Syed
    hello, I have textArea which gets the text through user input in runtime. User input comes through Richtexteditor so it is html I save the html text from Richtexteditor to textArea's htmltext property. everything seems to be fine! till I try to embed fonts!! (I need to embed fonts because I apply a fade effect to the TextArea.) With embedded fonts the text simply disappears! could you help me out here please! i am really desperate! Ali M Syed @font-face { src:local("Arial"); fontFamily: ArialEmbedded; } . . . body.setStyle("fontFamily", "ArialEmbedded"); body is TextArea

    Read the article

  • How can I reference only a portion of a TextArea's htmlText block?

    - by Charles Shoults
    I have a number of very poor-quality pdf documents that look like 80's photocopies, which I'm rebuilding in Flash (Flex Builder 3 MXML application), representing paragraphs of text in TextAreas so that selected portions can be bold or italic, or whatever I need. I need a way to apply toolTips or event listeners to individual words within the block of text to link those words to a glossary. I'm perfectly happy to create a definition panel that is populated and made visible with a mouseOver, but don't know how to do it to just a portion of the text. Is there a good / clean / easy way to do this?

    Read the article

  • Flash CS4 <b> tag in with htmlText

    - by Hanpan
    Wow, this one is really weird. I have the following setup: Two 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? Any help would be appreciated.

    Read the article

  • Is there a negative for Courier new font?

    - by Biroka
    I want to make a text highlight in flex textArea but its htmlText doesn't support <font bgcolor='#FFFF00'> part of my text </font> so I'm searching for a font witch is the opposite of Courier new, when I embed it in flash, and write with that color I get this effect part of my text , as I type <font family="negativeOfCourier" color='#FFFF00'> part of my text </font>

    Read the article

  • Asp.net Crawler Webresponse Operation Timed out.

    - by Leon
    Hi I have built a simple threadpool based web crawler within my web application. Its job is to crawl its own application space and build a Lucene index of every valid web page and their meta content. Here's the problem. When I run the crawler from a debug server instance of Visual Studio Express, and provide the starting instance as the IIS url, it works fine. However, when I do not provide the IIS instance and it takes its own url to start the crawl process(ie. crawling its own domain space), I get hit by operation timed out exception on the Webresponse statement. Could someone please guide me into what I should or should not be doing here? Here is my code for fetching the page. It is executed in the multithreaded environment. private static string GetWebText(string url) { string htmlText = ""; HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(url); request.UserAgent = "My Crawler"; using (WebResponse response = request.GetResponse()) { using (Stream stream = response.GetResponseStream()) { using (StreamReader reader = new StreamReader(stream)) { htmlText = reader.ReadToEnd(); } } } return htmlText; } And the following is my stacktrace: at System.Net.HttpWebRequest.GetResponse() at CSharpCrawler.Crawler.GetWebText(String url) in c:\myAppDev\myApp\site\App_Code\CrawlerLibs\Crawler.cs:line 366 at CSharpCrawler.Crawler.CrawlPage(String url, List1 threadCityList) in c:\myAppDev\myApp\site\App_Code\CrawlerLibs\Crawler.cs:line 105 at CSharpCrawler.Crawler.CrawlSiteBuildIndex(String hostUrl, String urlToBeginSearchFrom, List1 threadCityList) in c:\myAppDev\myApp\site\App_Code\CrawlerLibs\Crawler.cs:line 89 at crawler_Default.threadedCrawlSiteBuildIndex(Object threadedCrawlerObj) in c:\myAppDev\myApp\site\crawler\Default.aspx.cs:line 108 at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state) at System.Threading.ExecutionContext.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() Thanks and cheers, Leon.

    Read the article

  • Sending multi-part email from Google App Engine using Spring's JavaMailSender fails

    - by hleinone
    It works without the multi-part (modified from the example in Spring documentation): final MimeMessagePreparator preparator = new MimeMessagePreparator() { public void prepare(final MimeMessage mimeMessage) throws Exception { final MimeMessageHelper message = new MimeMessageHelper( mimeMessage); message.setTo(toAddress); message.setFrom(fromAddress); message.setSubject(subject); final String htmlText = FreeMarkerTemplateUtils .processTemplateIntoString(configuration .getTemplate(htmlTemplate), model); message.setText(htmlText, true); } }; mailSender.send(preparator); But once I change it to: final MimeMessagePreparator preparator = new MimeMessagePreparator() { public void prepare(final MimeMessage mimeMessage) throws Exception { final MimeMessageHelper message = new MimeMessageHelper( mimeMessage, true); ... message.setText(plainText, htmlText); } }; mailSender.send(preparator); I get: Failed message 1: javax.mail.MessagingException: Converting attachment data failed at com.google.appengine.api.mail.stdimpl.GMTransport.sendMessage(GMTransport.java:231) at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:402) ... This is especially difficult since the GMTransport is proprietary Google class and no sources are available, which would make it a bit easier to debug. Anyone have any ideas what to try next? My bean config, for helping you to help me: <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl" p:username="${mail.username}" p:password="${mail.password}" p:protocol="gm" />

    Read the article

  • How do I get HTML Markup for createRange() in Firefox

    - by OneNerd
    I am currently using code similar to this: try { // IE ONLY var theElement = "myElementName"; window.frames[theElement].focus(); var selection = window.frames[theElement].document.selection.createRange(); alert ( selection.htmlText ); } catch(e) { var selection = window.frames[theElement].document.getSelection(); alert ( selection ); } As you can see, I am accessing a node from an iframe (no fun already). I am definitely in new territory here, so am sure there are more issues to arise, but right now, I am trying to get Firefox to give me the same result as IE. In IE, I can access the HTML code of the selection by using the (apparently IE-only) htmlText property of the object returned by createRange(). What I am looking for is the Firefox equivalent to that (or a function that I can use to give me the same result). Anyone know how to do this?

    Read the article

  • XmlException - inserting attribute gives "unexpected token" exception

    - by Anders Svensson
    Hi, I have an XmlDocument object in C# that I transform, using XslTransform, to html. In the stylesheet I insert an id attribute in a span tag, taking the id from an element in the XmlDocument. Here is the template for the element: <xsl:template match="word"> <span> <xsl:attribute name="id"><xsl:value-of select="@id"></xsl:value-of></xsl:attribute> <xsl:apply-templates/> </span> </xsl:template> But then I want to process the result document as an xhtml document (using the XmlDocument dom). So I'm taking a selected element in the html, creating a range out of it, and try to load the element using XmlLoad(): wordElem.LoadXml(range.htmlText); But this gives me the following exception: "'598' is an unexpected token. The expected token is '"' or '''. Line 1, position 10." And if I move the cursor over the range.htmlText, I see the tags for the element, and the "id" shows without quotes, which confuses me (i.e.SPAN id=598 instead of SPAN id="598"). To confuse the matter further, if I insert a blank space or something like that in the value of the id in the stylesheet, it works fine, i.e.: <span> <xsl:attribute name="id"><xsl:text> </xsl:text> <xsl:value-of select="@id"></xsl:value-of></xsl:attribute> <xsl:apply-templates/> </span> (Notice the whitespace in the xsl:text element). Now if I move the cursor over the range.htmlText, I see an id with quotes as usual in attributes (and as it shows if I open the html file in notepad or something). What is going on here? Why can't I insert an attribute this way and have a result that is acceptable as xhtml for XmlDocument to read? I feel I am missing something fundamental, but all this surprises me, since I do this sort of transformations using xsl:attribute to insert attributes all the time for other types of xsl transformations. Why doesn't XmlDocument accept this value? By the way, it doesn't matter if it is an id attribute. i have tried with the "class" attribute, "style" etc, and also using literal values such as "style" and setting the value to "color:red" and so on. The compiler always complains it is an unvalid token, and does not include quotes for the value unless there is a whitespace or something else in there (linebreaks etc.). I hope I have provided enough information. Any help will be greatly appreciated. Basically, what I want to accomplish is set an id in a span element in html, select a word in a webbrowser control with this document loaded, and get the id attribute out of the selected element. I've accomplished everything, and can actually do what I want, but only if I use regex e.g. to get the attribute value, and I want to be able to use XmlDocument instead to simply get the value out of the attribute directly. I'm sure I'm missing something simple, but if so please tell me. Regards, Anders

    Read the article

  • [SOLVED] flash 10, as3 - save text of textarea and reuse it to replace text in textarea

    - by user427969
    hi everyone Is it possible to save text of textarea (flash 10, as3, cs5) in some variable or so and with its textformat (more than one color) and then reuse it to replace text in textarea? I tried saving htmlText of textarea but the problem is when i replace it in textarea tags causes problem. There will always be another extra line. If anyone wants to view p tags problem try following. Just click on text and then move your down arrow key, cursor will go to next line. import fl.controls.TextArea; var txtHTML:TextArea = new TextArea(); txtHTML.move(0,0); var default_format:TextFormat = new TextFormat(); default_format.font = "Arial"; default_format.bold = false; default_format.align = "center"; default_format.color = 0xFFFF00; default_format.size = 14; var field:TextField = txtHTML.textField; field.defaultTextFormat = default_format; field.setTextFormat(default_format); field.alwaysShowSelection = true; field.background = true; field.type = 'input'; field.multiline = true; field.backgroundColor = 0x777777; field.embedFonts = true; txtHTML.htmlText = '<P ALIGN="CENTER"><FONT FACE="_sans" SIZE="14" COLOR="#FFFF00" LETTERSPACING="0" KERNING="0">ASDF</FONT></P>'; field.x = 0; field.y = 0; field.width = 400; field.height = 200; field.text = ""; addChild(txtHTML); Is there a way to do this? Thanks alot for any help. Regards

    Read the article

  • Font not showing bullet points

    - by Hanpan
    I have embedded my font using the embed meta tag, along which the entire range of Unicode characters... here is my CustomTextField class: [Embed(source='../assets/fonts/Arial.ttf',fontName='CustomFont',fontWeight='regular', unicodeRange='U+0020-U+0040,U+0041-U+005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E,U+0080-U+00FF,U+0100-U+017F,U+0400-U+04FF,U+0370-U+03FF,U+1E00-U+1EFF', mimeType='application/x-font-truetype' )] public static var MY_FONT:Class; [Embed(source='../assets/fonts/Arial Bold.ttf',fontName='CustomFont',fontWeight='bold', unicodeRange='U+0020-U+0040,U+0041-U+005A,U+005B-U+0060,U+0061-U+007A,U+007B-U+007E,U+0080-U+00FF,U+0100-U+017F,U+0400-U+04FF,U+0370-U+03FF,U+1E00-U+1EFF', mimeType='application/x-font-truetype' )] public static var MY_FONT_BOLD:Class; public static const DEFAULT_FONT:String = "CustomFont"; public static const DEFAULT_TEXT_COLOUR:int = 0x000000; public static const DEFAULT_TEXT_SIZE:int = 14; private var _tf:TextFormat = new TextFormat(DEFAULT_FONT, DEFAULT_TEXT_SIZE, DEFAULT_TEXT_COLOUR); public function CustomTextField():void { Font.registerFont(CustomTextField.MY_FONT); Font.registerFont(CustomTextField.MY_FONT_BOLD); _tf.size = 16; antiAliasType = AntiAliasType.ADVANCED; sharpness = 0; defaultTextFormat = _tf; autoSize = TextFieldAutoSize.LEFT; embedFonts = true; } public override function set htmlText(value:String):void { super.htmlText = value; setTextFormat(_tf); } For some reason, using tags intends the text perfectly, but I am not seeing any bullet points. The font is just standard Arial, so it isn't a case of the font missing the bullet character. Does anyone have any idea as to why Flex is not showing the bullet point characters?

    Read the article

  • Sending mail issues. very confusing

    - by Dejan.S
    Hi my name is what, my name is who.. ops got carried away Now this might be a serverfault question and a stackoverflow question but I will go with it here because I don't really know the answer. I been sending mail a lot with asp.net before and never had problems like this before. I have setup a mail with this following code var list = new List<string> { "mail", "mail", "mail", "mail" }; var smtp = new SmtpClient("localhost", 25); var plainText = txtPlain.Text; var htmlText = Server.HtmlDecode(FCKeditor1.Value); foreach (var email in list) { var message = new MailMessage() { From = new MailAddress("my server mail"), ReplyTo = new MailAddress("mail") }; var mailMessage = Server.HtmlDecode(FCKeditor1.Value); message.To.Add(email); message.Subject = "Hi Enzorit"; message.Body = mailMessage; message.IsBodyHtml = true; message.BodyEncoding = System.Text.Encoding.GetEncoding("iso-8859-2"); var alternateViewHtml = AlternateView.CreateAlternateViewFromString(htmlText, null, MediaTypeNames.Text.Html); var alternateViewPlainText = AlternateView.CreateAlternateViewFromString(plainText, null, MediaTypeNames.Text.Plain); message.AlternateViews.Add(alternateViewHtml); message.AlternateViews.Add(alternateViewPlainText); smtp.Send(message); } now the issue becomes that some email clients get just plain while some get the html. Like on my hotmail on the computer i get the html but on my iphone i get the plain one. Why is that? and like that wasn't enough The mail wont deliver to some mails like any .pl email. Now here is where I am thinking that it might be a reverse DNS setup thing on my windows server 2008 issue + some company mails, it becomes spam, i had same issue with hotmail but that was solved when I added the plain. Anybody have had the problem before? I am very thankful for any answer I get.. thanks

    Read the article

  • Python beautiful soup arguments

    - by scott
    Hi I have this code that fetches some text from a page using BeautifulSoup soup= BeautifulSoup(html) body = soup.find('div' , {'id':'body'}) print body I would like to make this as a reusable function that takes in some htmltext and the tags to match it like the following def parse(html, atrs): soup= BeautifulSoup(html) body = soup.find(atrs) return body But if i make a call like this parse(htmlpage, ('div' , {'id':'body'}")) or like parse(htmlpage, ['div' , {'id':'body'}"]) I get only the div element, the body attribute seems to get ignored. Is there a way to fix this?

    Read the article

  • Applying attribute to SVG using JS prompts 'this.textBox.style is undefined'. Why?

    - by Jack Roscoe
    Hi, I'm using the following code to draw an SVG text box, and then change its text anchor attribute to 'left' as it defaults to center and that's nasty. The text generates correctly, but when I add this second line I get the error 'this.textBox.style is undefined' in my error console. Here's my code: RenderTextBox:function() { // Render Text this.textBox = paper.text(this.x, this.y, this.htmlText); this.textBox.style.textAnchor="left"; } Any ideas?

    Read the article

  • I have problem loading all items from XML with for each

    - by vaha
    Hi all, I'm low level as3 programmer and I need help whit this code: I have gallery XML file: 1 0 Lokacije 1 1.jpg 2 2 Coaching 1 2.jpg 3 0 0 3.jpg And: var loader: URLLoader = new URLLoader(); loader.load(new URLRequest("gallery.xml"); var xml = new XML(evt.target.data); for each(var item in xml..item) { centralniText.htmlText = item.slika; } only shows last item from XML file: 3.jpg I want all. Please help.

    Read the article

  • How can I stop Flash from changing indent when user Clicks on hyperlink in TextField?

    - by Paul Chernoch
    I have a TextField which I initialize by setting htmlText. The text has anchor tags (hyperlinks). When a user clicks on the hyperlink, the indentation of the second and subsequent lines in the paragraph changes. Why? How do I stop it? My html has an image at the beginning of the line, followed by the tag, followed by more text. To style the hyper links to look blue always and underlined when the mouse is over them, I do this: var css:StyleSheet = new StyleSheet(); css.parseCSS("a {color: #0000FF;} a:hover {text-decoration: underline;}"); stepText.styleSheet = css; stepText.htmlText = textToUse; stepText.visible = true; Here is a fragment of the html text (with newlines and exrta whitespace added to improve readability - originally it was one long line): <textformat indent="-37" blockindent="37" > <img src="media/interface/level-1-bullets/solid-circle.png" align="left" hspace="8" vspace="1"/> American Dental Association. (n.d.). <i>Cleaning your teeth and gums (oral hygiene)</i>. Retrieved 11/24/08, from <a href="http://www.ada.org/public/topics/cleaning_faq.asp" target="_blank">http://www.ada.org/public/topics/cleaning_faq.asp </a> </textformat> <br/> As it turns out, the text field is of a width such that it wraps and the second line starts with "Retrieved 11/24/08". Clicking on the hyper link causes this particular line to be indented. Subsequent paragraphs are not affected. ASIDE: The image is a list bullet about 37 pixels wide. (I used images instead of li tags because Flash does not allow nested lists, so I faked it using a series of images with varying amounts of whitespace to simulate three levels of indentation.) IDEA: I was thinking of changing all hyperlinks to use "event:" as the URL protocol, which causes a TextEvent.LINK event to be triggered instead of following the link. Then I would have to open the browser in a second call. I could use this event handler to set the html text to itself, which might clear the problem. (When I switch pages in my application and then come back to the page, everything is OKAY again.) PROBLEM: If I use the "event:" protocol and user tries the right-mouse button click, they will get an error, or so I am told. (See http://www.blog.lessrain.com/as3-texteventlink-and-contextmenu-incompatibilities/ ) I do not like this trade-off.

    Read the article

  • underline line thickness always one pixel...

    - by Mark
    ...regardless of font size. Its an mx:Text object. (The Text object is actually being used as a mask so don't know if that's the problem.) If underline is set with the <u> tag in Text.htmlText, or Text.textField.setTextFormat, the underline thickness is always just one pixel which is not acceptable. (There are other problems with <u> so I'm limited to using setTextFormat currently.) Can the thickness of an underline be set through CSS? (textField.styleSheet, etc.) I may have another problem as I already use setTextFormat extensively, and the documentation says you can't use textField.setTextFormat if you use textField.setStyleSheet. I primarily need the underline to simulate correctly the look for an anchor tag.

    Read the article

  • Actionscript 3 and nested lists

    - by Hanpan
    Hi, I have the following code in my XML (EDIT:) which I am trying to show in a RichText using htmlText. <ul> <li>List Item 1 <ul> <li>List Item 2</li> </ul> </li> </ul> Unfortunately, Flash doesn't seem to support nested lists, and I am getting output which looks like this: List item 1 List item 2 Where I want the second ul to be indented further. Any ideas would be much appreciated! Cheers

    Read the article

  • Have a link that is imported in xml, clickable to execute a function

    - by Benjamin Sterling
    Ok, here's the question, I have an xml doc that is being import into an AS3 file and then with .htmlText, appending it to a movie clip. An example of what this looks like is: <abstract><![CDATA[<p><strong>AEO Times Square</strong> Store Wins Prestigious SEGD Merit Award for Dynamic Environments <a href='event:OpenArticle1'>View Article</a></p>]]></abstract> What I'd like to have happen is when I click that view article link that I can call a function passing in "OpenArticle1". Thanks in advance.

    Read the article

  • How can I extend a LinkButton to allow HTML text in Flex?

    - by John Isaacks
    I am feeding the label to my LinkButton directly from a string I receive from a Google API that puts html to format the label. I want to extend linkbutton to allow this. I wrote a class myself to allow html text for the label and that aspect of it works but now the background that appears when you hover is way too big. I tried to override measure() to fix this but I didn't have a clue how. Here is the class I wrote: package com.kranichs.components { import mx.controls.LinkButton; public class HTMLLinkButton extends LinkButton { protected var _isHTML:Boolean; public function HTMLLinkButton() { super(); } [Bindable] public function set isHTML(value:Boolean):void { _isHTML = value; } public function get isHTML():Boolean { return _isHTML; } override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); if(_isHTML) { textField.htmlText = label; } } } }

    Read the article

1 2  | Next Page >