Flash Help Please...
- Started
- Last post
- 6 Responses
- rtrotteruk
I've tried to do this a couple of times and now I really need to use it for a photo which will stretch 100% width of browser and a scaled height to keep the correct aspect ratio.
i.e. 1600x250 or 800x125 etc etc. (6.4:1)
So i made the movie and dropped that into my HTML page at full screen 1600x1200 on my monitor it works no probs cos that's the size of the original flash (1600x250), when you reduce the browser size the image scales correctly to the width (100%) but I get left with the top and bottom borders where the height of the flash movie is not being reduced. How can i correct this? (note the photo scales perfectly i just get left with whitespace)
I'm thinking passing the height of the movie from flash to java and then using java to adjust the height of the movie set in html??
- stewart0
like this?
http://www.kulsdom.com/newstoday…
- UndoUndo0
you dont need to javascript. set yr flash movie to 100% x 100% in html, and then use flash's stage class to resize
- rtrotteruk0
Not quite i'm using photos as a banner at the top of the page, the navigation below this and then the content.
Currently this is all done in HTML with a DIV with background jpeg for the image, therefore the banner is fixed 100% by 200pixels. and the image just get's cut off at the side - works ok.
What I'd like is to be able to scale that top image to display the entire photo, only way I can think to do this is using flash. But don't know how to scale the height of the flash movie to prevent the whitespace being displayed and messing up layout.
- UndoUndo0
link to the page ?
- rtrotteruk0
Sorry not got it loaded up yet.
What you said about using the Stage class, i've played around with that before but only for scaling in flash.
Is it possible to set the height of a movie this way? I.e. if Stage.width = 1600 then set the height to 200. Does this then effect the height of the object in HTML?
- UndoUndo0
no, your right you would need javascrip to set the height of the swf in the html if you to do it dynamically. or you could put it in a div over the html, set the background to transparent and then get the image to scale over the html content