Digital Workshop

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Enlarge with mouse wheel
PostPosted: May 25th, 2019, 9:34 am 
Offline

Joined: February 11th, 2005, 1:03 am
Posts: 185
Location: Yorkshire UK
Opus: Pro 9.3
OS: Windows 7
I have an image on a page which I would like the viewer to be able to resize using the mouse wheel.
That is; select the image and use the wheel to enlarge or decrease.
I can't find a reference anywhere.

Any help please?

_________________
I'd like to begin by saying, " It gives me great pleasure.....
Plato award winner 1999.
Several computers.
HP - Phenom Quad 2.3Ghz; RAM 4Gb, Windows 7 - 64 bit; 3Tb collective Hard disks; Nvidia Geforce 9600 GSO; Opus 9.3; Tascam2488


For this message Kingell has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Enlarge with mouse wheel
PostPosted: May 26th, 2019, 6:52 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
There is no trigger built-in.

You have to create custom event handlers. It is in the help, but here's the outline:

Code:
var myEventUp = Frame.RegisterEventHandler("mousewheelup", this.MoveMeUp)
var myEventDown = Frame.RegisterEventHandler("mousewheeldown", this.MoveMeDown)

function MoveMeUp() {
Debug.trace("scroll up\n");

}

function MoveMeDown() {
Debug.trace("scroll down\n");
}


Where 'Frame' is the name of the object on the page to which you're attaching the event handler. The functions MoveMeUp / Down would contain your code to handle the scaling.

</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: Enlarge with mouse wheel
PostPosted: May 27th, 2019, 2:00 am 
Offline

Joined: February 11th, 2005, 1:03 am
Posts: 185
Location: Yorkshire UK
Opus: Pro 9.3
OS: Windows 7
Many thanks for your help offer but there is not enough information for me to proceed.
I'm afraid I need more details. Many thanks for your contribution so far. Where is the
information printed please?
Kind regards

_________________
I'd like to begin by saying, " It gives me great pleasure.....
Plato award winner 1999.
Several computers.
HP - Phenom Quad 2.3Ghz; RAM 4Gb, Windows 7 - 64 bit; 3Tb collective Hard disks; Nvidia Geforce 9600 GSO; Opus 9.3; Tascam2488


For this message Kingell has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Enlarge with mouse wheel
PostPosted: May 27th, 2019, 2:02 am 
Offline

Joined: February 11th, 2005, 1:03 am
Posts: 185
Location: Yorkshire UK
Opus: Pro 9.3
OS: Windows 7
"It is in the help"
Many thanks but what do I type to find it please?
Regards

_________________
I'd like to begin by saying, " It gives me great pleasure.....
Plato award winner 1999.
Several computers.
HP - Phenom Quad 2.3Ghz; RAM 4Gb, Windows 7 - 64 bit; 3Tb collective Hard disks; Nvidia Geforce 9600 GSO; Opus 9.3; Tascam2488


For this message Kingell has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Enlarge with mouse wheel
PostPosted: May 27th, 2019, 2:17 am 
Offline

Joined: February 11th, 2005, 1:03 am
Posts: 185
Location: Yorkshire UK
Opus: Pro 9.3
OS: Windows 7
I'm writing a presentation programme for a Parish Council planning meeting.
I need to scroll a mouse to enlarge the image.
My image is in a frame in a MultiFrame - Image_3
The MultiFrame is already scrolled but I would also like to use a mouse wheel
to enlarge/reduce Image_3.
Sorry. I can't persuade the code to copy here.
Regards

_________________
I'd like to begin by saying, " It gives me great pleasure.....
Plato award winner 1999.
Several computers.
HP - Phenom Quad 2.3Ghz; RAM 4Gb, Windows 7 - 64 bit; 3Tb collective Hard disks; Nvidia Geforce 9600 GSO; Opus 9.3; Tascam2488


For this message Kingell has been thanked by : mackavi


Top
 Profile Visit website  
 
 Post subject: Re: Enlarge with mouse wheel
PostPosted: May 30th, 2019, 1:50 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Event Handler attached to an image object called 'apple'. wheel shrinks / enlarges image.

Code:
var myEventUp = apple.RegisterEventHandler("mousewheelup", this.MoveMeUp)
var myEventDown = apple.RegisterEventHandler("mousewheeldown", this.MoveMeDown)
scale =1
function MoveMeUp() {
scale = scale + 0.1;
apple.SetScale(scale,scale,0,false)

}

function MoveMeDown() {
if (scale >0.2) scale = scale - 0.1;
apple.SetScale(scale,scale,0,false)
}


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


For this message mackavi has been thanked by : Kingell


Top
 Profile Visit website  
 
 Post subject: Re: Enlarge with mouse wheel
PostPosted: May 30th, 2019, 4:14 pm 
Offline

Joined: February 11th, 2005, 1:03 am
Posts: 185
Location: Yorkshire UK
Opus: Pro 9.3
OS: Windows 7
Many thanks - it's a few years since I programmed and I'm a bit rusty but
I'll give this a go.
"mouse click - call function"?
I have many pages so I presume that when I move on
the function will exit.
Very kind of you to help - thanks again.
Kind regards :lol:

_________________
I'd like to begin by saying, " It gives me great pleasure.....
Plato award winner 1999.
Several computers.
HP - Phenom Quad 2.3Ghz; RAM 4Gb, Windows 7 - 64 bit; 3Tb collective Hard disks; Nvidia Geforce 9600 GSO; Opus 9.3; Tascam2488


For this message Kingell has been thanked by : mackavi


Last edited by Kingell on May 30th, 2019, 4:38 pm, edited 1 time in total.

Top
 Profile Visit website  
 
 Post subject: Re: Enlarge with mouse wheel
PostPosted: May 30th, 2019, 4:37 pm 
Offline

Joined: February 11th, 2005, 1:03 am
Posts: 185
Location: Yorkshire UK
Opus: Pro 9.3
OS: Windows 7
Brilliant! It does exactly what I want.
I can even drag the image around using
the programme's own facilities.
Many thanks again.
Kind regards :D

_________________
I'd like to begin by saying, " It gives me great pleasure.....
Plato award winner 1999.
Several computers.
HP - Phenom Quad 2.3Ghz; RAM 4Gb, Windows 7 - 64 bit; 3Tb collective Hard disks; Nvidia Geforce 9600 GSO; Opus 9.3; Tascam2488


For this message Kingell has been thanked by : mackavi


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

All times are UTC [ DST ]


Who is online

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