title: Image Sequence Play Once Stop
body: <p>I have a Javascript that loads images from the resource folder, then plays the image sequence back. However it loops the playback infinitely. I'd like the sequence to play once then stop on the last frame of the sequence. Here is the image sequence loader/repeater script.</p>
  
  <pre><code>private var quarterCircleValues = [];
  var texture : Texture;
  renderer.material.mainTexture = texture;
  var changeInterval = 0.33;
  
  function Awake() {
  quarterCircleValues = image_Loader.LoadSequence("adowner", 0150);
  }
  
  function Update() {
  if( quarterCircleValues.length == 0) //nothing if no textures
  return;
  
  //we want this texture index now
  var index :int = Time.time / changeInterval;
  
  //take a module so that animation repeats 
  index = index % quarterCircleValues.length;
  //assign it
  renderer.material.mainTexture = quarterCircleValues[index];  
  }
  </code></pre>
  
  <p>I've tried removing the 'repeat module' but that results in the sequence playing once
  per session then leaves a blank display. How can I program it to play once then stop?</p>