External CSS
External css as it applies to dynamic text does have limitations Some of those limitations include:
- javascript actions such as On rollover events in js.
- Borders
- divs and tables
- text is always set to wrap which can cause formatting issues when dealing with images linked to in the content.
An easy way to overcome text wrap surrounding images is by usage of multiple <br.> tags <p> while it can be deployed via CreateTextfield + css does not handle in the same manner as it would standard css/html markup. All these things taken into account the gains of applying css to a Created textfield still offers more then can be achieved via conventional dynamic text methods.
Your .css file should be limited to the css which is pertainent to your text. Here is a typical example of a css file.
p { color: #000000; font-family: Arial,Helvetica,sans-serif; font-size: 12px; display: inline; } a:link { a:hover{ .headline { .byline { |
A .css file can be created in any flat file editor such as notepad and needs to be saved with the .css extenion it provides external information on how
the text is to be formated. Tags in your html content refer back to the css element which defines the properties od the text to be presented.
Createtextfield
CreateTextfield is a method first used in swf6 that has been enhanced in 7 and 8 originally one could only use internal css with createtextfield. the internal css was not as practical as external
it had several limitiations. swf 7 was the first time loadcss() became fully implimented. It simplfied css for those whom had familairity with conventional css as well as before we delve to far into loadcss
llets explore createtextfield a little more fully.
onFrame (2) { createTextField(“myText”, 1, 250, 110, 360, 400); myText.type = “dynamic”; myText.autoSize = “left”; myText.multiline = true; myText.wordWrap = true; myText.html = true; myText.selectable = true; myText wordWrap = true; myText.condenseWhite = false //Hard code some HTML text to display (for example purposes) MyContent =”Click on This is Cool”; //Create a new style sheet object ; |
Thanks http://www.swishzone.com/index.php?area=resources&tab=tutorials&do=page&action=detailed&link_id=187