Digital Workshop

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: setLayer() function
PostPosted: December 17th, 2005, 11:37 pm 
Offline

Joined: November 11th, 2004, 1:43 pm
Posts: 172
Location: Buckinghamshire, UK
Please see .imp, having two problems to bring to top layer a dragged object by setting its layer position to 0.
The second item is way of running a set script when a object drag/drop has been initiated. Have put more details in the .imp file
Thanks


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


Top
 Profile  
 
 Post subject:
PostPosted: December 18th, 2005, 6:01 am 
Offline

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

You are using Drag and Drop (well Drag anyway), on the object. Any object "whilst it is dragged" has focus and will appear on top, until you let go of the mouse. Try modifying your script on Image3 to:

Image3.SetLayer(+1)
//instead of this.Object.SetLayer(0)

Also on Image3, instead of using Mouse-Over, (since it is draggable), try using the trigger "Left-Mouse-Down" for your scripting, then also add a typical "Left-Mouse-Click" and copy the scripting again to that trigger with the layering script.

I'm not sure if that's what you want, but it seems to work.

Others may have better ideas, as I'm no expert OpusScripter!!

_________________
Cheers,
Steve


Top
 Profile  
 
 Post subject:
PostPosted: December 18th, 2005, 7:46 am 
Offline

Joined: October 25th, 2004, 3:03 pm
Posts: 540
Location: Tyalgum Creek. Australia
Opus: Opus Pro Latest version 9.02 Build 16458
OS: Won 10
System: Asus laptop Intel Core i5 8 gig ram, big monitor, reading glasses
Steve H wrote:

Others may have better ideas, as I'm no expert OpusScripter!!




No way!!!!!!!!!!!!!

Our modest Steve H is the best Opusscripter that I know of on the east coast of Australia! :D

Cheers

Graham

_________________
Too much coffee can result in frequent toilet breaks!


Top
 Profile  
 
 Post subject:
PostPosted: December 18th, 2005, 8:37 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi eomc40

Can't seem to get a message sent to you from my Forum outbox. Is your message inbox full? :?:

Kind Regards,
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: December 19th, 2005, 1:13 am 
Offline

Joined: November 11th, 2004, 1:43 pm
Posts: 172
Location: Buckinghamshire, UK
Thanks Steve H, will have a check on suggestions


Top
 Profile  
 
 Post subject:
PostPosted: December 19th, 2005, 3:21 pm 
Offline

Joined: November 11th, 2004, 1:43 pm
Posts: 172
Location: Buckinghamshire, UK
Steve H
Thanks Steve, have implemented suggestion and they work fine.
The pointers appear as expected now, but am wondering, now that I can move Image3 over Image4, and having set the setlayer() of image3, how come on next drag event meant for Image3, does move Image4?
Thanks

Updated .imp


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


Top
 Profile  
 
 Post subject:
PostPosted: December 19th, 2005, 6:46 pm 
Offline

Joined: October 26th, 2004, 10:23 am
Posts: 666
Location: Digital Workshop
The SetLayer() function changes the display order for an object, not it's page order (which is what the drag and drop works with). I'm afraid it is not possible to change the page order of objects at runtime.

_________________
ddww Opus Developer


Top
 Profile Visit website  
 
 Post subject:
PostPosted: December 20th, 2005, 9:23 am 
Offline

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

To add to Duncan's reply, I also noticed that when an object is "dragged", that any previous layering applied to that object, is reset. (which Duncan has stipulated by it's page order)

However there is an easy workaround in your case by using Enable(). Modify your script action on your image3 object and include the following script at the beginning of each trigger...


//---------LEFT Mouse Down------

Image4.Enable(false)



//---------LEFT Mouse CLICK------

Image3.SetLayer(+1)
Image4.Enable(true)


//What happens above is as image3 is dragged (left-mouse-down) the image4 is disabled. But so you can have access to image4 (if need be) the "letting go" of the mouse (left-click) makes image4 enabled again. ;)

Opus is such a versatile program!!! :D

_________________
Cheers,
Steve


Top
 Profile  
 
 Post subject:
PostPosted: December 20th, 2005, 11:34 am 
Offline

Joined: October 26th, 2004, 10:23 am
Posts: 666
Location: Digital Workshop
Steve H wrote:
Image3.SetLayer(+1)

Just in case you are operating under a misaprehension here; this is simply setting the object to layer 1 - not adding 1 to the layer value.

SetLayer() pays no attention to the current layer state, it simply sets it, and +1 evaluates as 1. If you really want to move the object up one layer you would need to do this:

Code:
Image3.SetLayer( Image3.GetLayer() + 1 )

_________________
ddww Opus Developer


Top
 Profile Visit website  
 
 Post subject:
PostPosted: December 20th, 2005, 11:54 am 
Offline

Joined: November 11th, 2004, 1:43 pm
Posts: 172
Location: Buckinghamshire, UK
Thanks Steve N and Duncan for clarification of setlayer.... Will post the pub in Showcase when completed with the other items am playing with....
Thanks again,


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

All times are UTC [ DST ]


Who is online

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