1 Reply Latest reply on Jun 6, 2008 3:25 AM by Noelbaland

    Passing Data from a Local variable

      I have attached an onRelease event for a mc which increments the value of a variable by 1. The Whole functionality is inside another function.. Now hows it possible to make the data of the variable available globally, i.e if i want to use that data somewhere else in the same file.
        • 1. Re: Passing Data from a Local variable
          Noelbaland Level 1
          Hello there,

          Put your variable on the root timeline, like this

          var clipCount:Number = 0;

          function moveRight()
          clip_mc.onRelease= function()

          If you use a function that calls your variable from a different timeline (e.g. inside a movieclip or on a button), use _root to target it.


          Hope that helps