3 Replies Latest reply on May 22, 2008 9:50 AM by kglad

    Test URL

      Hi,
      I need help to done my project.

      What I need : the flash check if the url is http:// or httpS:// and if is http:// display a image or text and if it`s https:// display other image or text.

      Anyone can help me ?

      Thanks
        • 1. Test URL
          Ned Murphy Adobe Community Professional & MVP
          You will need to test the first five characters of the URL string. Below is some basic code to give you an idea of what you can do. In this case the String.slice() method is used to extract the first 5 characters.
          • 2. Re: Test URL
            Level 1
            Thanks for your reply.

            I tryed it but don`t work for me.

            Can you give me a exactly example maybe if it`s possible to send me .fla file ?
            I need two image (img 1 and img2).
            If URL typed on browser is http I need to show img1 and if it`s https need to show img2.

            So if a visitator go to page http://example.com he show on page flash with img1 and if he go to https://example.com he show img2

            Thanks again.
            • 3. Re: Test URL
              kglad Adobe Community Professional & MVP
              slice() is an array method, not a string method.

              use: