Indigo Rose Software

Professional Software Development Tools

 
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 26
  1. #1
    Join Date
    Nov 2005
    Location
    Banned by moderator.
    Posts
    264

    Star Help with position: URGENT!

    I have a BIG problem. I made another slider and use it to show the position and to seek. The only problem is with this script:

    Page > OnTimer
    Code:
    -- get the position and set it
    if Playing == true then
    Pos = MediaPlayer.GetCurrentPos("Media");
    Slider.SetSliderPos("Position", Pos);
    end
    And the slider:
    Code:
    -- set the position
    MediaPlayer.Seek("Media", SEEK_SPECIFIC, e_Pos);
    I think you can imagine what it does, as the timer is activated when it starts playing the file...anyway, here's the project: (attachement)
    Attached Files

  2. #2
    Join Date
    Jul 2003
    Posts
    712
    Have you set the range of the slider to the media's length?

  3. #3
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    I took a quick look at it PMN. I can't devote a lot of time to it but the Slider Range that is being set in the Play function isn't setting the slider max to the correct value, its setting it to zero. I moved the last two lines that set the range into the Media PLayers On PLay event, and it worked for showing the position. However, the On Timer event is stopping you from being able to set the seek position on the media player... You're going to have to come up with a way to kill the timer while the mouse button is down on your slider.

  4. #4
    Join Date
    Jul 2003
    Posts
    712
    Maybe check out the page's 'On Mouse Button' event. Stop the timer when the left button is down, start it when it goes up.

    Give 'er a shot anyhow, it *may* work.

    Desmond.

  5. #5
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    There is a function in the Slider Framework named IsInRect that you could use to determine if your mouse pointer is inside the slider too. That way you'd only stop the timer if the mouse was down on the slider.

  6. #6
    Join Date
    Nov 2005
    Location
    Banned by moderator.
    Posts
    264

    how?

    how to use slider framework?

  7. #7
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    You don't have to use it. I think it'd look betterm, but that's just me. All I was saying is that you could use that particular function to help you out.

    Here's a link to the Slider Framework
    http://www.indigorose.com/forums/showthread.php?t=15195

  8. #8
    Join Date
    Nov 2005
    Location
    Banned by moderator.
    Posts
    264

    oh...

    ...sorry...it doesn't set the position!!! i made maybe some typos
    Attached Files
    Last edited by playmenow; 03-10-2006 at 10:38 AM.

  9. #9
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Hmmm.... thought I already did the Slider Framework for you.

    It's really simple to use.

    Here's a simple step by step:

    Start a new project. (or grab the empty one attached here and skip step 1)

    1. Cut and Paste the code that is in the posting

    2. Create two Images (preferably PNG for transparency), one for your slider background and one for your knob

    3. add the images to AMS.

    4. Name the background image: hslider_Position

    5. Name the knob: hknob_Position

    6. Move them into position on your page.

    7. That's it.

    From there you simply use the Custom event like you would the Slider Plugins.
    Attached Files

  10. #10
    Join Date
    Nov 2005
    Location
    Banned by moderator.
    Posts
    264

    no...

    I won't use the slider framework....it kills my CPU...here's what I have so far with the standard sliders:

  11. #11
    Join Date
    Nov 2005
    Location
    Banned by moderator.
    Posts
    264

    no...

    I won't use the slider framework....it kills my CPU...here's what I have so far with the standard sliders: (sorry for doublepost...i forgot to upload the file)
    Attached Files

  12. #12
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Here's my take on it.
    Attached Files

  13. #13
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Quote Originally Posted by playmenow
    it kills my CPU
    When I use it, it takes my CPU to 15%'ish... what could you possibly be doing that is so processor intensive?

  14. #14
    Join Date
    Nov 2005
    Location
    Banned by moderator.
    Posts
    264

    good

    Good. I have a tip for you: have you heard of "elseif" ? It saves you from typing an "end"
    It works! Worm, wanna a beer?

  15. #15
    Join Date
    Jul 2002
    Location
    USA
    Posts
    3,959
    Dude!

    I don't think elseif would save you from using an end as you still need to close out your ifs. Even if I'm wrong and it does save you from typing an end, it's bad practice IMO.

    I'll try to sneak a couple elseif's into my code if thats what it takes to impress.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Dialog box position
    By jordo2798 in forum AutoPlay Media Studio 4.0
    Replies: 1
    Last Post: 08-25-2003, 01:40 PM
  2. Locking window position
    By mtway in forum AutoPlay Media Studio 4.0
    Replies: 1
    Last Post: 12-13-2002, 03:08 PM
  3. Save window last position ?
    By jmoisan in forum AutoPlay Media Studio 4.0
    Replies: 7
    Last Post: 09-30-2002, 07:22 AM
  4. HOWTO: Get the Position and Size of a Window
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 09-27-2002, 09:40 AM
  5. Video position into variable ?
    By jmoisan in forum AutoPlay Media Studio 4.0
    Replies: 2
    Last Post: 09-11-2002, 07: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