Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

website concept... 1

Status
Not open for further replies.

bubu

Programmer
Mar 3, 2002
463
RO
Hello guys...it's been a while.

I have came across this website and it really wimped my mind...

...how can everything be done?...so when you press abutton a movie is playing all the time(the hand with the logo) and after that slides to the next section ...and the menu (the sky) also slides but less than the content sections...i have done something like this on my old website(portfolio section) but i don't think this is the solution here...it's not just a slide...when you press the button that movie (with the hand) should rollon and after that the content slides...

I am waiting for your kiks :)

Thx a bunch![peace]

Regards,
Dragos.
 
Like this?


There are three clips: sky, scenery2, scenery1 and there are five 'star' buttons in the 'sky' clip. It's all one frame just add this code to the main timeline:

//button actions
Code:
sky.star1.onRelease = function() {
	doMove(0);
};
sky.star2.onRelease = function() {
	doMove(1);
};
sky.star3.onRelease = function() {
	doMove(2);
};
sky.star4.onRelease = function() {
	doMove(3);
};
sky.star5.onRelease = function() {
	doMove(4);
};
//move scenery
Code:
doMove = function (pos) {
// start move sequence
Code:
	inPlace = false;
	this.onEnterFrame = function() {
		dropPointer(pos);
	};
};
// 
dropPointer = function (pos) {
// do 'finger'
Code:
	pointer._y += 5;
	if (pointer._y>POINTERDOWN) {
		this.onEnterFrame = function() {
// finger is down so move background
Code:
			doSlides(pos);
		};
	}
};
raisePointer = function () {
	pointer._y -= 5;
	if (pointer._y<POINTERUP) {
// sequence is over
Code:
		this.onEnterFrame = null;
	}
};
doSlides = function (pos) {
// move background layers
Code:
	if (!inPlace) {
		slide(fore, pos);
		slide(mid, pos);
		slide(back, pos);
	} else {
// put finger back up
Code:
		this.onEnterFrame = raisePointer;
	}
};
slide = function (obj, pos) {
// actual moving code
Code:
	clip = obj.clip;
	targ = obj.targets[pos];
	var before = clip._x;
	clip._x += (targ-clip._x)/SPEED;
	var after = clip._x;
// is move over?
Code:
	inPlace = (Math.abs(before-after)<.01) ? true : false;
};
// variables, constants, objects etc
Code:
_global.inPlace = true;
_global.SPEED = 10;
_global.POINTERDOWN = 400;
_global.POINTERUP = pointer._y;
// objects hold the instances of the background clips and target positions to scroll to
Code:
_global.fore = {clip:this.scenery1, targets:[0, -400, -800, -1200, -1600]};
_global.mid = {clip:this.scenery2, targets:[0, -100, -200, -300, -400]};
_global.back = {clip:this.sky, targets:[0, -40, -80, -120, -160]};
//
stop();
 
What can i say... bravo![thumbsup2]

can you post the .fla too pls?...::)

Regards,
Dragos.


 
Sorry - I'm nearly at my bandwidth limit on my server so I don't want to put anything larger than the .swf up there.

Drop me your email and I can send it to you.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top