|
So this caused a ton of headaches for me in Flash 5.. I wanted
to include images, but 3rd parties were taking the SWF and embedding
it and not keeping the freaking aspect ratio the same.. for example
if I had a Movie that was 100 x 100 they might resize it with
the
HTML to 150 x 100.
So what's the big deal with that?? Flash uses vectors to describe
shapes and text, right? So they'll stretch just fine with no distortion.
The problem is when a movie is resized any images that are embedded
look like.. well.. crap. Text becomes unreadable. It's not pretty.
So the Flash 6 Player allows something really cool.. and it's not
documented very well.. so here goes.
you can download the .fla and play with
it.. and see how it works..
basically it uses the new Stage.width and Stage.height features
of Flash MX / Flash 6 Player to resize certain objects on the stage.
Scroll down and check out the results... the GIF image does not
stretch!! No distortion!! There are two movieclips (the border and
the grey text) that do stretch to fit the increased stage size.
To see the full effect you need to scroll down and then RESIZE
YOUR BROWSER.
Update (4/15/05) - BUG with Mozilla browsers?!? No way...
If you're having trouble getting Stage.height to work in
Mozilla.. and you're publishing from the Flash MX2004 IDE.. well..
it's not exactly a bug in Flash that's keeping Stage.height
from working. It's a problem in the HTML produced by the Flash
IDE. Try this
HTML file.
It works in both IE and Mozilla and Stage.height will
be detected correctly.
|