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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Slider Question

Status
Not open for further replies.

lasynth

Technical User
Jul 4, 2002
8
US
Hi, all -

I'm trying to put the functionality into this example:


and have kind of fallen in over my head. I'm hoping someone might be able to point me in the right direction to get this accomplished.

As the user slides the pointer across the axis, certain points along the time line will trigger button instances. Those instances can then be clicked for other events.

Can anyone direct me to a tutorial that might help?

Greatly appreciated!

Synth
 
What are you after exactly? The slider or the clickable objects themselves.

Regards,

cubalibre2.gif
 
Thanks for the reply -

Just the slider. Of course that's assuming the clickables in the large box a just simple buttons.

Thanks again,

Synth
 
Thank you for the replies!

Aye, that is an excellent starting point, but unfortunately the other key component (the trigger places on the timeline) is equally as rough for me. Also, apologies if I'm not articulating the need adequately.

After exploring a bit, I'm also wondering if snapping to the time line increments wouldn't help simply this.

So, say user is sliding the pointer along the time line and gets to say the June area of 1942, there's a spot there that triggers an anim in the main window.

Am I describing this in an understandable way?

Thank again for your help and patience!

Synth
 
Can you post your .fla or e-mail it to me?
Hit my handle for an address...

Regards,

cubalibre2.gif
 
Going out for the night! Will look into it when I return or by morning...

Regards,

cubalibre2.gif
 
*bump*

Still really need help with this if anyone's able. I have the slide part, just need to know how to trigger events.

Thanks very much in advance!

Synth
 
Did look into your problem... But a bit hard to figure out all of what you really had in mind...
If you're talking about my slider link applied to your project, you could easily trigger events in the doSlide function(), by checking the position of the slider, or maybe better a range in the slider's position. The slider could then be told to snap to the exact position (year in your case I guess, and the event triggered after that. Drag should maybe be disabled until the display in the main screen is closed or if not, dragging the slider would automatically close any opened clip in the main screen.

If you want to check the slider's position, just add a trace action in the doSlide function, and code the rest from there with if statements, based on the position of the slider...

Code:
function doSlide() {
trace(_root.slideBar.slider._x);
//slider's _x property * 100 divided by 400(width of slider)
	var slidePercent = int((_root.slideBar.slider._x*100)/400);
	//holders _x property = (width of holder) divided by 100 * slider percentage
	//finaly multiplies by -1 to set the xpos to negative(left) and not positive(right)
	_root.holder._x = int((iTotalToSlide/100 * slidePercent) * -1);
}

Regards,

cubalibre2.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top