Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 10:25 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Drag only on X axis
PostPosted: February 11th, 2010, 7:41 pm 
Offline

Joined: May 16th, 2008, 4:50 pm
Posts: 368
Location: Berghem The Netherlands
Opus: Opus Pro 9.75
OS: Windows 10
System: `HP
I have to drag a picture behind a sort of window.
It only needs to move from left to right.
When i use the drag and drop option the picture can be dragged all over the scene. Any suggestions?

Regards,

Ad

_________________
Opus Pro v9.75
Windows 10 on HP EliteBook i7
http://www.csnmedia.nl


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 11th, 2010, 8:49 pm 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Try putting the image object in a Frame whose height is same as the image. The Frame's width can be larger than the page width if you want.

This type of question is better posted in Basic section.



.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: February 11th, 2010, 11:29 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Lar_123 wrote:
This type of question is better posted in Basic section.


Not so. There is no containment element to objects. You'd have to script this by tracking the mouse position and using the set position of the object on the axis required.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 12th, 2010, 1:36 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Quote:
Not so. There is no containment
Absolutely correct. I had the wrong impression. Object is only constrained while in the Editor mode. (now I've got to go 'fix' a slider somewhere I made some time ago.)

Ad, OpusPro Basic Gallery has a Linear Slider object you could adapt. Also if you Search the forum for 'slider', you will find other examples/downloads. Either may have the code Mack mentioned about tracking the Mouse X_position.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: February 12th, 2010, 2:13 am 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
here's a basic scripted version of a constrained drag...
The script is not as 'basic' as one might expect, because we have to bypass Opus's built in drag mechanism.

I am fairly sure I've seen a simple constraining method using a frame, but I can't remember where I saw it...

Paul


Top
 Profile  
 
 Post subject:
PostPosted: February 12th, 2010, 9:46 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
paul wrote:
I am fairly sure I've seen a simple constraining method using a frame, but I can't remember where I saw it...


Paul's right, it is possible to create this effect using non-scripted elements but doing it with code allows a greater flexibility and releases you from the normal confines of drag n drop. Definitely worth learning :-)

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: February 12th, 2010, 8:11 pm 
Offline

Joined: May 16th, 2008, 4:50 pm
Posts: 368
Location: Berghem The Netherlands
Opus: Opus Pro 9.75
OS: Windows 10
System: `HP
Thanks for your reactions.



Ad

_________________
Opus Pro v9.75
Windows 10 on HP EliteBook i7
http://www.csnmedia.nl


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 28 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