PDA

View Full Version : Creating animation-sets dynamicly



DoktorAce
February 10th, 2007, 09:18 AM
I am in the process of making a game, where two players can fight against each other. Before the players start their fight, they can choose 5 moves that they want to use from a list.

What I need to do here is load these moves from swf-files that are located in another directory. I want to do this because there is no need for the clients to load moves that will not be used, and that would only make for extra long loading times.

Is there anyway to create a movie clip that has different swf-files loaded dynamicly into different frames? Or how would you go about this?

Thanks! (I use flash8 and As2.0)

bombsledder
February 10th, 2007, 04:39 PM
maybe this

http://www.actionscript.org/resources/articles/3/1/MovieClipLoaders-Part-1/Page1.html

never worked with loading swfs before but this looks like what your looking for

SacrificialLamb
February 10th, 2007, 04:41 PM
if the animation's are made up of just frames/stills you can use attach movie to swap out the image every frame. I don't know how that would work but I imagine that it will slow it done some what.

You could probably lode the swf's in to the movie and attach that when a move is preformed (to replace the MC) but I don't know how to add it to a pacific frame

also if you include the MC and do not place it then in linkage you don't tick "export in first frame" you can lode it later as you need it, will at lest that's the idea but I have never used it

bombsledder
February 10th, 2007, 06:25 PM
i think he doesnt want a big file size .swf, so hes gonna load everything dynamically putting all the frames in the movie could increase its file size a lot depending on how many there are

SacrificialLamb
February 11th, 2007, 03:31 AM
i was under the impression that if you did not "export in first frame" will the swf size might be big the user would not lode the full file till it is prompted and you don't have to prompt it so effectively doing the same thing as not including the file. But I have not used that before and I might not under stand the properly.
And if you where specking abut the first one I forgot to mention that I intended to lode the images externally

bombsledder
February 11th, 2007, 10:35 AM
ok...
1.) even you have it in the library of your .swf not loaded into the file yet its still going to make the file size big
2.) he wants a load file size by loading the movies externally when he needs them and deleting them when he doesn't

so this would be what hes looking for if he wants smaller sizes to load, but then hes gonna have to load them later on =/

DoktorAce
February 12th, 2007, 05:42 AM
What I really need to do is preload these moves in the list that I've gotten from the server. This has to be done on game start, when everything else is preloaded. Then I have to be able to attach these new movie clips to the player and play them when they are needed.

These external animations will be quite many and sometimes large in file size. Thats the main reason why I don't want them in the game swf file. The other reason is that there are other flash-applications that need to use these animations.

Thanks for your help!

bombsledder
February 12th, 2007, 07:09 AM
so load them through .swfs, the link i posted earlier will help