4 Replies Latest reply on Apr 26, 2010 8:37 PM by jacky_38

    variable access problem


      hello everyone,

      I added a movie clip in the mainframe/scene,

      Inside this movie clip I newed a number variable called "try_variable" and valued it 10.


      but then in the mainframe/scene, when I tried to access/trace the "try_variable" from that movieclip,

      it doesn't work.


      That movieclip is exported for action scrip with a class name "try_mvc",

      I tried to trace the value 10 using "try_mvc.try_variable",

      it doesn`t work as well.


      And I would like to ask all of you that how I can access the variable"try_variable" in the mainframe/scene (outside the movieclip).


      code in mainframe/scene :


      var main_try:try_mvc=new try_mvc();

      main_try.try_mvc = 10;

      trace(main_try.try_mvc); //  NaN


      code in  try_mvc:


      var try_variable:Number;