Help me with SetShadow...

Monday, August 1, 2011 by wc2005 | Discussion: DesktopX Tutorials

Hi, everybody! Please look at my code a little:

Code: vbscript
  1. Sub Object_OnScriptEnter
  2.  Object.Text="SHADOW EFFECT TEST"
  3. End Sub
  4. Sub Object_OnMouseEnter
  5.  Object.States("").SetShadow True, 10, 255, 0, 0, rgb(255,0,0)
  6. End Sub
  7. Sub Object_OnMouseLeave
  8.  Object.States("").SetShadow False, 0, 0, 0, 0, 0
  9. End Sub

I want to create some text effect for my desktop. When my mouse is over that text object, it will have glow effect, but that text object changes its position as well which I don't want. I want to know if there is a way to keep its original position. I have just moved to DesktopX 3.5 (on Windows XP), that weird thing does not happen with DesktopX 3.1. Any suggestions? Thanks for your help!

 

  

sViz
Reply #1 Monday, August 1, 2011 8:53 AM

Yeah, some wonky things happen with object position relative to the screen coordinates in 3.5. Same 'movement' problem happens with object.rotation via script, and alignment is also malfunctioning. Very frustrating. These problems are fixed when you make the object a child of another object. (You can also set the parent object transparency to zero and use it as a mask.)

wc2005
Reply #2 Monday, August 1, 2011 11:08 AM

Thanks for your quick reply, sViz!

I did as you instructed (make that text object a child of another object) but that does not help. Was I wrong somewhere or there isn't a solution for this? If so, I am going to move back to DesktopX 3.1 which looks better.

You said Object.Rotation had the same problem, I tested that but it works fine for me. Any ideas? Thanks!

sViz
Reply #3 Monday, August 1, 2011 11:57 AM

Make sure child = yes? This is just a workaround; the unwanted object movement is definitely a bug.

 

Re object.rotation: it screws up on timer, unless its a child object -- LINK

 

wc2005
Reply #4 Tuesday, August 2, 2011 1:42 AM

 Thanks, sViz!

I try again as you ask and they  work fine. It's right as you said, just make it a child of another object and it works.

Generally, the only solution is just make it a child of another object to see if it works, if not, go back to DesktopX 3.1 (and now, I am enjoying DesktopX 3.1). Done.

DesktopX 3.5 is full of bugs, all of us hope the future versions would be better.

Thanks again, sViz! I have disturbed you a lot. Good time!

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01