WEB flash help

Discussion in 'OT Technology' started by AnoesisX, Jun 11, 2008.

  1. AnoesisX

    AnoesisX New Member

    Joined:
    Feb 19, 2005
    Messages:
    2,868
    Likes Received:
    0
    Location:
    Boca Rotten, Florida
    I am trying to make an image a background but depeneding on the resolution on your screen once you get a big screen size the background ends you just see black. How do you make the background fit the size screen resoultion (resize for different screen resolution), instead of streching the pic to fit (which distorts the picture)
     
  2. Seeders

    Seeders OT Supporter

    Joined:
    Jul 10, 2007
    Messages:
    3,750
    Likes Received:
    0
    put it in a movie clip
    get the screen resolution ( System.capabilities.screenResolutionX )
    bg._width = res_X
    bg._height = res_Y

    i think.
     
  3. :hsugh: actually you use
    movieclipinstancename.x = screen.width;
    movieclipinstancename.y = screen.height;
     
  4. Seeders

    Seeders OT Supporter

    Joined:
    Jul 10, 2007
    Messages:
    3,750
    Likes Received:
    0
    that sets their position doesn't it?
     
  5. my bad, it should be:

    movieclipinstance.scaleX = screen.width;
    movieclipinstance.scaleY = screen.height;
     
  6. MikeTheVike1

    MikeTheVike1 OT Supporter

    Joined:
    Aug 29, 2002
    Messages:
    5,840
    Likes Received:
    0
    thats going to stretch the image out of proportion I believe. I don't have flash at home to figure it out, but here is a link that shows how to do it. Even though the guy has a lot of extra shit in the code...

    http://www.blog.noponies.com/archives/63
     
  7. he wanted the background image to fit whatever screen resolution. you could also create a huge background image and have it go past the stage width and height too. there are ways to avoid having to do this though. most people have a set width and height for their swf on an html or php document anyway and try to blend it in with a liquid design so that they don't have to worry too much about the user's browser.
     

Share This Page