1 Reply Latest reply on Jan 10, 2007 11:16 AM by Peter Lorent

    Loading an Object

    CirusSF
      I've created a 'slideshow' in which the thumbnails scroll across the screen, and as you click them it loads an .swf animation of whatever image you clicked into an empty object. I used 'on (release) {object.loadMovie()}' What I really want it to do is show 1 of the image animations when the clip begins- which would then be replaced by whatever the viewer clicks on as the next photo. I can make it do it - but it of course the initial animation repeats every time the movie loops. How can I get it to load the .swf initially but not repeat it with every loop?

      any help would be GREAT! I'm sure it's simple & I'm just missing it. Thanks - Cirus
        • 1. Re: Loading an Object
          Peter Lorent Level 2
          Translated to a programming problem you would just need to check whether is situation is true (the animation has played) or false.
          Use a timeline var (or use a _global var) like var hasPlayed:Boolean=false;
          Only play the animation if hasPlayed returns false:
          if(!hasPlayed){
          pathtotheclip.play();//presuming a stop() action in frame 1 of the animation
          }
          And the same applies to loading an animation.