2 Replies Latest reply on Jan 9, 2008 11:58 AM by C-Rock

    reducing slowdown

      im making a game that has a ton of levels but the way i have the levels set up is all the levels are in one movieclip and when u beat one level it goes to the next frame and thats the next level.

      only thing is its causing a bunch of slowdown cuz each level has diffrent movieclips inside
      and i dont know haw to get rid of the slowdown

      would it help if i make each level a seperate movie clip and use a
      create empty movieclip function and a remove movieclip function?
        • 1. Re: reducing slowdown
          Ben Danis
          that would help, i've also found that vector lines tend to be heavy for rendering in Flash, try to maybe convert some to fills.
          • 2. Re: reducing slowdown
            C-Rock Level 2
            lines and lots of individual pixels always slow down the flash player. if this is the case try switching each "level" into its own swf file. when the user is ready to play level one you would load the first level swf on _"level1" of the flash player.

            loadMovieNum("firstLevel.swf", 1);

            when the level is finished being played you can load level 2 in its place on _level1 of the flash player

            the best way to do this this is have a function on level0, your background swf, that is call something like changeLevel.

            inside that function you can pass it which level you which to change to and it will unload "_level1" of the flash player and reload it with a new swf, secondLevel.swf.

            this is how i make all my sites, it keeps the cache of the browser very low and thus making the cpu strain low.

            if you are confused think of it as making layers inside you main swf/background swf with other swf's on top of it. only your background swf really just contains code and maybe a header/logo.

            if you'd like further assistance feel free to contact me personally.