Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently September 30th, 2024, 11:35 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: to prevent an object to be dragged out of a frame
PostPosted: September 3rd, 2011, 10:15 am 
Offline

Joined: August 5th, 2010, 1:42 pm
Posts: 109
Opus: Creator v9 Opus v7
OS: windows
How can I prevent an object to be dragged out of a frame? I don't want to use the option "return to original position if not dropped" because I want the object to be positioned anywhere into the frame.
So far the draggable object can go outside the frame and with a black background the object disappear. How can I prevent that?
Thanks

Opus XE 5


For this message Isma has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: to prevent an object to be dragged out of a frame
PostPosted: September 3rd, 2011, 10:36 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Hi Isma,

I think this needs to be done via script as it's not an option in Opus. I don't have access to Opus 5 on this machine so cannot post an example but something like:

1. Add trigger - mouse click - to object

2. Add script that gets object's position. Checks this position against boundaries of frame. Returns object if outside boundaries.

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: Re: to prevent an object to be dragged out of a frame
PostPosted: September 3rd, 2011, 12:14 pm 
Offline

Joined: August 5th, 2010, 1:42 pm
Posts: 109
Opus: Creator v9 Opus v7
OS: windows
Thanks again Mack. If you have the oportunity to send me an example I would really apreciate it, becuase I cannot program scripts but I can change parametres of easy ones as I did sometime ago with one you sent me. Opus xe can open examples made with 7.


For this message Isma has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: to prevent an object to be dragged out of a frame
PostPosted: September 3rd, 2011, 2:14 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
Isma,

That's an interesting problem. Perhaps you can manage it with some standard triggers and actions.

What I would try: Create 4 narrow or long rectangles, and place them over the sides of the Frame.

For a Trigger, the most simple approach is to use 'Collision Entered' for the object being dragged... and check all 4 of the boundary rectangles. For an Action, you can either Disable the dragged object to stop it in place, or you can Move it where you want. A bit more sophisticated solution would be to have 4 triggers and detect collision enter separately for each of the 4 boundary rectangles. Then you can Move the dragged object in X or Y specifically for that boundary.

Hope that helps.

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


For this message Lar_123 has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: to prevent an object to be dragged out of a frame
PostPosted: September 3rd, 2011, 4:22 pm 
Offline

Joined: August 5th, 2010, 1:42 pm
Posts: 109
Opus: Creator v9 Opus v7
OS: windows
Thanks Godlike,

I have tried both possibilities, and 2nd one works ok, not perfectly but works.


For this message Isma has been thanked by : mackavi


Top
 Profile  
 
 Post subject: Re: to prevent an object to be dragged out of a frame
PostPosted: September 4th, 2011, 3:05 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
I thought the methods works when I first tried them. I just reran them in Preview and find it either does not work, or does not work well. I think the speed of User dragging is a factor. I cannot think of others ways currently. You may need to try Mackavi's suggestion and use scripting.

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


For this message Lar_123 has been thanked by : mackavi


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot] and 2 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group