I have all of my content inside of a movie clip placed on my stage
and through timeline AS 3 I have a simple scripting that aligns and
sizes that MC (and all of its contents) to keep proportion with the stage
and to fill it at all times
I am having 2 issues
after the preloader, and intro play
the content for the gallery pages (it is a photo website) clips the buttons
down at the bottom (all dependent on browser size at the time) however once the window is resized, it Snaps into a proportion that I like.
the second issue is more than likely related.
the mc that I am using as the background (ecru texture) does not fit to fill
once the screen has been resized I have minimized the noticeability by changing the background color to come close to my texture but I would like to know why these issues are happening.
here is the development page
http://www.andybarnesphotography.com/dev3/
this is my main timeline code
////////////////////////////////
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
stage.addEventListener(Event.RESIZE, resizeHandler);
//function to handle background image resize.
function setBackground() {
var reg2 = stage.stageWidth / 2;
var reg1 = stage.stageHeight / 2;
bg_mc.x = reg2;
bg_mc.y = reg1;
bg_mc.width = stage.stageWidth;
bg_mc.height = stage.stageHeight;
bg_mc.scaleX <= bg_mc.scaleY ? (bg_mc.scaleX = bg_mc.scaleY) : (bg_mc.scaleY = bg_mc.scaleX);
}
setBackground();
function resizeHandler(event:Event):void {
setBackground();
}
/////////////////////////////////////////
I would like to learn how to do this “Correctly” as I have several personal projects
that I would like to use
- a proportionally scaled background (both .flv and mc)
- a main timeline navigation system
- integration of components (mainly slideshowpro) and mc interactivity.
all the tutorials I have found are either way more complicated then I need or are to “specific”
to the point they are difficult to modify
on top of wanting to find the answers to my MC issue listed above
any advice on learning more about the appropriate ways of liquid layout would be appreciated.