6 Replies Latest reply on Aug 11, 2006 7:45 AM by backpages

    Constructing Parameter For Function

    backpages Level 1
      I have several images that I want to load at the same time into various Movie Clips, using MovieClipLoader. I want to use as little ActionScript as possible, so I've written a few functions, the main one is this:

      function loadMiniPhoto(miniNum, mcNum) {
      var miniNum:Number;
      var mcNum:Number;
      var whichMC:String = "this.mini" + mcNum + "_mc";
      trace(whichMC);
      _level0.myMCL.loadClip("jpegs/mini" + miniNum + ".jpg", whichMC);
      }

      What I'm trying to do is pass the function two parameters, the number of the jpeg (minNum) and the number of the Movie Clip which it should be loaded into (mcNum). Passing the jpeg number works fine, but I can't seem to come up with something that works for the Movie Clip name. Those the trace shows what it is correctly (this.mini1_mc) it doesn't load into the Movie Clip. Any insight or thoughts on what I'm doing wrong would be greatly appreciated. Thanks!