Link to home
Start Free TrialLog in
Avatar of Zion Phil
Zion PhilFlag for United States of America

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.
Avatar of rockiroads
rockiroads
Flag of United States of America image

dont know but there is something called exactfit

params.scale = "exactfit"

Avatar of Zion Phil

ASKER

That didn't work for me
ASKER CERTIFIED SOLUTION
Avatar of rockiroads
rockiroads
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
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(Event.RESIZE, onStageResize)
private function onStageResize(e:Event):void {
    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
This is the exact code that worked for me:

stage.scaleMode = StageScaleMode.NO_SCALE

stage.addEventListener(Event.RESIZE, onStageResize)
function onStageResize(e:Event):void {
    var widthScale:Number = stage.stageWidth / 436; // 436 is the original width of the swf, you should replace it with your width
    scaleX = scaleY = widthScale;
}
irockroads link lead me down the right path of searching for the answer. Thanks