htmltext

flash as3 xml cdata bold tags rendered in htmlText with an embedded font

夙愿已清 提交于 2020-01-17 01:22:11
问题 I'm just trying to get flash to render bold text in a dynamic text field with an embedded font, using data I've imported from an xml file using CDATA. Anyone know how to do this? XML File: <description><![CDATA[ FOR THE PAST TWO YEARS, <b>SUPERFAD</b> HAS WORKED CLOSELY WITH THE <b>MARTIN AGENCY</b> TO VISUALIZE THE ORIGINAL WORKS OF <b>SPORT CAMPAIGN</b>. THE CAMPAIGN SPOTLIGHTS THE EXTREME ATHLETES OF THE VARIOUS EVENTS AS ARTISTS IN THEIR OWN WORLD, USING THE TOOLS OF THEIR SPORT TO CREATE

ActionScript 3: maintaining textarea UIscrollbar position on loss of focus in flash embed

这一生的挚爱 提交于 2020-01-07 04:38:38
问题 I'm using Flash CS4. Everything functions as it should when CS4 previews the swf after compiling it. However, after embedding the flash item in a webpage, if the textArea loses focus within the flash piece, the textarea's built-in UIscrollbar resets to the very top. Here's the kicker: if I add a FOCUS_OUT event listener to the textArea to store the current scrollbar value, I find that the scrollbar value has been reset to minimum even before the FOCUS_OUT event is triggered! WTF? I think this

Flex: How to call an actionscript function from htmlText anchor

元气小坏坏 提交于 2020-01-02 08:39:08
问题 Is there any way to call an action script function from an anchor which defined in TextArea component's htmlText property. Thank you 回答1: If this anchor is an href from an tag, you can dispatch events and handle them like that: <mx:Script> <![CDATA[ private function linkHandler(e:TextEvent):void { if (e.text == "test") trace("test called") } ]]> </mx:Script> <mx:creationComplete> <![CDATA[ textArea.htmlText="<a href='event:test'>Link!</a>"; ]]> </mx:creationComplete> <mx:TextArea id="textArea

Change button text in Meteor with JS

狂风中的少年 提交于 2019-12-25 07:15:04
问题 My button on click show and hide div that contains comment section. Now I want to make him to change text on click. So, you click once and you can see comments but instead of 'Show comments' hes text now needs to be 'Hide comments'. I tried several solutions that I found on internet and a couple of solutions that were logic to me but it's not working. I tried this too but it says that SetSession is not defined. Template: <template name="PrikažiMe"> <button class="PrikažiKomentar"> {{текст}} <

displaying an image inline in TextArea.htmlText

雨燕双飞 提交于 2019-12-25 04:33:49
问题 I would like to display some smiley's inbetween text in my chatbox but when i add an image it gets displayed on a seperate line... Any ideas? <mx:TextArea id="myChat" width="271" height="238" backgroundColor="#ffffff" borderThickness="0" editable="false" enabled="true" horizontalScrollPolicy="off" wordWrap="true"> <mx:htmlText> <![CDATA[ <font size='14'> some text - </font><img src='images/emoticons/wink_smile.gif' height='15' width='15'/><font size='14'> more text</font> ]]> </mx:htmlText> <

Flash is ignoring my most of my tags in a HTML TextField

落爺英雄遲暮 提交于 2019-12-12 02:56:43
问题 I've been trying to figure out for a while now. I usually manage to make my textFields work properly, but this is just driving me nuts. I have this TextField that I inject HTML formatted text (contained in a XML file). For some reason, almost all my tags are ignored ( <b> , <i> , <u> , <ul> and <li> ). I can only get it to render <br /> tags properly. I could use a StyleSheet, but I don't think it would make my lists work... Here's how things are set up: Text I inject: <text> <![CDATA[<b>Some

How to “append” html text to text area in flex and flex mobile project to display sprite and text formatting

元气小坏坏 提交于 2019-12-08 07:06:24
问题 I'm playing around with a messaging type of application. Does anyone know how, or of any tutorials on to "appending" html text to text areas in flex and flex mobile projects? And specifically how I could take that and basically "append" a sprite inline to the text when i need to? Something simple like: Username: some text right here! So, Anyone have any experience "appending" sprites or simple text formatting? Thanks I'm realy stumped on how to solve these issues! EDIT: Based on an answer

Flex: How to call an actionscript function from htmlText anchor

烂漫一生 提交于 2019-12-05 19:50:33
Is there any way to call an action script function from an anchor which defined in TextArea component's htmlText property. Thank you If this anchor is an href from an tag, you can dispatch events and handle them like that: <mx:Script> <![CDATA[ private function linkHandler(e:TextEvent):void { if (e.text == "test") trace("test called") } ]]> </mx:Script> <mx:creationComplete> <![CDATA[ textArea.htmlText="<a href='event:test'>Link!</a>"; ]]> </mx:creationComplete> <mx:TextArea id="textArea" link="linkHandler(event)" /> i got the answer here .. The ExternalInterface class will provide you with a

tinyMCE to AS3 htmlText

丶灬走出姿态 提交于 2019-12-04 20:21:45
I'm using tinyMCE to edit/markup text in a Zend Framework backend. I'd like to use the generated HTML in a Flash AS3 Application. The problem is that Flash doesn't support attributes in <span> 's, <em> tags, <strong> tags etc. I guess there are two possibilities here: change the tinyMCE config so it uses font-tags instead of span's, <b> instead of <strong> ,... Replace all the HTML-tags in Flash with Regex. Any help would be welcome. so this is the original html generated by tinyMCE: <span style="color:#FF0000; font-size:24;">text, and <strong>bold text</strong></span> And this is what I need

How to center the text in a JLabel?

。_饼干妹妹 提交于 2019-12-03 08:14:29
问题 despite many tries I can't get the result that I would like to see - text centered within the JLabel and the JLabel somewhat centered in the BorderLayout. I said "somewhat" because there should be also another label "status" in the bottom-right corner of the window. Here the bit of code responsible for that: setLayout(new BorderLayout()); JPanel area = new JPanel(); JLabel text = new JLabel( "<html>In early March, the city of Topeka," + " Kansas,<br>temporarily changed its name to Google..."