Dev Guy
Dev Guy

Reputation: 520

Flash Zoom in Issue

In header I have placed a Flash banner. Zoom in and out (Ctrl + and -) is not working for the flash banner. Can this be fixed?

Thanks

Upvotes: 0

Views: 132

Answers (1)

Kyle
Kyle

Reputation: 67184

If you have NoScale set on the stage you can use :

stage.scaleMode = StageScaleMode.NO_SCALE

Then add in a rescale event listener:

stage.addEventListener(Event.RESIZE, onStageResize)
private function onStageResize(e:Event):void {
    var widthScale:Number = stage.stageWidth / 500; // width of your swf
    scaleX = scaleY = widthScale;
}

This needs to be added to the .fla file in order to work.

Upvotes: 1

Related Questions