Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 15th, 2025, 10:13 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Constraining drag motion
PostPosted: April 1st, 2005, 10:40 pm 
Offline

Joined: November 3rd, 2004, 2:22 pm
Posts: 54
Location: Kent, Ohio, USA
I am looking to create some sort of slider. I would like to use a graphic or a frame with bevels and backgrounds that the user can grab and drag to either move along a timeline or adjust some other property. Can an objects movement when dragged be constrained to a straight line, whether horizontal, vertical, etc.?

_________________
Tom Hutchins
The Davey Institute
Kent, OH
800-445-8733
http://www.davey.com

Opus ProXE 5.5
Windows XP SP2


Top
 Profile Visit website  
 
 Post subject:
PostPosted: April 1st, 2005, 10:49 pm 
Offline

Joined: November 4th, 2004, 4:55 am
Posts: 64
Location: New York
This continues to be an issue, in my opinion.

I've tried scripting (with a very well written & documented file, courtesy DW) and I've tried using scrollbars (removing arrows and altering the thumb, etc., in order to tailor it). Nothing works easily -- no matter what, I always feel that I'm doing a "workaround" to get the function. If it's any comfort, a friend who just worked with a similar issue in a competing authoring program expressed the same frustration. Maybe this is due to an inherent issue related to creating sliders.

Hey DW! ~ Any possibility of a downloadable template to deal with this? It sure would be a nifty treat.

_________________
Robert Gengerke
Magic Box Communications, Inc.
Video & Interactive | Design & Production


Top
 Profile  
 
 Post subject:
PostPosted: April 4th, 2005, 3:21 pm 
Offline

Joined: October 25th, 2004, 12:27 pm
Posts: 526
Location: Digital Workshop
Hi,

Thank you for your enquiry.

Please find an example Opus Pro 04 publication which demonstrates one way to create a slider control using script functions. Although possible, I tend to advise against using framed objects for sliders as not only do you need to factor the width, height and position of the parent frame into any SetPosition() actions, but the edges of the draggable object will disappear when they reach the edges of the frame.

To use this example slider in your publication, simply copy and paste all of the object (including the Script object) from my publication to the required page in the target publication.

If you do not want the percentage to be shown above the slider, simply delete the Text object, then delete the following actions from the percent() function:

Code:
Text.SetSelection(0,-1)
Text.ReplaceSelection(pospercent)


You can now use the pospercent variable in conjunction with your desired actions. For example, to change the volume of a sound file, you could use the following action:

Code:
SetVolume("Wave", pospercent)


The master volume will now be set to 0% when the slider is at the left-hand edge and 100% when positioned at the right-hand edge.

I hope this helps. Please do not hesitate to contact me if you have any further queries.

Kind regards,


You do not have the required permissions to view the files attached to this post.

_________________
Robin Garrett
Digital Workshop Technical Support


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group