3 Replies Latest reply on Jul 7, 2006 11:27 AM by Newsgroup_User

    video slider button

    oreopeewee Level 1
      I have to code to activate buttons for a video. I also have the slider bar and button activated. However, the slider button does not automatically progress while the video is playing but I can use the button to manually position the video. How can I get the button to progress automatically.

      thanks Here is the code I am using

      on mouseDown
      -- This assumes that the slider constraint
      -- is beneath the knob the user drags
      knobChan = the clickOn
      sliderChan = the clickOn - 1
      -- assuming the video sprite is in sprite 1
      left = sprite(sliderChan).left
      right = sprite(sliderChan).right
      range = right - left
      offset = the mouseH - sprite(knobChan).locH
      dur = sprite(vidChan).member.duration
      factor = float(dur) / range
      repeat while the stillDown
      if (the mouseH > left) AND (the mouseH < right) then
      sprite(knobChan).locH = the mouseH
      sprite(vidChan).movieTime = (the mouseH - left) * factor
      end if
      end repeat
      -- sprite(vidChan).movieRate = 1
      end mouseDown