A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: Automatically creating an animated preview SWF

  1. #1
    Senior Member
    Join Date
    Feb 2003
    Posts
    272

    Automatically creating an animated preview SWF

    Hi all,

    I'm developing a Flash games site, and I would like to create an animated preview SWF for each game. Right now I have 15 games, but as I begin to develop more and more games, it's getting very tricky to limit how much code I am repeating. Can anyone out there recommend a sound way to create an animated preview of a game without having to repeat too much? Animating my own 15 second clips for each game is an option, and so is using a screen capture program to allow me to record actual gameplay. Both of these options don't seem very pragmatic in the long run, however, should any changes need to be made across the board.

    What do you think? Can anyone recommend a concise way to create these preview video SWFs?

  2. #2
    Script kiddie VENGEANCE MX's Avatar
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,590
    No easier way. Would seriously consider just using screenshots, animations could become hard work after a while, especially if they're as long as 15 seconds (a lot of games you'd probably need to try pretty hard to stay alive through 15 seconds of gameplay).
    http://www.birchlabs.co.uk/
    You know you want to.

  3. #3
    Senior Member
    Join Date
    Feb 2003
    Posts
    272
    Oh, so sad... There is no way to dynamically resize a SWF? No ideas on how to animate preview clips without having to make separate FLAs that replicate the actual game?

    I guess screenshots will be the best way to go (either that or very simple SWF animation previews that will have to be individually hand-made).

    If anyone out there can save me a boatload of time with a spark of creativity, I'd be awfully grateful...

    -Ange52

  4. #4
    Script kiddie VENGEANCE MX's Avatar
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,590
    you can resize it, sure, but you'd still have to take into account the play buttons and the varying dimensions and so forth.
    http://www.birchlabs.co.uk/
    You know you want to.

  5. #5
    Senior Member
    Join Date
    Feb 2003
    Posts
    272
    It would be fantastic to be able to take the actual game SWF, programmatically resize it to a mini preview version, then run it through code as well. In pseudo code, it could be something like...

    -Load the game SWF
    -Resize it to fit mini dimensions
    -Trigger an event/ animation
    -Wait for a few seconds
    -Trigger another event/ animation
    -Wait a few seconds
    -Go to the 'Congrats' screen

    What do you think? Is it possible to pull off something like this, do you think?

  6. #6
    Senior Member tonypa's Avatar
    Join Date
    Jul 2001
    Location
    Estonia
    Posts
    8,223
    Loaded swf files can be resized easily. Load it into movie clip and after its loaded completely you can modify the movie clip as you wish.

    Triggering events is also possible if your games are built holding this idea in mind. Again, if the swf is loaded into movie clip, you can call function inside that mc or pick certain frame. Really depends how you code the games.

  7. #7
    Senior Member
    Join Date
    Feb 2003
    Posts
    272
    Alright, this is sounding really promising. I like it.

    All of the games are built implementing an interface, so I can be sure that there are a few methods that I can call on each game to get the desired results. Furthermore, they are all educational games, so it won't be that difficult to trigger the 'Correct answer,' 'Incorrect answer,' and 'You won!' kind of moments.

    What this means is that I'll have one master swf to control the previews. A parameter to this SWF will control which game preview shows up. This master SWF will load in that game, resize it, then can programmatically deal with triggering events. This would be clean code, each game getting its own chunk of code to execute if it is called in.

    I think I'll push ahead with this method. Any foreseeable walls I might run into?

    Thanks for all of your input,
    Ange52

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center