A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: stretch movie to max size

  1. #1
    Esquire Frank DeRosa's Avatar
    Join Date
    Dec 2002
    Location
    the Matrix
    Posts
    144

    stretch movie to max size

    I've developed a page that stretches to fit the browser that contains it. Is it possible to make a movie do this, but stop expanding at a certain size? This way it makes good use of space in a small browser/monitor, but won't get so big that embedded images stretch and distort to ugly porportions in big browsers/monitors.

    Thanks!
    Frank

  2. #2
    Resident Shostakovich Scholar
    Join Date
    May 2003
    Location
    Nottingham, UK.
    Posts
    299
    Anyone who's ever got their target paths wrong when trying to change the positional/size properties of an MC will know that, by default, changing the _x and _y changes the properties of the whole movie.

    So I imagine that, if you had the below code on your main timeline or on a button, it would change the size of a movie, providing you left the width and height fields blank in the HTML for the Flash object.

    _width = "value"
    _height = "value"

    I don't know how you can tell someone's resolution or screensize, perhaps there's a java function to do this, then pass the value of that function to Flash which can then resize itself accordingly and no higher than a set level.

    Hope some of this helps.

  3. #3
    Esquire Frank DeRosa's Avatar
    Join Date
    Dec 2002
    Location
    the Matrix
    Posts
    144
    That's essentially the same as

    _root._width
    _root._height

    right?

    That last part is what interests me. I could find those values and set them to an upper bound, but when? I don't want to waste processing checking the size every frame or second, and I don't want to check the size once on load and then have it re-size with the browser to be too big.

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