PDA

View Full Version : I have problem with my design...


Danny keane
03-06-2005, 03:28 PM
Hello,

I am currently trying to design my newest layout and sadly it isn't going to well. I need to make the website resize every time you click a button also I want the buttons to stick to the layout for example: check out Braingiants.com.
Here are some of the examples of the sites with the resizing functions:
www.braingiants.com
www.niciezalavilla.com
www.hjarchitects.ca/#
www.xolutions.be/mainEN.html

If you can help please do so.

My flash file: http://www.dkstudios.co.uk/index.fla

Here is the code I'm using:
// ****** All code is © Copyright 2004 Charles Miller.
// ****** This code is provided for educational purposes only.
// ****** Please email me at charlie@braingiants.com for private use.

// Set initial variables
stageWidth=750; // Can also use the Stage.width property
stageHeight=500; // Can also use the Stage.height property
wmodifier = 569;
hmodifier = 308;
/* .7 for decent bounce effect */
bouncefactor = .7;
/* 6 for nice speed */
speedfactor = 8;
expand = function (id) {
// colorSquare width
this.destwidth = wmodifier;
this.poswidth = id._width;
this.velwidth = this.velwidth*bouncefactor+(this.destwidth-this.poswidth)/speedfactor;
id._width += Math.round(this.velwidth);
// colorSquare height
this.destheight = hmodifier;
this.posheight = id._height;
this.velheight = this.velheight*bouncefactor+(this.destheight-this.posheight)/speedfactor;
id._height += Math.round(this.velheight);
// colorSquare x
this.destx = (stageWidth-wmodifier)/2;
this.posx = id._x;
this.velx = this.velx*bouncefactor+(this.destx-this.posx)/speedfactor;
id._x += Math.round(this.velx);
// colorSquare y
this.desty = (stageHeight-hmodifier)/2;
this.posy = id._y;
this.vely = this.vely*bouncefactor+(this.desty-this.posy)/speedfactor;
id._y += Math.round(this.vely);
// shadow properties
shadow._width = (colorSquare._width+20);
shadow._x = (colorSquare._x-10);
shadow._height = (colorSquare._height+20);
shadow._y = (colorSquare._y-10);
};
colorSquare.onEnterFrame = function() {
expand(this);
};

Thank you
Danny Keane

Danny keane
03-06-2005, 04:17 PM
Anyone?