I’m working off of a website template and am not exactly sure how my elastic function works. When I export the movie and a small (about half my screen) window pops up the website looks good, however once I make the window any larger it starts cutting off the bottom of my bg image. I’ve had some success changing the code to
Stage.align = "T"; and Stage.scaleMode = "showAll";
but then there are just solid blocks on either side of the background image that don’t look very good.
I am hoping there is a way to fix it so the bottom will be locked in place and not get cut off when resizing the window. I appreciate any ideas, here is some code that might help:
mainpage, Frame 1
Stage.align = "TL";
Stage.scaleMode = "noScale";
_quality = "BEST";
mainpage, Frame 2
//Background url loaded
if(this.background.attributes.enable==1) { Bg_enable=true; }else{ Bg_enable=false; }
Bg_position = this.background.attributes.bgposition;
Bg_url = this.background.attributes.path;
mainpage, Frame 4
//bg config
var listenerBgr:Object = new Object();
listenerBgr.onResize = function():Void {
if (Bg_position == "extended") {
lie = _root.bg;
lie._width = Stage.width;
lie._height = Stage.height; }
else if (Bg_position == "center") {
lie = _root.bg;
lie._x = (Stage.width-lie._width)/2;
lie._y = (Stage.height-lie._height)/2; }
****BGpage, Frame 1
Stage.align = "TL"
Stage.scaleMode = "noScale";
function resizeIm(movieIm, width_, height_) {
var _loc3 = width_/movieIm._width;
var _loc2 = height_/movieIm._height;
if (_loc2 < _loc3 ) {
movieIm._width = width_;
movieIm._height = movieIm._height*_loc3; }
if (_loc2 > _loc3 ) {
movieIm._width = movieIm._width*_loc2;
movieIm._height = height_; } };
flagPlay = true;
S = new Object();
S.onResize = function() {
btnStopPlay._x = Stage.width-100;
resizeIm(_this.mainPic, Stage.width, Stage.height);}
S.onResize();
Stage.addListener(S);
Im stumped, thanks for any help