Help me with SetShadow...

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!

 

  

12,548 views 4 replies
Reply #1 Top

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.)

Reply #2 Top

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!

Reply #3 Top

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

 

Reply #4 Top

 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!