1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Animated Backgrounds?

Discussion in 'Help' started by songxang, Jun 9, 2014.

  1. songxang

    songxang Potential Patron

    Joined:
    Sep 30, 2013
    Messages:
    12
    Likes Received:
    0
    Hi I looked around on the boards, but I couldn't seem to find a tutorial on how to make an animated background. GIFs didn't work for me, so perhaps I need to use a swf file? The most I know is that a normal background is just a picture that's cropped to about 700x825

    I mainly want to take video clips and use them as the background (eg. a beach with moving water)

    Can someone help a guy out?
     
  2. ModGuy

    ModGuy Club Regular Content Creator

    Joined:
    Feb 17, 2011
    Messages:
    1,754
    Likes Received:
    21
    Use ffmpeg or equivalent to extract frames from a video as an image sequence.
    Create a new Flash document.
    Import images in to the timeline, if they have been numbered sequentially they will import all at once and automatically arrange themselves across frames.
    Ideally place this entire timeline in to a child movieclip to make scripting easier.
    Add the following script to the first frame to set the entire animation on the background:

    Code:
    function initl(l){
    	l.loadManual(l.g.bg, BACKGROUND_MOVIECLIP);
    	l.unloadMod();
    }
    Where BACKGROUND_MOVIECLIP is the name of your background movieclip animation.
     
  3. idkmybffdave

    idkmybffdave Potential Patron

    Joined:
    Jul 28, 2012
    Messages:
    27
    Likes Received:
    0
    I've just been importing gifs to the background template of SDTMod.fla. But I would assume MG's answer is more correct, because he's ModGuy ffs.
     
  4. ModGuy

    ModGuy Club Regular Content Creator

    Joined:
    Feb 17, 2011
    Messages:
    1,754
    Likes Received:
    21
    I haven't tried importing GIFs in to Flash, but OP was asking for video files.
    You could use the built in media encoder that comes with Flash but it's a bit clunky tbh.
     
  5. songxang

    songxang Potential Patron

    Joined:
    Sep 30, 2013
    Messages:
    12
    Likes Received:
    0
    Very informative. Thanks :D