2 Replies Latest reply on May 13, 2008 10:57 PM by VanessaR14

    What is the deal with HTML tags in Flash?

    VanessaR14 Level 1
      Hello there.

      I have been able to import an HTML file into Flash by creating a textfield and having the HTML load into it, but it will only recognize my <b> and <p> tags, not any <a> (link) tags.

      My code works just fine when I preview it in dreamweaver as an HTML page alone. But when it is in Flash, the word "maintenance" is not clickable. <a href="maintenance.html">maintenance</a> is the code I'm using.

      Any suggestions? Do <a> tags work when imported to Flash?

      Thanks in advance,

      ~Vanessa
        • 1. What is the deal with HTML tags in Flash?
          Heffalompen Level 1
          This is a quote from the help files:
          ___________________________________
          About supported HTML tags
          This section lists the built-in HTML tags that Flash Player supports. You can also create new styles and tags by using CSS; see Formatting text with Cascading Style Sheet styles.

          Anchor tag
          Bold tag
          Break tag
          Font tag
          Image tag
          Italic tag
          List item tag
          Paragraph tag
          Span tag
          Text format tag
          Underline tag

          ______________________________________
          Search "HTML" and "support" in the help files. The "a" tag is there so it should work.
          Remember to set your textfield to render the text as html.

          Hope that helps :)
          • 2. Re: What is the deal with HTML tags in Flash?
            VanessaR14 Level 1
            Hi, thanks for your reply but I'm still having trouble. I've attached the codes- maybe you can give me a hand with it?

            Hi, here is my ActionScript code:

            function addArticle(sLinkage:String):Void{
            if(oOpenedArticle[sLinkage]!=undefined) {
            oOpenedArticle[sLinkage].swapDepths(nTopDepth);
            return;

            }
            }

            function loadArticle():Void {
            var nWidth:Number = mcDisplayBackground2._width;
            var nHeight:Number = mcDisplayBackground2._height;
            var nX:Number = mcDisplayBackground2._x;
            var nY:Number = mcDisplayBackground2._y;
            this.createTextField("tArticle", this.getNextHighestDepth(), nX, nY, nWidth, nHeight);
            tArticle.multiline = true;
            tArticle.wordWrap = true;
            tArticle.textColor = 0x000000;
            tArticle.html = true;
            tArticle.condenseWhite = true;

            }



            function loadData():Void {
            var lvArticleContent:LoadVars = new LoadVars();
            lvArticleContent.onData = function(sHTMLData:String):Void {
            tArticle.htmlText = sHTMLData;
            };
            var cssStyles:TextField.StyleSheet = new TextField.StyleSheet();
            cssStyles.onLoad = function():Void {
            tArticle.styleSheet = this;
            lvArticleContent.load("about.html");
            };
            cssStyles.load("aof.css");
            }



            var nTopDepth:Number;
            var oOpenedArticle:Object = new Object();
            mcAboutButton.onRelease = function():Void {
            loadData();

            gotoAndPlay(20);

            };


            loadArticle();





            And my HTML:

            <html>
            <head>
            <link href="aof.css" rel="stylesheet" type="text/css">
            </head>
            <body bgcolor="#666666">


            <p class="bodystyle" align="top" valign="top">

            <font color="#000000" face="Verdana, Arial, Helvetica, sans-serif">
            <br />
            <center>
            <h2>CONSULTATIONS</h2>
            <font color="#000000" size="-1">

            Click <a href="tutorials.html">here</a> for a tutorial.
            </p>
            </body>
            </html>