title: How do I get images to update dynamically with a slider in actionscript 3?
body: <p>Here is my dilemma. We use image stacks a lot here with alpha channels. I want to call up images in series using a slider. I am getting a concatenated string a pull up an image from my folder. But I can not get the images to load dynamically when I slide the slider bar. </p>
  
  <p>I am using the frame number to change the file name to pull up the next frame. I can get the image to show up if I put the loader outside of the function, but when I put the loader in the function I get error after error saying the file cannot be located. </p>
  
  <p>Here is the code as it currently stands : </p>
  
  <pre><code>var imgLoader = new Loader();
  var str1 = String (".jpg");
  var sliderValue:uint = mySlider.sliderKnob.x / 3;
  addEventListener(Event.ENTER_FRAME, onEnterFrame);
  function onEnterFrame(event:Event):void {
      sliderValue = mySlider.sliderKnob.x / 3;
      status_txt.text = "Slider position is: "+sliderValue;
      fileText.text = "Sketch_0"+sliderValue+".jpg";
      imgLoader.load( new URLRequest ( "Sketch_0"+sliderValue+".jpg"));
  addChild(imgLoader);
  setChildIndex(imgLoader, 0); 
  }
  </code></pre>