Class com.lookmum.util.FullScreenBackground

com.lookmum.util.FullScreenBackground

Description

The FullScreenBackground extension allows you to set a movieclip to fill the background as the size of the movie changes, while the content remains at it's original scale.

How to use the extension:

Install the extension and you'll find the parallax manager component in your components panel.

Drag an instance to the stage of your movie then delete it so you have a copy in your library.

If you are using actionscript 2 then you'll also need to place a copy of the intrinsic class files included with the extension in your classpath in order to compile.

Usage:

Simply drag a movieclip onto the stage, give it an instance name, then follow the code example below, making sure to input the original publish height and width of the movie. For the extension to work you must set the movie to not scale. You should then set the flash movie to fill the browser window.

Code example:

import com.lookmum.util.FullScreenBackground
Stage.scaleMode = 'noScale'
var myBackgroundMc:MovieClip
var myBackground = new FullScreenBackground(myBackgroundMc,800,600)

Method Index

new FullScreenBackground()

setOriginalStageHeight(), setOriginalStageWidth()

Constructor Detail

FullScreenBackground

public function FullScreenBackground(target:MovieClip, stageWidth:Number, stageHeight:Number)

Constructor function for class

Code example:

import com.lookmum.util.FullScreenBackground
Stage.scaleMode = 'noScale'
var myBackgroundMc:MovieClip
var myBackground = new FullScreenBackground(myBackgroundMc,800,600)

Parameters

target
stageWidth
stageHeight

Method Detail

setOriginalStageWidth

public function setOriginalStageWidth(value:Number):Void

change the original stage width of the movie

Code example:

import com.lookmum.util.FullScreenBackground
Stage.scaleMode = 'noScale'
var myBackgroundMc:MovieClip
var myBackground = new FullScreenBackground(myBackgroundMc,800,600)
myBackground.setOriginalStageWidth(700)

Parameters

valuethe new original stage width in pixels

setOriginalStageHeight

public function setOriginalStageHeight(value:Number):Void

change the original stage height of the movie

Code example:

import com.lookmum.util.FullScreenBackground
Stage.scaleMode = 'noScale'
var myBackgroundMc:MovieClip
var myBackground = new FullScreenBackground(myBackgroundMc,800,600)
myBackground.setOriginalStageHeight(500)

Parameters

valuethe new original stage height in pixels