com.lookmum.util.FullScreenBackground
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.
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.
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.
import com.lookmum.util.FullScreenBackground Stage.scaleMode = 'noScale' var myBackgroundMc:MovieClip var myBackground = new FullScreenBackground(myBackgroundMc,800,600)
public function FullScreenBackground(target:MovieClip, stageWidth:Number, stageHeight:Number)Constructor function for class
import com.lookmum.util.FullScreenBackground Stage.scaleMode = 'noScale' var myBackgroundMc:MovieClip var myBackground = new FullScreenBackground(myBackgroundMc,800,600)
target | |
stageWidth | |
stageHeight |
public function setOriginalStageWidth(value:Number):Voidchange the original stage width of the movie
import com.lookmum.util.FullScreenBackground Stage.scaleMode = 'noScale' var myBackgroundMc:MovieClip var myBackground = new FullScreenBackground(myBackgroundMc,800,600) myBackground.setOriginalStageWidth(700)
value | the new original stage width in pixels |
public function setOriginalStageHeight(value:Number):Voidchange the original stage height of the movie
import com.lookmum.util.FullScreenBackground Stage.scaleMode = 'noScale' var myBackgroundMc:MovieClip var myBackground = new FullScreenBackground(myBackgroundMc,800,600) myBackground.setOriginalStageHeight(500)
value | the new original stage height in pixels |