Indigo Rose Software

Professional Software Development Tools

 
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 22
  1. #1
    Join Date
    Dec 2005
    Posts
    7

    Grin Repeat until button released

    Is there a way to have a button "repeat" an action like turning up the video players volume while it is being held down and then stop when the button is released? I am looking to be able to turn up the volume gradualy until the button is released thus keeping from having to "click" "click" "click"......

    Can you please give an example if possible? Thanks

    P.S I would like to refrain from using a slider.
    Thanks!!

  2. #2
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    One way would be to use Flash .
    Another would be to use Worm's Mouse.dll. There are a few posts about it on the forum.

    Yossi

  3. #3
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    No need for the DLL in v6.
    Attached Files

  4. #4
    Join Date
    Jun 2002
    Location
    Israel
    Posts
    1,843
    Right Worm. I forgot about this Page Event.
    Thanks

    Yossi

  5. #5
    Join Date
    Dec 2005
    Posts
    7

    Talking Repeat until button released

    Wow! Thanks for the fast reply. I'll give er a try and let you know if this works for me.
    Cool Beans Man..

  6. #6
    Join Date
    Dec 2005
    Posts
    7

    Repeat until button released

    Thanks yosik and worm.
    One last question cause I'm a total nube.
    How do I get it to actually controll the volume?
    The buttons work fine but don't controll the volume on my video.
    Is there some extra code I need to add?
    Thank's for your time.

  7. #7
    Join Date
    Dec 2005
    Posts
    7

    Additional information

    I tried adding this to the buttons on click event.

    MediaPlayer.SetVolume("Plugin1", MediaPlayer.GetVolume("Plugin1")+nVol);

    It does controll the volume but sets it to 100% as soon as I click.
    Am I even close? Thanks for your time.

  8. #8
    Join Date
    Oct 2005
    Location
    American Dubai
    Posts
    629
    Quote Originally Posted by yosik
    One way would be to use Flash .
    Another would be to use Worm's Mouse.dll. There are a few posts about it on the forum.

    Yossi
    Sorry to interupt but which thread holds this dll ?
    I cannot follow worm's example because i use the timer event for other functions.

  9. #9
    Join Date
    Dec 2005
    Posts
    7

    Thumbs down With a little guidence I'd be a genius!

    Worm, I just totally blew my own mind.
    Why you ask? Well, I have absolutely no programming knowledge period outside some decent html skills that were self taught. Can you believe I figured out what I needed to do! Check this out.....
    I added this to your code in the "on timer"

    result = nVol
    MediaPlayer.SetVolume("Plugin1", result);

    result = MediaPlayer.GetVolume("Plugin1");
    Label.SetText("Label1", result)

    Totally works. Hey pat myself on the back man!
    Thanks for the help and the boosted confidence!

  10. #10
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Awesome Job!

    It is amazing what one can do with AMS with little or no programming experience. To me, it is one of the greatest marvels of the application. For instance, you imply you have little or no programming/scripting experience, yet you were able to figure out what needed to be done. I, on the other hand, do quite a bit of programming/scripting in my daily life, yet am challenged by the very same software.

  11. #11
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Quote Originally Posted by Mina
    Sorry to interupt but which thread holds this dll ?
    I cannot follow worm's example because i use the timer event for other functions.
    Use a series of IF statement in the On Timer to allow for multiple events. Otherwise you'll be cutting the use of the timer significantly by limiting to one purpose.

  12. #12
    Join Date
    Dec 2005
    Posts
    7

    Grin I found a small glitch.

    Worm, Thanks for the complement.
    The only thing I have noticed with my adding to your great example is that now if I grab the slider on windows media player it's stuck it refuses to move as if the code is forcing it back to 50% volume. Can you figure out why? That is beyond my skill as of now.
    Thanks again keep up the good work.

  13. #13
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    More than likely its the positioning of your statements in the On Timer event. The idea is to only set the volume in the On Timer event when the mouse button is down on the button. If you have the SetVolume action outside of the ifs then the volume is being set everytime the On Timer event is fired.

    See the attached example.
    Attached Files

  14. #14
    Join Date
    Dec 2005
    Posts
    7

    Thumbs up Oh, OK I see now.

    Quote Originally Posted by Worm
    More than likely its the positioning of your statements in the On Timer event. The idea is to only set the volume in the On Timer event when the mouse button is down on the button. If you have the SetVolume action outside of the ifs then the volume is being set everytime the On Timer event is fired.

    See the attached example.
    I totally forgot to think about the fact that the scripting will do what it's told in numerical order. I'll study your example later when I get a chance.

    Hopefully this thread will be very helpful to people that ran into a similar problem as it is a great solution and a great learning example for us all.
    Thanks again you are da man!

  15. #15
    Join Date
    Dec 2003
    Location
    Location! Location!
    Posts
    6,137
    Worm, for sure, often goes above and beyond. He's an asset to any organization I'm sure!
    Intrigued

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Flash button with regular AMS functions!?
    By Wonderboy in forum AutoPlay Media Studio 5.0
    Replies: 14
    Last Post: 04-30-2005, 02:38 PM
  2. Example: Creating an on/off button to toggle background audio
    By Jonas DK in forum AutoPlay Media Studio 5.0 Examples
    Replies: 0
    Last Post: 07-10-2004, 02:54 PM
  3. Button Hiding Blues
    By Tezcatlipoca in forum AutoPlay Media Studio 4.0
    Replies: 5
    Last Post: 04-11-2003, 04:57 PM
  4. INFO: The Explore Button on the Distribution Folder Dialog
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-11-2002, 12:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts