2 Replies Latest reply on Aug 12, 2009 5:31 AM by cbrylla

    problems with hyperlinks in dynamic text

    cbrylla

      Hi,

       

      I have a dynamic textbox on the 3rd level of a flash movie. The textbox has some hyperlinks for which I used this AS2 code as a test:

       

      textbox.html = true;
      textbox.htmlText = "<a href=' http://www.adobe.com' target='_blank'>Adobe</a>";

       

      When I test the scene it works well on all levels apart from the root level. When I test the whole movie, the link does not respond. On rollover the mouse converts into a text cursor, and I have to click several times, until randomly a hand comes up and the link opens. I don't understand why on all sublevels (in the movieclips), the link works perfectly (on rollover mouse becomes hand and click loads URL int browser), but not on the root level. Btw, I placed the movie with the textbox on top, so there is no layer above that in the root timeline. Please help!!!

       

      Thanks.

        • 1. Re: problems with hyperlinks in dynamic text
          dalcde Level 1

          try you getURL:

          onClipEvent (enterFrame){

               this.text = "Adobe"

          }

          on(press){

               getURL("www.adobe.com", "_blank")

          }

          • 2. Re: problems with hyperlinks in dynamic text
            cbrylla Level 1

            Thanks for your response dalcde. However, in my dynamic textbox I have a list with more than 50 different items with different links, and using the HTML tag seems more convenient.

             

            I experimented a bit and found out what causes the problem:

             

            The parent movie clip of the movie clip with the textbox has a mirrored reflection attached to it, for which I use this code:

             

            import flash.display.*;//importing the bitmap class

            var bmd:BitmapData = new BitmapData(860, 330);//definition of a variable for the target bitmap and assigning values
            link_ref.attachBitmap(bmd, 1);//attaches target bitmap to movie clip (reflection)

            link_ref.setMask(link_mask);//sets mask over movie clip (reflection)

            this.onEnterFrame = function()
            {
                bmd.draw(link_contents);
            }

             

            When I switch that off, the link works fine when testing the movie. This is a bit weired cause when I test the scene with the reflection (2nd level after root) the link works fine. The problem only occurs when I test the movie (level 1). Anyways, switching off the reflection is obviously not an option as all the sites on my website have reflections. Is there a workaround to this? I was never aware that the bitmap class could interfere with hyperlinks.

             

            Thanks.