Revision: 35304
Updated Code
at November 6, 2010 23:51 by jirirybar
Updated Code
import flash.events.*;
stop();
stage.addEventListener(Event.ENTER_FRAME, setStage);
stage.addEventListener(Event.RESIZE, setStage);
function setStage(event:Event):void
{
mainMovie.x = (stage.stageWidth / 2) - (mainMovie.width / 2);
mainMovie.y = (stage.stageHeight / 2) - (mainMovie.height / 2);
mainBg.x = (stage.stageWidth / 2) - (1920 / 2);
mainBg.y = (stage.stageHeight / 2) - (1200 / 2);
}
// mainMovie (Movie Clip) is the whole movie which gets centered
// mainBg (Movie Clip) is the background which gets also centered
Revision: 35303
Updated Code
at November 5, 2010 06:49 by jirirybar
Updated Code
import flash.events.*;
stop();
stage.addEventListener(Event.ENTER_FRAME, setStage);
stage.addEventListener(Event.RESIZE, setStage);
function setStage(event:Event):void
{
mainMovie.x = (stage.stageWidth / 2) - (mainMovie.width / 2);
mainMovie.y = (stage.stageHeight / 2) - (mainMovie.height / 2);
mainBg.x = (stage.stageWidth / 2) - (1920 / 2);
mainBg.y = (stage.stageHeight / 2) - (1200 / 2);
}
Revision: 35302
Updated Code
at November 5, 2010 06:46 by jirirybar
Updated Code
import flash.events.*;
import caurina.transitions.*;
stop();
stage.addEventListener(Event.ENTER_FRAME, onStageResize);
stage.addEventListener(Event.RESIZE, onStageResize);
function onStageResize(event:Event):void
{
Tweener.addTween(mainMovie, { x: Math.round(stage.stageWidth / 2 - (mainMovie.width / 2)), y: Math.round(stage.stageHeight / 2 - (mainMovie.height / 2)), transition: "linear" } );
}
Revision: 35301
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at November 5, 2010 06:46 by jirirybar
Initial Code
import flash.events.*;
import caurina.transitions.*;
stop();
stage.addEventListener(Event.ENTER_FRAME, onStageResize);
stage.addEventListener(Event.RESIZE, onStageResize);
function onStageResize(event:Event):void
{
Tweener.addTween(mainMovie, { x: Math.round(stage.stageWidth / 2 - (mainmovie.width / 2)), y: Math.round(stage.stageHeight / 2 - (mainMovie.height / 2)), transition: "linear" } );
}
Initial URL
Initial Description
Initial Title
Fullscreen center
Initial Tags
Initial Language
ActionScript 3