Hi,
Im working on a full screen flash project that calls in an image from an xml file and displays it in the background. This all works great but is it possible to have the imported image scale up/down when the user resizes the browser window?? I have searched for a solution but cant seem to find one. Is this possible?
Im not sure if this will do any good but here is the code for loading in the background image:
var oldVar = 0;
var newVar = 0;
var my_xml = new XML();
my_xml.ignoreWhite = true;
my_xml.onLoad = function(success) {
if (success) {
library = this.firstChild.childNodes;
maxVal = library.length;
delete my_xml;
getImage();
} else {
desc_txt.text = 'Error: XML Not Loaded';
}
};
my_xml.load('library.xml');
p = 0;
this.onEnterFrame = function() {
if (container_mc._alpha<100) {
container_mc._alpha += 8;
}
};
function getImage() {
newVar = Math.floor(Math.random()*maxVal);
if (newVar == oldVar) {
getImage();
} else {
oldVar = newVar;
container_mc._alpha = 0;
container_mc.loadMovie(library[newVar].firstChild.firstChild.nodeValue);
newVar = Math.floor(Math.random()*maxVal);
one_btn.onRelease = function() {
getImage();
};
}
}
Any help would be appreciated
Hurley





Bookmarks