Skip to content

Instantly share code, notes, and snippets.

@augustl
Created December 3, 2008 11:41
Show Gist options
  • Select an option

  • Save augustl/31507 to your computer and use it in GitHub Desktop.

Select an option

Save augustl/31507 to your computer and use it in GitHub Desktop.
// 'mySlideshow' will always have the size of the movie clip. Even if it's being resized in a browser window (thanks to the scaleMode)
stage.align = StageAlign.TOP_LEFT
stage.scaleMode = StageScaleMode.NO_SCALE
var resizeHandler = function(e){
var stageWidth:Number = Math.round(mySlideshow.stage.stageWidth)
var stageHeight:Number = Math.round(mySlideshow.stage.stageHeight)
mySlideshow.width = stageWidth;
mySlideshow.height = stageHeight;
}
mySlideshow.stage.addEventListener(Event.RESIZE, resizeHandler)
resizeHandler()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment