Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 3:37 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Right mouse up trigger
PostPosted: August 11th, 2006, 1:07 am 
Offline
User avatar

Joined: November 4th, 2004, 5:04 pm
Posts: 310
Location: New Zealand
Opus: Evolution 8.5
OS: Windows 7 Professional
System: AMD Phenom(tm) II X6 1055T Processor 2.80GHz
I want to trigger an event when releasing the right mouse button.

I have looked at the RegisterEventHandler in OpusScript help but cannot fathom how to do it.

Has anyone any ideas
I achieved what I wanted using the keypress - keyrelease actions
but I need to transfer that to the Right mouse up

Regards

Pete

_________________
Opus Evolution Pro user
Windows 7 Professional
http://www.petesmithiesmedia.com


For this message Pete Smithies has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: August 11th, 2006, 3:16 am 
Offline

Joined: October 26th, 2004, 1:26 pm
Posts: 262
Hi Peter,

Have a look in the Script HELP at: IsMousePressed()
I hope it should be able to do what you want. :-)

_________________
Cheers,
Steve


For this message Steve H has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: August 11th, 2006, 8:20 am 
Offline

Joined: November 11th, 2004, 4:05 am
Posts: 636
Location: Christchurch, NZ
Here's an example using RegisterEventHandler to work the right mouse button.

cheers
Paul


For this message Paul has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: August 11th, 2006, 11:03 am 
Offline

Joined: October 26th, 2004, 10:23 am
Posts: 666
Location: Digital Workshop
The standard Mouse Click triggers fire on release - the Mouse Down triggers fire on the press. You can just add a Right Mouse Click trigger and use that.

_________________
ddww Opus Developer


For this message Duncan Lilly has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: August 14th, 2006, 7:43 am 
Offline
User avatar

Joined: November 4th, 2004, 5:04 pm
Posts: 310
Location: New Zealand
Opus: Evolution 8.5
OS: Windows 7 Professional
System: AMD Phenom(tm) II X6 1055T Processor 2.80GHz
Duncan,

Many thanks - however I needed both the right mouse down and the right mouse up to perform the function - having just re-read your thread - I think you are implying that is exactly what the two events do?

However, Paul's RegisterEventHandler works perfectly - so I will go with that - many thanks Paul as ever.

Regards

Pete

_________________
Opus Evolution Pro user
Windows 7 Professional
http://www.petesmithiesmedia.com


For this message Pete Smithies has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: August 19th, 2006, 3:18 am 
Offline

Joined: October 26th, 2004, 1:26 pm
Posts: 262
Hi,

Not trying to improve on Paul's excellent example, but just showing how versatile Opus is. I've added a couple of extra options to achieve the same result. I hope my script is correct. :?

Paul's solution is obviously the best of course, but it was an exercise (excuse) for me to try anyway. :D


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

_________________
Cheers,
Steve


For this message Steve H has been thanked by : mackavi


Top
 Profile  
 
 Post subject:
PostPosted: August 19th, 2006, 7:57 am 
Offline
User avatar

Joined: November 4th, 2004, 5:04 pm
Posts: 310
Location: New Zealand
Opus: Evolution 8.5
OS: Windows 7 Professional
System: AMD Phenom(tm) II X6 1055T Processor 2.80GHz
Steve

This is excellent also.

For the project that I am working on it is important that I can use the right mouse down and right mouse release for two seperate actions so the examples you gave are great - particularly using the "is moused pressed"
I found the register event handler example hard to understand as I thought that I had to use all the code supplied in the help file
e.g.

var myEvent = image1.RegisterEventHandler("lclick", this.Move)

function Move(property)
{
var newXpos = property.x
var newYPos = property.y
Text.SetPosition(property.x,property.y,2.784)
}

When I tried this - I got nothing....

I didnt realise that I could simply use the method Paul wrote
i.e.

RegisterEventHandler("rmousedown", RMDown);

RegisterEventHandler("rmouseup", RMUp);


function RMDown()
{
b1.SetScale(1.5,1.5)
}


function RMUp()
{
b1.SetScale(1,1)
}

And actually - the right mouse down, right mouse click solution is the easiest of the lot

So thanks one and all

Pete

_________________
Opus Evolution Pro user
Windows 7 Professional
http://www.petesmithiesmedia.com


For this message Pete Smithies has been thanked by : mackavi


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 49 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