2 Replies Latest reply on May 8, 2007 6:59 PM by Denise Hambrick

    dynamic link to url as a variable

    Denise Hambrick Level 1
      Is there a way to have a dynamic variable that is controlled from outside the flash file that can give a link to a URL?
      I want to have the text or button that will invoke the url be dynamic also?

      In other words, I want to have a link show up when needed that will take the user to a URL. I want to be able to control both the title of the text, or button that they click on, and the address of the URL be controlled from outside Flash, from a php file.

      Can this be done in Flash?

      Any suggestions will be appreciated.
      Thanks,
      Denise
        • 1. Re: dynamic link to url as a variable
          mrmicah
          You have several options in doing this:

          1. You can print vars in a php page which can be accessed in flash. Read about loadvars in the help manual. The vars look like this: var1=data1&var2=data2...

          2. You can have php generate an xml file which you can access in flash. Read about loading and reading external xml files.

          3. If you are embedding the flash movie in an html file, you can use flashvars in the <embed> tag which can be set using php.

          4. You can use flash remoting such as amfphp to load data from a php service into flash.

          If you need anymore info let me know.
          • 2. Re: dynamic link to url as a variable
            Denise Hambrick Level 1
            Thanks for your reply.
            I have successfully shared vars with php files using sendAndLoad. The issue I don't know how to do is to have Flash use the var to be a hotlink to a URL. And to have a second var be the title of that hotlink, whether the title of a button or text in a dynamic text field.

            Any idea?

            Thanks,