Zion Phil
asked on
What is the opposite of the code: params.scale = "noscale";
I need to make it so the flash file I am working with will scale if the browser is Zoomed In or Zoomed out. I suspect this is the line that controls that, but I do not know what the opposite it. I have tried "yesscale" and just "scale" with no effect.
ASKER
That didn't work for me
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks I will check this out. Hopefully the js methods will work as I don't know squat about ActionScript. I do have control over the app partially. I cannot edit the swf or the .fla, as I do not know how. Most of the settings are controlled through a couple xml files, and an HTML file that I hand edit.
ASKER
Well from what I have found out through some of the links rockiroads provided and some extra searching off of that, I have to edit the .fla file. I found some code Action Script code that says it will work, but I have absolutely no idea how to input this code with Adobe Flash CS3 Professional. If someone can just let me know how to inject the following code in my fla file I think I will be set. Attached is my FLA file:
If you have no scale on the stage
ActionScript Code:
stage.scaleMode = StageScaleMode.NO_SCALE
then add an resize event listener on the stage that finds the scale and resizes the movie accordingly:
ActionScript Code:
stage.addEventListener(Eve nt.RESIZE, onStageResize)
private function onStageResize(e:Event):voi d {
var widthScale:Number = stage.stageWidth / 800; // 800 is the original width of the swf, you should replace it with your width
scaleX = scaleY = widthScale;
}
ImageScrollerFX.fla
If you have no scale on the stage
ActionScript Code:
stage.scaleMode = StageScaleMode.NO_SCALE
then add an resize event listener on the stage that finds the scale and resizes the movie accordingly:
ActionScript Code:
stage.addEventListener(Eve
private function onStageResize(e:Event):voi
var widthScale:Number = stage.stageWidth / 800; // 800 is the original width of the swf, you should replace it with your width
scaleX = scaleY = widthScale;
}
ImageScrollerFX.fla
ASKER
This is the exact code that worked for me:
stage.scaleMode = StageScaleMode.NO_SCALE
stage.addEventListener(Eve nt.RESIZE, onStageResize)
function onStageResize(e:Event):voi d {
var widthScale:Number = stage.stageWidth / 436; // 436 is the original width of the swf, you should replace it with your width
scaleX = scaleY = widthScale;
}
stage.scaleMode = StageScaleMode.NO_SCALE
stage.addEventListener(Eve
function onStageResize(e:Event):voi
var widthScale:Number = stage.stageWidth / 436; // 436 is the original width of the swf, you should replace it with your width
scaleX = scaleY = widthScale;
}
ASKER
irockroads link lead me down the right path of searching for the answer. Thanks
params.scale = "exactfit"