# Inline css in flash? can it be done?

**URL:** <https://forum.kirupa.com/t/inline-css-in-flash-can-it-be-done/246610>\
**Category:** Uncategorized\
**Created:** [December 12, 2007, 7:14pm UTC](https://forum.kirupa.com/t/inline-css-in-flash-can-it-be-done/246610 "2007-12-12T19:14:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![janjan32](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/janjan32/32/2578_2.png) [@janjan32](https://forum.kirupa.com/u/janjan32)\
**Post date:** [December 12, 2007, 7:14pm UTC](https://forum.kirupa.com/t/inline-css-in-flash-can-it-be-done/246610/1 "2007-12-12T19:14:56Z")

</div>

Hi there I am working with a cms tool, and I can’t get my swf to find my external css file. Is there anyway I can embed the css in the swf without calling an external file?

This is what my action script looks like, and it works from my desktop, but everytime I bring the swf into the cms tool, it doesn’t work.

```auto
//Create a new style sheet object
var myCSS = new TextField.StyleSheet();

//Specify the location of the CSS file that you created earlier
var cssURL = "http://www.Pacificlife.com/life_insurance/lifeline_link/center.css";
//Hard code HTML text to display
exampleText = "<p class='title'>Material: Starters</p>";
exampleText += "<p class='links'><a href='http://www.pacificlife.com'>Self-Score Questionaire</a><BR>";
exampleText += "<a href='http://www.pacificlife.com'>Investor Profile</a></p>";

//Load CSS file
myCSS.load(cssURL);
//define onLoad handler
myCSS.onLoad = function(success) {
        if (success) {
                /* If the style sheet loaded without error,
                assign it to the text object, and assign the HTML text to the
                text field*/
                myText.styleSheet = myCSS;
                myText.text = exampleText; //this should be ".htmlText", 
                // but Flash seems to recognise that the textbox needs to display html anyway
        }
};

```

thanks for any advise.  
😃
