Yes I did. I said...

Next I have an okToUpdatePosition boolean that I set whenever the user is moving the slider.

-Drew

On Jan 25, 2007, at 10:13 PM, Brian Heibert wrote:

I am having trouble with some of your code

It says ...

  If okToUpdatePosition then
    MoviePlayer1.Position = slider1.Value/1000 //
  end if

 This method or property does not exist

you didn't say did you have a method or property called okToUpdatePosition and if so what was in it?

Brian

On Jan 26, 2007, at 12:59 AM, [EMAIL PROTECTED] wrote:

Brian,

The way I accomplished this was by no means elegant but seems to work OK. I use this in OSX. Not sure how it works in Win32 yet as I am having lots of trouble getting quicktime players to work in 2007r1.

I have an isPlaying boolean property that I set whenever the movie should be playing (do not use the start stop events.) Next I have an okToUpdatePosition boolean that I set whenever the user is moving the slider.
Slider must be set to live scroll.

Slider1 Mousedown
*********************
okToUpdatePosition = true // this prevents the timer from interfering
  If IsPlaying then
    MoviePlayer1.Stop //if the movie is playing then stop it
  end if
  return true //return true so we can handle the drag ourselves

Slider1 Mousedrag
*********************
me.Value = ((x-5)/me.Width)*me.Maximum //move the slider to the mouse point (the 5 seems to center it)

Slider1 MouseUp
*********************
  okToUpdatePosition = false //let the timer work again
  If FullWindow.IsPlaying then
MoviePlayer1.Play //if the movie was playing before the change then play it again
  end if

Slider1 ValueChanged
*********************
  If okToUpdatePosition then
    MoviePlayer1.Position = slider1.Value/1000 //
  end if

Timer1 - Mode 2 - Runs every 250ms
*********************
  If Slider1.Maximum <> MoviePlayer1.Movie.DurationMBS*1000 then
Slider1.Maximum = MoviePlayer1.Movie.DurationMBS*1000 // set the maximum to the length of the movie (Requires MBS plugin)
  end if
  If not okToUpdatePosition then
Slider1.Value = MoviePlayer1.Position*1000 //if not dragging slider then movie updates slider
  end if

If anyone else has a better way I would be all ears.

-Drew




On Jan 25, 2007, at 4:49 PM, Brian Heibert wrote:

How can I get a slider control to control the movie player

I am building a MP3 Player

Brian
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to