1 Reply Latest reply on Mar 29, 2007 9:30 PM by Peter Pawinski

    change getURL with a variable


      I have a movie clip with instance name "launch". I created a global variable with:

      _global.launchwebsite = "";

      I have a scrolling menu with thumbnail images. I want each thumbnail to dynamically change the URL of the launchwebsite variable. I tried putting this code on one of the menu items:

      launchwebsite = " http://www.google.com";

      I only get a blank page. If i initially make the global variable "launchwebsite" like
      this: _global.launchwebsite = " http://www.google.com";

      it works fine. I guess I'm having trouble with the syntax for handling the quotes in the getURL(" http://www.google.com");

      I have getURL(launchwebsite);

      I would really appreciate any help!!!

        • 1. Re: change getURL with a variable
          Peter Pawinski
          Are you trying to change the global variable with launchwebsite = " http://www.google.com";? If so, you need to have _global.launchwebsite= " http://www.google.com" and getURL (_global.launchwebsite).

          I could be completely misunderstanding your post, but if you do this:

          _global.myVariable = 500;
          myVariable = 20;

          trace(_global.myVariable); // outputs 500
          trace(myVariable); // outputs 20

          You will note you have created two different variables here. myVariable is in the _root scope, so you have two variables: _global.myVariable and _root.myVariable (or _level0.myVariable).

          Or am I misunderstanding your question?