3 Replies Latest reply on Dec 1, 2006 1:33 PM by Peter Lorent

    onRelease function - not retuning a number

    Level 7

      I'm simply trying to return a variable (number) when the the News button is
      And then move to frame with a news content, by checking this variable.

      The problem is that onRelease is working within the "onRelease function"
      scope, but it's not returning the number (vMenuController). This way
      "base_mc.gotoAndStop(1);" is not working, too.

      base_mc.btnNews.onRelease = function():Number{
      trace("function working within it's scope");// Check function
      var vMenuController:Number = 1;
      return vMenuController;

      if(vMenuController == 1){//News
      trace("moved to frame 1 - News");//Check action

      Thanks in advance!