1 Reply Latest reply on Jul 17, 2007 12:20 AM by neeks

    load unload movies

      I want to create a movie that loads an swf file, then once the swf file is finished playing, it unloads that then loads another file. Once the files are done playing, I would like it to loop over again. I know it's fairly basic but I can't seem to grasp the actionscript that is needed for this. Can someone please help me out? Thanks a bunch.
        • 1. Re: load unload movies
          if you don't have much files,
          you can use an array in the main swf which will load all other swfs, call it movieArray.
          Now make some function like LoadNextMovie( ) in the same file.
          make a counter variable like currentMovieNum and set it to zero.
          now just call the LoadNextMovie( ) which will look at the currentMovieNum, increment it by 1, and load the movie with the name stored at the corresponding position of the movies array.

          you can call the same function from within the swfs to be loaded at the last frame like _parent.LoadNextMovie( )
          Which will take care of incrementing the counter and loading next movie.
          also you can place a check that when the counter reaches a value equal to number of elements in the array, it will set the counter to 0 again.

          if you are novice with as, it might help to read the following in the as help
          loadMovie, array