This is a discussion on Stage and Background resize but other objects not to resize within the Flash Actionscript Programming forums, part of the Web Development category; Hi I'm simply looking to resize the stage but need to keep everything to scale. For example having the ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi I'm simply looking to resize the stage but need to keep everything to scale. For example having the foreground at a fixed size but a background image to scale to the browser's height and width, keeping the image's dimensions intact (no 'stretchy-ness') So the background image will take it's height and width from the available browser area and scale the image to fit accordingly. -So if your browser window is long and thin the background image will be aligned top-left and canvas space will be visible on the side of the image. And like wise if the browser is tall space will be at the bottom. (ie: so i can fill those cinema displays!) Can anyone point me in right direction? <aramesh> |
| Sponsored Links |
| |||
| Hi, Use the following code to keep the foreground at fixed size and resize the background image. In this bgmc is a movieclip which holds an background image, and txt1 is the text box. Write the following codes in main time line. Embed the flash in html page and set its width and height to 100%. When we resize the html page the background image is set to the browser with height, and the text box is not scale and set on the left side of the stage(ie, on left side of the browser window). Stage.scaleMode="noScale"; Stage.align="LT"; bgmc._width=Stage.width; bgmc._height=Stage.height; txt1._x=Stage.width-txt1._width; var stageListener:Object=new Object(); Stage.addListener(stageListener); stageListener.onResize=function(){ bgmc._width=Stage.width; bgmc._height=Stage.height; txt1._x=Stage.width-txt1._width; }
__________________ The OXYGEN Delivers edgy, intelligent Technology to all... Last edited by oxygen : 08-22-2007 at 10:37 PM. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Desktop Background Problem | it.wily | Operating Systems | 13 | 01-10-2008 08:34 PM |
| How to resize a visitor's browser? | jeyaprakash.c | HTML, CSS and Javascript Coding Techniques | 4 | 10-14-2007 09:20 PM |
| Info on background process in PHP | sivaramakrishnan | PHP Programming | 4 | 08-14-2007 08:22 AM |
| Auto Resize Applications in J2ME ? | itbarota | J2ME | 7 | 08-09-2007 12:06 AM |
| what is the latency of an instruction in a 5 stage machine? | vadivelanvaidyanathan | C and C++ Programming | 0 | 07-16-2007 10:23 PM |