gracias
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
//set stage for FBF
stage.align = "TL";
stage.scaleMode = "noScale";
stage.scaleMode = StageScaleMode.NO_SCALE; // different stageWidth values
//stage.scaleMode = StageScaleMode.EXACT_FIT; // onResize doesn't fire
//stage.scaleMode = StageScaleMode.SHOW_ALL; // onResize doesn't fire
//stage.scaleMode = StageScaleMode.NO_BORDER; // onResize doesn't fire.
//stage.align = StageAlign.TOP_LEFT;
// stage.displayState = StageDisplayState.FULL_SCREEN;
//stage.displayState = StageDisplayState.NORMAL;
//define dynamic aspect ratios
//var picHeight = pic.height / pic.width;
//var picWidth = pic.width / pic.height;
//define dynamic aspect ratios
/*picHeight = new Object ();
picHeight = pic.height / pic.width;
picWidth = new Object ();
picWidth = pic.width / pic.height;
*/
//add event listener to the stage
stage.addEventListener(Event.RESIZE, sizeListener);
//conditional statement to account for various initial browswer sizes and proportions
function scaleProportional():void {
// figure out width-to-length ratio for both
var targetRatio:Number = pic.width / pic.height;
var destRatio:Number = stage.stageWidth / stage.stageHeight;
if(targetRatio > destRatio){
// target is landscape, dest is portrait
pic.width = stage.stageWidth;
pic.scaleY = pic.scaleX;
} else if(targetRatio < destRatio){
// target is portrait, dest is landscape
pic.height = stage.stageHeight;
pic.scaleX = pic.scaleY;
} else {
// both are the same ratio
pic.width = stage.stageWidth;
pic.scaleY = pic.scaleX;
}
}
//center picture on stage
function centerPic():void {
pic.x=(stage.stageWidth / 2) - (pic.width / 2);
pic.y=(stage.stageHeight / 2) - (pic.height / 2);
}
// make listener change picture size and center picture on browser resize
function sizeListener(e:Event):void {
scaleProportional();
centerPic();
}
scaleProportional();
centerPic();
import flash.display.Stage;
import flash.display.StageDisplayState;
//set stage for FBF
stage.align = "TL";
stage.scaleMode = "noScale";
stage.scaleMode = StageScaleMode.NO_SCALE; // different stageWidth values
//stage.scaleMode = StageScaleMode.EXACT_FIT; // onResize doesn't fire
//stage.scaleMode = StageScaleMode.SHOW_ALL; // onResize doesn't fire
//stage.scaleMode = StageScaleMode.NO_BORDER; // onResize doesn't fire.
//stage.align = StageAlign.TOP_LEFT;
//stage.displayState = StageDisplayState.FULL_SCREEN;
//stage.displayState = StageDisplayState.NORMAL;
//define dynamic aspect ratios
//var picHeight = pic.height / pic.width;
//var picWidth = pic.width / pic.height;
//define dynamic aspect ratios
picHeight = new Object ();
picHeight = pic.height / pic.width;
picWidth = new Object ();
picWidth = pic.width / pic.height;
//add event listener to the stage
stage.addEventListener(Event.RESIZE, sizeListener);
//conditional statement to account for various initial browswer sizes and proportions
function scaleProportional():void {
picHeight = new Object ();
picHeight = pic.height / pic.width;
picWidth = new Object ();
picWidth = pic.width / pic.height;
if ((stage.stageHeight / stage.stageWidth) < picHeight) {
pic.width = stage.stageWidth;
pic.height = picHeight * pic.width;
} else {
pic.height = stage.stageHeight;
pic.width = picWidth * pic.height;
};
}
//center picture on stage
function centerPic():void {
pic.x = stage.stageWidth / 2;
pic.y = stage.stageHeight / 2;
pic.x = Stage.width / 2 - pic.width /2;
pic.y = Stage.height / 2 - pic.height /2;
}
// make listener change picture size and center picture on browser resize
function sizeListener(e:Event):void {
scaleProportional();
centerPic();
// pic.width = stage.stageWidth;
// pic.height = stage.stageHeight;
// pic.x = pic.y = 0
}
//run initial locations and size
//margin_height=400;
scaleProportional();
centerPic();
//create variables
private var loader:Loader;
private static const IMAGE_PATH:String = "bg.jpg";
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="100%" height="100%" id="index" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="index.swf" />
<param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />
<param name="flashvars" value="parametro1=miValor1¶metro2=miValor2"/>
<embed src="index.swf" flashvars="parametro1=miValor1¶metro2=miValor2" quality="high" bgcolor="#ffffff" width="100%" height="100%" name="index" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
</object>