hi,
in fact i used fr-ode’s full-browser image code. but i dont want to generate full browser images. i want to build a structure like http://www.koendemuynck.com/
as you see in site, photos scaling automatically when you resize the window. can anybody write me a statement for this? here is the fr-ode’s code which distroyed by me:)
thank you…
/genizah
Stage.scaleMode ="noScale";
Stage.align = "LT";
//fscommand("fullscreen", "true");
import flash.display.*;
function loadBitmapSmoothed([url:String](http://www.kirupa.com/forum/String), target:MovieClip) {
var bmc:MovieClip = target.createEmptyMovieClip(
"bmc",
target.getNextHighestDepth()
);
var listener:Object = new Object();
listener.tmc = target;
listener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
percent = Math.round((bytesLoaded/bytesTotal)*100);
pText.text = percent+"%";
}
listener.onLoadInit = function(mc:MovieClip) {
mc._visible = false;
pText._visible=false;
var bitmap:BitmapData = new BitmapData(
mc._width,
mc._height,
true
);
this.tmc.attachBitmap(
bitmap,
this.tmc.getNextHighestDepth(),
"auto",
true
);
bitmap.draw(mc);
// set size and position on load
oran=target._height/target._width;
if(Stage.height> target._height+target._height/2) {
img_prop = target._width/target._height;
target._height = 650;
target._width = target._height*oran;
target._y = 0;
target._x = 0;
} else {
img_prop = target._height/target._width;
target._width = Stage.width-600;
target._height = target._width*img_prop;
target._y = 0;
target._x = 0;
}
};
var loader:MovieClipLoader = new MovieClipLoader();
loader.addListener(listener);
loader.loadClip(url, bmc);
}
_root.createEmptyMovieClip("bg_con", 0);
loadBitmapSmoothed("salla.jpg", bg_con);
// set size and position on resize
var stage_listener:Object = new Object();
stage_listener.onResize = function():Void {
if(Stage.height> bg_con._height+bg_con._height/2) {
img_prop = bg_con._width/bg_con._height;
bg_con._height = 650;
bg_con._width = bg_con._height*img_prop;
bg_con._y = 0;
bg_con._x = 0;
} else {
img_prop = bg_con._height/bg_con._width;
bg_con._width = Stage.width-600;
bg_con._height = bg_con._width*img_prop;
bg_con._y = 0;
bg_con._x = 0;
}
}
Stage.addListener(stage_listener);