tag:blogger.com,1999:blog-8545986298620350368.post8279546860238839869..comments2017-09-06T06:10:23.012-07:00Comments on Before I forget...: dynamic text field part I - letter spacingCraig Grummitthttp://www.blogger.com/profile/14325143883559624630noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-8545986298620350368.post-48376901435546208832009-06-26T18:26:48.854-07:002009-06-26T18:26:48.854-07:00ah. the plot thickens. I think you're right, t...ah. the plot thickens. I think you're right, to retain the styling in AS2 you have to set the TextFormat of a textfield after setting the text or htmlText property, which doesn't work with styling in htmlText.<br /><br />I think what you might want to have a look at is the StyleSheet class and the TextField.styleSheet property. The StyleSheet class has a letterSpacing property that you could use to retain the textField's letter-spacing.Craig Grummitthttps://www.blogger.com/profile/14325143883559624630noreply@blogger.comtag:blogger.com,1999:blog-8545986298620350368.post-13610750089882902322009-06-26T07:11:17.532-07:002009-06-26T07:11:17.532-07:00hi craig,
you're right, if you would do this ...hi craig,<br /><br />you're right, if you would do this in as3!!!<br /><br />the declaration defaultTextFormat doesn't exists in as2.<br /><br />the only solution - if you would call it as a solution - i found is to set the test.url = '' to the hole textfield!<br /><br />So, is there a real usable solution for html in as2?123https://www.blogger.com/profile/02910814883605166890noreply@blogger.comtag:blogger.com,1999:blog-8545986298620350368.post-60619082154458255222009-06-25T22:12:55.655-07:002009-06-25T22:12:55.655-07:00Yeah 123, i can see your problem.
Using setTextF...Yeah 123, i can see your problem. <br /><br />Using setTextFormat to set the textFormat of a textfield will replace any textformatting you applied to the textfield previously. this includes any textformatting created via htmltext, such as <b>bold</b>, <i>italic</i> or even <a rel="nofollow">anchor</a> tags. <br /><br />However, you can apply the textFormat object as a default to the textField, before setting the htmlText. You can do this like so:<br /><br />var fmt:TextFormat = test.getTextFormat();<br />test.defaultTextFormat=fmt;<br />test.htmlText="Click <a href='http://www.craiggrummitt.com'>here</a> for more information.";<br /><br />This way, the formatting applied by the htmlText property doesn't get overridden.Craig Grummitthttps://www.blogger.com/profile/14325143883559624630noreply@blogger.comtag:blogger.com,1999:blog-8545986298620350368.post-81802628105474403692009-06-23T10:14:40.863-07:002009-06-23T10:14:40.863-07:00is there a solution for htmlText with links?
This...is there a solution for htmlText with links?<br /><br />This solutions works great if you don't use html123https://www.blogger.com/profile/02910814883605166890noreply@blogger.comtag:blogger.com,1999:blog-8545986298620350368.post-5348544730056024942009-01-09T18:12:00.000-08:002009-01-09T18:12:00.000-08:00yeah thanks that hour of annoyance was pretty anno...yeah thanks that hour of annoyance was pretty annoying too! it hadn't occurred to me to log the letter spacing bug, but i have now, cheers.Craig Grummitthttps://www.blogger.com/profile/14325143883559624630noreply@blogger.comtag:blogger.com,1999:blog-8545986298620350368.post-79971337250895449872009-01-08T23:03:00.000-08:002009-01-08T23:03:00.000-08:00well spotted - you've just saved me an hour of ann...well spotted - you've just saved me an hour of annoyance. have you logged a bug with Adobe for this?Tryshttps://www.blogger.com/profile/11727863312194388040noreply@blogger.comtag:blogger.com,1999:blog-8545986298620350368.post-15948601475753566162008-12-09T22:41:00.000-08:002008-12-09T22:41:00.000-08:00yeah i don't think it's related to the source of t...yeah i don't think it's related to the source of the text. You need to set the TextFormat of your textfield AFTER setting the text of the textfield.<BR/><BR/>So swap the last two lines of your code and it should work.Craig Grummitthttps://www.blogger.com/profile/14325143883559624630noreply@blogger.comtag:blogger.com,1999:blog-8545986298620350368.post-90573196288931436652008-10-02T07:15:00.000-07:002008-10-02T07:15:00.000-07:00here is my code:// item properties assigned from X...here is my code:<BR/>// item properties assigned from XML<BR/> var fmt:TextFormat = cur_item.menu_txt.getTextFormat();<BR/> curr_node = node_xml.childNodes[i];<BR/> curr_item.action = curr_node.attributes.action;<BR/> curr_item.variables = curr_node.attributes.variables;<BR/> curr_item.menu_txt.setTextFormat(fmt);<BR/> curr_item.menu_txt.text = curr_node.attributes.name;webdesignclasseshttps://www.blogger.com/profile/03659576145650097376noreply@blogger.comtag:blogger.com,1999:blog-8545986298620350368.post-19046229838857702102008-10-02T07:12:00.000-07:002008-10-02T07:12:00.000-07:00I cant get this (letter spacing) to work with a dy...I cant get this (letter spacing) to work with a dynamic text field from an XML file -webdesignclasseshttps://www.blogger.com/profile/03659576145650097376noreply@blogger.com