Slide menus again

This is a discussion on "Slide menus again" within the Flash & Multimedia Forum section. This forum, and the thread "Slide menus again are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Flash & Multimedia Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Aug 15th, 2005, 12:03
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbacardi Send a message via Skype™ to benbacardi
Slide menus again

I have this: www.bpcu.co.uk/slide.html

and i want it to go backwards!

currently this is the code: for the buttons:

Code: Select all
on (release) {
	if (content.flag != "one") {
		direction1 = 1;
		content.flag = "one";
		content.play();
	}
}
and for the actual scroll thing, on each key frame there is

Code: Select all
if (flag == "one") {
	stop();
}
where "one" is different for each button and keyframe, if you get me. this way, it scrolls forwards, but always goes forwards...

i tried putting actionscript on its own layer at the top of the scroll thing saying

Code: Select all
if (_root.direction1 == 1) {
gotoAndPlay(previous);
}
but that doesnt work. any suggestions?
Reply With Quote

  #2 (permalink)  
Old Aug 16th, 2005, 04:41
Reputable Member
Join Date: Sep 2004
Posts: 144
Thanks: 0
Thanked 0 Times in 0 Posts
I'm very tired and honestly I don't feel like writing the code for this, but let me see if I can explain how to do this... (remember, very tired )

Ok, first of all with a slider you have to set the x location of where you want to start and stop. So, Let's say that you have 3 buttons.

Button 1 : x=0;
Button 2 : x=100;
Button 3 : x=200;

So, when you press button 3 you set the object in motion and make it stop when/where x = 200. If x = 200 then you do nothing.

Let's Say that x = 200, and you press button 2. Now you find out what x is = to. So If x < 100 Motion is positive. If x > 100 Motion is Negative. if x = 100 do nothing.

Hope this explains this well enough where you can put the code together, if not I will try and put something together for you to better explain it, or maybe someone else can explain this motion a little better than I. Remember, x is the Horizontal Location of the object.
Reply With Quote
  #3 (permalink)  
Old Aug 16th, 2005, 07:59
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbacardi Send a message via Skype™ to benbacardi
yea, thanks John, but i know how to tell Flash which way it should go... getting it going that way is the problem! i cant get the movie to play backwards
Reply With Quote
  #4 (permalink)  
Old Aug 16th, 2005, 09:17
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
The only way to get Flash to play backwards is to use a gotoAndPlay(previous); on each frame that you want Flash to go backwards through. So as you can see this would get quite messy. Your best bet (if you want this approach) is to use a seperate movieclip to go to the previous frame over and over until you reach the frame you want to reach. This would be less messy!

JohnMitch was actually describing an alternative way to do this. Instead of having the animation keyframed, you can get Flash to move the content for you, that way it's no problem to go forwards or backwards.

This is pretty old code, but here goes:
Code: Select all
onClipEvent (enterFrame) {
	seekTargX = _root._xmouse-5;
	seekTargY = _root._ymouse-_height/2;

	// move slider into position
	// along x
	dX = seekTargX-_x;
	_x += dX/4;
	// along y
	dY = seekTargY-_y;
	_y += dY/4;
	updateAfterEvent();
}
In this example, this code is placed ON the movieclip you want to move. You can change that pretty easily if you like. Instead of _x and _y you'd have movieclipname._x etc.

seekTargX and seekTargY set the x and y co-ordinates that you want the movieclip to go to.

_x +- dX/4 moves along the x co-ordinates but only by dX/4. dX is the distance between the current position and seekTargX. This has the effect of slowing you down as you get nearer. You can make this effect more or less dramatic by changing the number that dX is divided by.

As you can probably figure out, you can change seekTargX and it's sibling pretty easily externally, ( movieclipname.seekTargX ) and so affect the movement of the movieclip...
Reply With Quote
  #5 (permalink)  
Old Nov 18th, 2005, 07:37
New Member
Join Date: Nov 2005
Age: 28
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Slide menus again

Hi people! You know recently i have found the proggy that converts images to SWF Flash,i advise you it.Its really nice proggy and easy to manage
Here is the link:http://geovid.com/Flash_SlideVidShow/
Reply With Quote
Reply

Tags
slide, menus, again

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
High Slide? byrd80 JavaScript Forum 2 Mar 21st, 2008 20:02
Slide up and down DregondRahl JavaScript Forum 6 Oct 30th, 2007 21:10
slide slide slid Bcullen JavaScript Forum 9 Oct 2nd, 2007 10:02
Slide show/s :) OmiE Flash & Multimedia Forum 4 May 25th, 2007 04:55
Will it slide beneath? marksk Web Page Design 7 Apr 26th, 2007 08:58


All times are GMT. The time now is 07:45.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43