BAILOUTS

From each according to his ability,
to each according to his lack thereof.

Advertisements

What a find!

If you look at the demo or the sample sites you will notice that the whole flash movie doesnt scale, only parts of the movie scale and get repositioned as the browser window is resized.

What we really need is control over how each of the elements (movieclips) in the flash movie reacts to browser window resizing.

Stop Scaling

To control the scaling and resizing for each individual movie clip you must first turn off the scaling for the movie as a whole.

Enter the following actionscript into Frame 1.

Stage.align = "TL";
Stage.scaleMode = "noScale";

The stage scale mode is set to no scale which means that by default the elements in the movie will not scale in recation to changes in the browser window size.

Notice that the Stage.align variable is set to ‘TL’ it means that the stage will be positined in the topleft corner of the stage.

Add a Listener to Check for resizing.

Now that you have the initial setup completed, all thats left is to add a listner for resizing. This creates a new listener object and assigns it to the ‘Stage’ (main flash movie).

sizeListener = new Object();
sizeListener.onResize = function() {
trace (Stage.width)
trace (Stage.height)
};
Stage.addListener(sizeListener);

The sizeListener.onResize function is the key to making this movie work . The code inside the on resize function will execute actions when the movie is resized. This function is the key to creating liquid flash layouts.

In the sample code above the onresize function just traces the stage.width and stage.height values but you can use the Stage.height and Stage.width values to adjust various elements in your movie

Practical Example

Stage.align = "TL";
Stage.scaleMode = "noScale";
sizeListener = new Object();
sizeListener.onResize = function() {
centered._x = Stage.width/2
centered._y = Stage.height/2
centered._width = Stage.width * .5
};
Stage.addListener(sizeListener);

This code adjusts the _x and _y values of the movie clip ‘centered’ when the browser window is resized so that the clip remains centered. And the width of the movie clip centered is changed to eaqual half the width of the browser window.

By bluedawg Design Posted in Learning Tagged

designers vs / developers

Why is there such a rift between designers and developers?

I believe I have entered into each relationship with developers with a genuine openness towards collaboration – eager to put our very different skills to one end and produce shear genius. Much to my dismay I have found developers across the board unwilling to collaborate. It is there show and we are not welcome to it. There are a few exceptions (I can only think of one).

Why is this so true? I feel I go about my business doing my job and being despised by my developer co-workers. I have been told by one of them that it is because What I do is very visual and so I get all the accolades while he toils away unable to show off his talents. OK I can understand this – sounds human enough but … really? So if this is true than it is because they are insufferable, children being overwhelmed by immature impulses. This can not be true across the board. What are your experiences in this area – I’m still trying to figure it out so happy to hear if anyone else has input – especially you developers out there – what’s the deal?

the Sun Magazine

I am quite sure… I have no race prejudices, and I think I have no color prejudices, nor caste prejudices, nor creed prejudices. Indeed, I know it. I can stand any society. All I care to know is that a man is a human being – that is enough for me; he can’t be any worse.   –Mark Twain

By bluedawg Design Posted in quotes