opacity value of the desktopX.object

Sunday, April 10, 2005 by Malice12 | Discussion: DesktopX

Has any one tried to use the opacity method of the desktopX.object class? I've written the following bit of code, it simply moves the object across the screen and makes it slowly disappear. Or it's supposed to. When I run this code the object moves ok, but the opacity isn't updated. When I uncomment the msgbox line below it works perfectly. Is there some kind of refresh method that I need to call?

Also, I'd like to avoid using a "sleep" call to slow this function down as it stalls all my other desktopX object at the same time. What's the best way to "pause" one desktopx object and release the process so that it can do other things?

Any and all help appreciated.


Function Object_OnLButtonDown(x, y)
desktopx.Object("YBar").left = 810
desktopx.Object("YBar").Opacity =100
counter = 0
For i = 1 To 100
desktopx.Object("YBar").left = 810 - i*8
counter = counter + 1
If counter = 10 Then
counter = 0
desktopx.Object("YBar").Opacity =100-i
'msgbox desktopx.Object("YBar").Opacity
End If
Next
desktopx.Object("YBar").left = 810
desktopx.Object("YBar").Opacity =100
End Function
Malice12
Reply #1 Monday, April 11, 2005 7:37 PM
The answer to both my question seem to be the object.sleep(int) method. When you're repeatedly calling a desktopx value in a loop like this it seem to work best if you include the line "Object.Sleep 1" in the For loop somewhere.

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