# Full browser window

**URL:** https://forum.kirupa.com/t/full-browser-window/153104
**Category:** Uncategorized
**Created:** [June 29, 2005, 9:19am UTC](https://forum.kirupa.com/t/full-browser-window/153104 "2005-06-29T09:19:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![herrkfk](https://avatars.discourse-cdn.com/v4/letter/h/8baadc/32.png) [@herrkfk](https://forum.kirupa.com/u/herrkfk)
#### Post date: [June 29, 2005, 9:19am UTC](https://forum.kirupa.com/t/full-browser-window/153104/1 "2005-06-29T09:19:21Z")

</div>

hi guys. am quite new to flash, anyway am trying to fill a swf file into my browser window, which works fine. it is a slideshow using an xml file for images. only problem is that i cant set up the file to only change size proportionally. if you change the browser window size at the moment the swf file gets distortet. here is the code:

Stage.scaleMode = “noScale”  
Stage.align = “TL”;  
\_root.targetClip.\_width = Stage.width;  
\_root.targetClip.\_height = Stage.height;

myListener = new Object();  
myListener.onResize = function () {  
Stage.align = “TL”;  
\_root.targetClip.\_x = 0;  
\_root.targetClip.\_y = 0;  
\_root.targetClip.\_width = Stage.width;  
\_root.targetClip.\_height = Stage.height;

}  
Stage.addListener(myListener);

slides\_xml = new XML();  
slides\_xml.onLoad = startSlideShow;  
slides\_xml.load(“slides.xml”);  
slides\_xml.ignoreWhite = true;  
//  
// Show the first slide and intialize variables  
function startSlideShow(success) {  
if (success == true) {  
rootNode = slides\_xml.firstChild;  
totalSlides = rootNode.childNodes.length;  
firstSlideNode = rootNode.firstChild;  
currentSlideNode = firstSlideNode;  
currentIndex = 1;  
updateSlide(firstSlideNode);

}  
}  
//  
// Updates the current slide with new image and text  
function updateSlide(newSlideNode) {  
imagePath = newSlideNode.attributes.jpegURL;  
slideText = newSlideNode.firstChild.nodeValue;  
loadMovie(imagePath, targetClip);  
}  
//  
// Event handler for ‘Next slide’ button  
next\_btn.onRelease = function() {  
nextSlideNode = currentSlideNode.nextSibling;  
if (nextSlideNode == null) {  
break;  
} else {  
currentIndex++;  
updateSlide(nextSlideNode);  
currentSlideNode = nextSlideNode;  
}  
};  
//  
// Event handler for ‘Previous slide’ button  
back\_btn.onRelease = function() {  
previousSlideNode = currentSlideNode.previousSibling;  
if (previousSlideNode == null) {  
break;  
} else {  
currentIndex–;  
currentSlideNode = previousSlideNode;  
updateSlide(previousSlideNode);  
}  
};

and here the html:  
\<object classid=“clsid:d27cdb6e-ae6d-11cf-96b8-444553540000” codebase=“[http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0](http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0)” width=“100%” height=“100%” id=“slideshow” align=“middle”\>  
\<param name=“allowScriptAccess” value=“sameDomain” /\>  
\<param name=“movie” value=“slideshow.swf” /\>  
\<param name=“quality” value=“high” /\>  
\<param name=“scale” value=“noscale” /\>  
\<param name=“wmode” value=“transparent” /\>  
\<param name=“bgcolor” value="#ffffff" /\>  
\<embed src=“slideshow.swf” quality=“high” scale=“noscale” wmode=“transparent” bgcolor="#ffffff" width=“100%” height=“100%” name=“slideshow” align=“middle” allowScriptAccess=“sameDomain” type=“application/x-shockwave-flash” pluginspage=“[http://www.macromedia.com/go/getflashplayer](http://www.macromedia.com/go/getflashplayer)” /\>  
\</object\>

thanks a lot in advance,  
kfk
