0 Replies Latest reply on May 30, 2006 5:03 AM by Newsgroup_User

    Losing values when call to a function?

    Level 7
      Troubles with functions.

      It doesnt send the values to SetPic porperly. I get "undefined". The values
      are correct before the function (i checked them, and they are numbers with
      value)/

      Anyone can tell me with im losing the values when i call the function?



      I have this code.

      SetPic
      (pic_intro_mc,Enter.p_file,Enter.p_posX,Enter.p_posY,Enter.p_sizeX,Enter.p_sizeY);

      SetPic (backpic_intro_mc ,Enter.backpic ,0 ,0 ,955 ,680);



      //////////// //////SetPic


      function SetPic (Sprite, File:String, StartX:Number, StartY:Number,
      SizeX:Number, SizeY:Number)
      {
      _root.SizeX = SizeX;
      _root.SizeY = SizeY;
      _root.StartX = StartX;
      _root.StartY = StartY;

      trace("+SizeX:"+SizeX);
      trace("+SizeY:"+SizeY);
      trace("+RSizeX:"+_root.SizeX);
      trace("+RSizeY:"+_root.SizeY);

      mcLoader.loadClip (File, Sprite);
      }