1 Reply Latest reply on Oct 16, 2006 12:33 PM by TimSymons

    really easy question

      Hope someone can help.
      I'm trying to pass a variable when I hit a button from one movie vlip to another movie clip on the timeline.

      on (release) {
      var MP = ("Vid_Neck.swf");

      In the movieplay movie clip it doesn't seem to be able to know what the variable is - unless I place it directly in the same movieplay clip.
      How do I pass these variables??

        • 1. Re: really easy question
          TimSymons Level 1
          You don't have to pass the varibles between clips, you just have to make sure that you have the correct path to the movieClip that contains the variable.

          I am not sure what variable you are trying to get from the which movieclip from your code. In general terms you can access variables like this:

          Movieclip 1 on the main timeline with instance name: mc1
          If mc1 has a variable defined inside of it like: var var1:Number = 19;

          Then to access this variable from another movieclip on the main timeline (say mc2) from within mc2 you would write:

          (This code would be on a frame inside mc2)

          This would display "19" in the Output window.

          This may not look very clear in writing but it is pretty straight forward. Just make sure you have the correct path to the movieclip that contains the variable you want to access.