AS3 XML Scrollbar Class with CSS

( February 4th, 2009 )

I was asked if it is possible to apply external CSS properties to the XML instead of applying the formatting within the XML document itself.

Flash offers limited support for CSS properties, but I have used as much as I can.

I have also embedded multiple styles of the font, so you are able to apply normal, bold and italic styles to the text field via the stylesheet.

If you want to add error handlers for the XML and CSS files, please have a look at my XML News Ticker code.

(This file will open in Flash CS3)
Get Source


5 Comments for “AS3 XML Scrollbar Class with CSS”

  1. Hi. Really nice and useful. I do need something more if you can help. Is there any possibility to embed custom font for it? I need specific fonts in my project that are very rare.

    Also, forgive me asking as I still haven’t tried that, but is it possible to use flash buttons and links? If not how I can modify it.

    Thanks.

  2. Hi Mantas

    You can embed any font. Try and follow what I have done in my file. It is important that you create a font object in your library and ‘Export for ActionScript’. Then use the code I have used in my file under ‘//Setup font object to embed’ to use the font.

    Using Flash buttons and links is possible but beyond the scope of the support I can provide here.

    Rowan

  3. Help! Problem…

    Why when i minimize my bowser and click at the scrollbar, that´s a bug and onde wrong drag just start. Se this bug in http://jponce.com.br/clientes/logo/

    Can you help me?

    Thanks!

  4. I resolve it…the right code for this problem is:

    _ruler.addEventListener(MouseEvent.MOUSE_DOWN, clickHandle); _ruler.addEventListener(MouseEvent.MOUSE_OUT, releaseHandle); this.addEventListener(Event.ENTER_FRAME, enterFrameHandle);

  5. damned,
    it’s a broken zip file…

Post your comment here:

« | »