in Tutorials

Quick Tip: Creating Seamless Background Textures

Here is the second quick tip hot off the presses. In this one I show how to create a seamless background texture in Photoshop. This is useful for games and other applications. This may be common knowledge for a lot of people but I only just learned it so there must be others out there as clueless as I am.

Write a Comment



  1. Thank you for all your work on this blog (and cool tip!) but that “quicktip” voice with johnny cash was horrible 😛

  2. PS, I have recently been getting into game dev and it is amazing. It brings the fun and challenge back to flash. It just seemed like the next logical step. Keep it up man.

  3. Back in 2007, Emanuele Feronato published a Photoshop ‘action’ which automatically creates extremely good, random space scenes, not too dissimilar to the one you used in your video.

    With Emanuele’s ‘action’ and your tutorial, we have an excellent method of creating unlimited space scenes to use in games.

    With a little modification, the action could be updated to automatically apply the offset filter, leaving just a little manual retouching to finish the job. Below is a link to the relevant page on Emanuele’s blog:

  4. Hi Lee,

    Thanks a lot for your tutorial.
    I have a very stupid question, I do not understand, this line:

    var bg:BitmapData = new stars();

    If you have embed a sprite sheet, you must write
    public static var Stars:Class;
    public static var stars:BitmapData = new Stars().bitmapData;


    public static var Stars:Class;
    public static var stars:BitmapData = (new Stars() as Bitmap).bitmapData;

    You can not access directly to the bitmapData.
    Can you give us the small snippet :-)

    Thanks a lot


  5. @Patrick It’s a symbol in his library.

    If you drag and drop a png or jpg (or any supported image format really) and go in its properties, you can check “Export for Actionscript” and it will subclass BitmapData.

  6. It would be great if you could include a WebM version of the video in the video tag’s source list. It’ll then work natively in Firefox.

  7. Nice technique lee.

    I have 1 thing to point out.
    With uising the matrix to displace the bitmapdata you draw inside the sprite… i always encounter a scroll limit / error when i do LOTS of displacement with the matrix.

    Is there anyway around this ?

    For testing purposes:
    Try to do a tx of 10 and then in a enterframe… and let is scroll for a while…. after a while it will stop and just lock into place >.<

  8. @myself :)

    bitmap scrolling with a matrix displacement using matrix.translate
    will result in a scroll hog / bug where the scrolling will get stuck..

    The fix for this:
    use the “tx” property of the matix class.. and adjust that..
    Then set it back to 0 when you scrolled your screenwidth/height.

    now your scrolling bitmapdata wont hog and you can continue as you like :)

  9. a static var never is instanced using new operator. . try just using Stars().bitmapData without new.. do you get it ?