PDA

View Full Version : Liquid design with fixed mc points


smokesletsgo
02-27-2009, 11:20 PM
Hi folks,

Firstly let me say thanks for reading this post.

I am developing a new site and have grown a bit tired of fixed pixel stuff, so what I am looking to achive is a liquid design with a few differant touches added to it.

At it's most basic, I would like to have a full page background picure with mc's drawn over the top, the idea being that my fixed jpeg comes alive with moving animations.

So...what i have done is cropped the bottom of a landscape picture and added my own sky as a vector graphic. The thing that I am struggeling to understand is how I can keep the bottom jpeg consistant between differing resolutions. The reason that I need to do this is due to the fact that animations will occur at specific points on the foreground image.

I have managed to find a perfect example of what im trying to achive at:
http://www.lessrain.co.uk

Again thanks for reading!

snickelfritz
02-28-2009, 12:37 AM
My first instinct is to find the location as a percentage, then store the x and y values in variables.
Since the image always retains its aspect ratio, the percentage value will always remain the same.

For example, the point is at 75% of the image width and height. (near the lower right corner)
And the image has upper-left registration.
var posX:Number = image.x + (image.width * .75);
var posY:Number = image.y + (image.height * .75);

object.x = posX;
object.y = posY;

smokesletsgo
02-28-2009, 12:29 PM
Hey Sniklefritz,

yeh, that makes sense.

I'll try to give this a go over the weekend...the only other thing that springs to mind would be the actuall size of the object. How could I resize my object so that it is proportunal to the foreground..

Thanks a million buddy