2 Replies Latest reply on Dec 23, 2008 10:00 AM by hoppe11

    CSS in Flash

    hoppe11
      Hi

      I have two questions about using CSS in Flash

      First I want to put a class from my imported stylesheet on a input field. In my example I want to put 'input' onto the input field.

      Second I can't get my hyperlinks to work. The <b> works just fine and the styles on <a> does to, but the link is not "click-able" and the cursor doesn't turn into a hand.

      What do I do wrong?

      import TextField.StyleSheet;

      var css = new StyleSheet();
      css.load('req/styles_swf.css');
      css.onLoad = function()
      {
      // 1. question
      var txt = mc.createTextField('txt', _root.getNextHighestDepth(), 20, 50, 200, 17);
      txt.setNewTextFormat(css._css.input);
      txt.type = 'input';

      // 2. question
      var txt2 = _root.createTextField('txt2', _root.getNextHighestDepth(), 20,20,0,0);
      txt2.autoSize = true;
      txt2.styleSheet = css;
      txt2.htmlText = 'text <b>bold</b> <a href=" http://www.mylink.com">link</a>';
      }

      req/styles_swf.css
      --------------------------
      p {
      font-family:tahoma;
      font-size:11px;
      color:#333333;
      }

      a {
      color:#ff0000;
      text-decoration:underline;
      }

      input {
      font-family:tahoma;
      font-size:11px;
      color:#333333;
      }