Personally, I would script the animation. You need to use on state change either way. Let's see if the complete script posts this time! [code="vbscript"] ' States: ' normal ' left ' right ' top ' bottom 'Called on mouse over object Sub Object_OnMouseEnter Call CursorPos End Sub 'Called when mouse leaves object Sub Object_OnMouseLeave Object.Sleep 500 ' Pause for half a second to allow mouse to move Call CursorPos<br/
SirSmiley
IMO a timer is overkill for this. Originally I did a timer but, you still need to pause then call another procedure to adjust the x,y positions and the timer runs for no reason. Where a timer would be good is if you wanted to add keyboard control and monitor key presses. Eg. Mouse left down, Mouse left up, Mouse left over, etc.
Create five states named below 1. normal 2. left 3. right 4. top 5. bottom Use this code [code="vbscript"] 'Called on mouse over object Sub Object_OnMouseEnter Object.Sleep 500 ' Pause for half a second to allow mouse to move Call CursorPos End Sub Sub CursorPos posX=System.CursorX ' Cursor Left posY=System.CursorY ' Cursor Top objX=Object.Left ' Object's Left Position objX2=Object.Right ' Object's Right Position
Did you get a permission note from your mommy? If not then I expect to see you here promptly everyday mister! ;p Enjoy your vacation. :)
Sadly, I'm a little disappointed...as I figured you'd be stubborn enough to hold on until Independence Day. :D Either way Happy Birthday you old croaker!
Of course you/anyone can use this or any script that I post in the forums in your object, widgets, themes, or gadgets.
Wow, another enjoyable entertainer gone. I will miss his wit.
Yes, it will crash if you run the timer constantly, also your memory usage will skyrocket. Timer's are meant to run for a specific period of time to complete a routine/function and then end. Here ya go with a Left click function to enable/disable it. [code="vbscript"]Dim Speed, blnActive Speed=1000 ' This is the time in milliseconds between changing colors blnActive=True ' Indicates to start color change on Script Enter 'Called when L-click is released
[code="vbscript"] Dim Speed,Duration Speed=100 ' This is the time in milliseconds between changing colors Duration=2000 ' This is the time in milliseconds before ending the automatic color changing 'Called when L-click is released Function Object_OnLButtonUp(x, y, dragged) If Not dragged Then Object.SetTimer 1, Speed Object.SetTimer 2, Duration End If End Function Sub Object_OnTimer1 'Store the current hue in variable huesh
:CONGRAT: Happy Birthday! :)
That's for Vista user only right? Your using .Net and activeX controls, I can't imagine the "magnets" are that resource friendly?
I've never cared for that feature and always used DownloadThemAll but, I'm on Dial Up. Hands down Opera is the fastest browser out there. As for straight browser downloading IE7 and Opera both beat FF2 and FF3 on my box.
[quote]At least you know that, if trapped in the Andes, *I* might think twice about you "having an accident" and being "put out of your misery.[/quote] ...umm in that situation I wouldn't volunteer the bit about being a vegetarian, I suspect grain fed people would taste a whole lot better! ;p
[quote]Zubaz *IS* a vegetarian[/quote] Yea! More meat for me...oops that might be taken the wrong way? :p Don't you live Texas?
[quote]Well someone gave me Karma and put 4 little kisses after it.[/quote] I would've given ya 4 little Fairies! :d
[quote]Whatever.[/quote] Exactly. ;) One thing I don't think someone is illiterate if English isn't their first language. It would be no different than me try to speak/write my extremely poor French (sorry Mrs. Youngblut!) to Quentin, he'd probably read it and go wtf? :D
Additional there are some other obvious and not the primary reasons. International Laws, Tax laws, etc, etc. Government's are looking for ways to enforce tax collection and mostly to get more of everyone's money. Frankly, I think a big step for this would be some form of treaty to be arrived at but, sadly we know how long things take at both the UN and World Bank. Most likely we'll be flying around in space cars before they catch up with things. ;)
Yep, just put this script into the button you want to control the sounds with. You need to put the object names in the quotation marks not the sound files. You can just add those through the DesktopX Gui like you normally would.
Forget the question about the parent objects. Using the object.volume makes more sense. This should work [code="vbscript"] ' Declare Boolean Dim blnMute Function Object_OnLButtonUp(x, y, dragged) If Not dragged Then If blnMute=False Then' Turn on Sounds blnMute=True DesktopX.Object("object1").Volume=100 DesktopX.Object("object2").Volume=100 DesktopX.Object("object3").Volume= 100 DesktopX.Object("object4").Volume=100 DesktopX.Object("o
Do the objects you want to change the sounds on have the same parent object? Actually, if you just want to turn the object sounds on/off then object.volume might be better. Was looking and hoping for an object.mute namespace but, it's actually just object.volume=0
[quote]Hmmm... I see that you tried to play 5 sounds simultaneously. Seems this is impossible... What the error message have you received?[/quote] :D Ha ha...guess I spent to much time on the computer. Forgot that there is no "set sound" option and it only plays. I'm dead tired but, should have something for you soon. Edit: PS you also didn't close off all the If Statements; so, add another "End If" on a line above the End Function
Yeah that would go into the sound toggle button. I'm going to break the script down easier. If you're going to package a theme then make sure the sound files are attached via the custom files option. This should do the job. [code="vbscript"] ' Declare Boolean Dim blnMute Function Object_OnLButtonUp(x, y, dragged) If Not dragged Then If blnMute=False Then ' Turn on Sounds blnMute=True DesktopX.Object("object1").Sound="C:\mysoundfile.wav" ' If
I use boolean variables in the Birthday Widget that's in the works. The main question is does each object have a different sound. This will work if all objects have the same sound. [code="vbscript"] ' Declare Boolean Variable & Set Dim blnMute : blnMute = False ' Declare & Set Sound File Dim oSndFile : oSndFile = "C:\mysoundfile.wav" Function Object_OnLButtonUp(x, y, dragged) If Not dragged Then For Each Item In DesktopX.GroupObjects("grpMyObje
If all the items are in a group, let me throw another one out there. ;) Same as Vlad's but, without array, etc. [code="vbscript"] Function Object_OnLButtonUp(x, y, dragged) If Not dragged Then 'Store the current hue in variable hueshift = Object.hue 'If current hue is equal to or greater than 255 'reset to 0 If hueshift => 255 Then hueshift = 0 'If hue is not yet 255, keep adding Else hueshift = hueshift + 7 End If ' Set the Object Hue<
This should fix the column issue. *Cough* I've done away with the widget closing but, you most likely will have to close it by the close button or from the tray icon. It will loop sliding up/down...for some reason this strikes me as funny and I'm sure anyone who's scripted something knows how it goes. Everything works perfectly, then for no apparent reason BAMMM. Anyways, it's great to get the feedback especially on something this size. [link="http://www.box.net/shared