2 Replies Latest reply on Apr 25, 2008 9:04 AM by jl2000

    CSS help

    Graphic Graeme
      Hello fellow flashers,

      I'm trying to figure out how to get CSS to work with and External txt. file. I have a text box and a Scrollbar component and everything is working with this Actionscript

      textFile = new LoadVars()
      textFile.onLoad = function ()
      {
      _root.scrollText.htmlText = this.content
      }
      textFile.load("content.txt");

      My question is, where do I insert my CSS? in flash? ANy help with this would be greatly appreciated.

      Cheers-
      Graeme
        • 1. Re: CSS help
          kglad Adobe Community Professional & MVP
          you need to create a style sheet (either in a plain ascii file), xml file or in flash. then you need to load the sytle sheet if it's external to flash and assign the styleSheet property of your textfield to this style sheet. then you can use the style tags in your htmlText.
          • 2. Re: CSS help
            jl2000 Level 1
            Graeme - Not being an expert - I've used this a lot and I think it will work pretty much as is if your css file is in the same folder as your content.txt (which I think should be named content.html if you are using "htmlText") . Put this code above yours.
            Good luck
            JL