Digital Workshop

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Mouse Wheel Function
PostPosted: September 20th, 2007, 10:03 am 
Offline

Joined: May 24th, 2007, 11:02 am
Posts: 132
Location: UK - Wales - Ceredigion
Opus: illuminatus > Evolution
OS: Windows 10 Pro
System: i7 8GB RAM
Does anyone know how this function may be added?

I have found this nice javascript: http://demos.mootools.net/Mousewheel and would like to do this in opus. Any ideas?


For this message jezjones29 has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 20th, 2007, 10:19 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Use RegisterEventHandler() command

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: September 21st, 2007, 4:08 pm 
Offline

Joined: May 24th, 2007, 11:02 am
Posts: 132
Location: UK - Wales - Ceredigion
Opus: illuminatus > Evolution
OS: Windows 10 Pro
System: i7 8GB RAM
Thank you for the pointer

Here is my script.

Add an image (in this example 'Image1'), then add the following script. Now when you roll the mouse ball the image will grow or shrink.

Code:
var myEvent = RegisterEventHandler("mousewheelup", Grow)

function Grow(property)
{
Image1.Scale(0.1, 0.1,1)
}


var myEvent = RegisterEventHandler("mousewheeldown", Shrink)
function Shrink(property)
{
Image1.Scale(-0.1, -0.1,1)
}


For this message jezjones29 has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject:
PostPosted: September 21st, 2007, 4:27 pm 
Offline
Godlike
Godlike
User avatar

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

Glad it helps - a useful command.

FYI you don't need to include the 'properties' agrument for you functions. This is only necessary if you are going to use the mouse / key properties passed.

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  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 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