This content has been marked as final.
Show 4 replies
-
1. Re: input text and stylesheets
ginoxl Apr 25, 2006 6:15 PM (in response to Steve.Gurasich)Pretty sure u can use a .as file as an 'include' sheet.... -
2. Re: input text and stylesheets
Newsgroup_User Apr 26, 2006 8:51 AM (in response to Steve.Gurasich)Steve.Gurasich wrote:
> Is it possible to attach a stylesheet to an input text field and have that text
> pick up the style? I have dynamically created my own text fields, and have
> succesfully attached a stylesheet and written htmltext to use the style, that's
> not a problem. But when the text field is an input text field, I can't just
> specify a "<span class='xxx'></span>" or something to use as the default class
> for the text field, right? The goal is to have the text that the user types in
> styled by the stylesheet. I tried naming the CSS class "body" (I was
> hopeful..) but alas, my hopes were dashed like a lemming on a rock.
>
> Anyway, any help would be .. helpful. Thanks.
>
Sure it's possible
http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context= LiveDocs_Parts&file=00001454.html
-Richard -
3. Re: input text and stylesheets
Steve.Gurasich Apr 26, 2006 11:34 AM (in response to Newsgroup_User)Thanks for the reply.
I understand how to apply CSS formatting to static or dynamic text, but what about input text? -
4. Re: input text and stylesheets
darrendb Aug 8, 2006 5:29 PM (in response to Steve.Gurasich)I've been having similar problems with Input fields and styleSheets. I found this in a book, which goes against other documentation but seems to hit the spot of acknowledging a problem (no solution, however...)
In the big red book, Macromedia Flash MX 2004 ActionScript 2.0 Dictionary by Macromedia Press, Chapter 8: Working with Text, Page 346:
When you assign a style sheet object to a TextField object, the following changes occur to the textfield's normal behavior:
• The textfields 'text' and 'htmlText' properties behave identically and always contain the same value
• The textfield becomes read-only and cannot be edited by the user
• The setTextFormat() and replaceSel() methods no longer function.
• Any text assigned to the textfield (either via .text or .htmlText property) is stored verbatim, and can be retrieved in the text's original form
This is a total kick in the head and contradicts the typical documentation statement that you can apply styleSheets to dynamic and input textfields.
I don't know the answers, but that seems to confirm our findings...
--
d