Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quicktime navigation - URGENT 1

Status
Not open for further replies.

PDT

Programmer
May 19, 2001
40
AU
If anyone could shed some light on this problem, I would be very grateful:
I am creating a CD-ROM production using Dir8, on stage is a set of buttons that each should link to a part of a large single quicktime video via ticks specified by StartTime and StopTime.

The script I am using is this:

_______________________________________________
property myDVSprite, myDVStartTime, myDVStopTime

on mouseUp
set myDVStartTime = 69277
set myDVStopTime = 69457
set myDVSprite = (1)
set the movieTime of sprite myDVSprite = myDVStartTime
set the movieRate of sprite myDVSprite = 1
end mouseUp

on exitFrame
myDVStartStopHandler
end

on myDVStartStopHandler
set myDVStartTime = 69277
set myDVStopTime = 69457
set myDVSprite = (1)
if the movieTime of sprite myDVSprite > myDVStopTime then
set the movieRate of sprite myDVSprite = 0
end if
end
____________________________________________________


Problem is, only the button linking to the last segment of the video works, the rest link to their respective sections but DO NOT PLAY the quicktime, ie. I cannot get the rest to play
NOTE: the last video button works perfectly, only the rest do not.

HELP!!!

Thankyou in advance


Paul
 
had me stuck for a bit.
Ok, the problem is that every script is going to register that it is passed its stop time after the first section, I don't know why the last button works, the last button isn't really the first button is it?

here is a logic demo
movie 1 plays till time of 50, the code realises that its time to stop so it does

now btn 2 wants to play to 200, but the script for movie 1 says, wait, your past 50 so movietime is now 0, and your movie stops, btn 2 script has no way to tell btn 1 script to turn off.

Solution, use globals to store your current start and stop times so that when you hit the btn 2 the stop time becomes the new number. also remove the exitframe script from all your buttons and put them on either 1 button or the movie.



scripts will be:

on the buttons (I would suggest using behavios so you only have one script, but for now I just changes your original)

on mouseUp
global myDVStartTime, myDVStopTime, myDVSprite
set myDVStartTime = 69277
set myDVStopTime = 69457
set myDVSprite = (1)
set the movieTime of sprite myDVSprite = myDVStartTime
set the movieRate of sprite myDVSprite = 1
end mouseUp


and the exitframe script to go on either ONE button or the QT movie

on exitframe
global myDVStartTime, myDVStopTime, myDVSprite
if the movieTime of sprite myDVSprite > myDVStopTime then
set the movieRate of sprite myDVSprite = 0
end if


end exitframe

that should do the trick
 
Your reasoning is very sound and makes perfect sense.
Thanks for all your time and effort - very helpful but still stuck a little,
Still only one button works, now not consistent as to which one and also the QT doesn't seem to stop when ticks defined as myDVStopTime reached

I managed to ascertain this script (see below) that was used on D6.5 for same function, but unable to get to work (bugs) on D8 or D7, is this helpful? Could you prehaps help to modify/debug? Sorry, still stuck, I feel like I'm just missing one little thing - would it be easier to go to one single behaviour for buttons?

_________________________________

on mouseUp
set the movieRate of sprite myDVSprite = 0 --stop before resetting start time
set the startTime of sprite myDVSprite = 69277
set the stopTime of sprite myDVSprite = 69457
startTimer --without short delay video start time is erratic
repeat while the timer < 10
end repeat
set the movieRate of sprite myDVSprite = 1
end mouseUp
_________________________________

Hope all this is helpful to others also,
Thanks Horrid, in advance again,

Paul
 
Hmm, just tested it myself and works fine. I did put the exitframe script into a frame script, not on a button or QT so try that. And I didn't call a handler either, just the script directly.

I also altered the code a bit for the exitframe just to initialise the variables.

on exitframe
global myDVStartTime, myDVStopTime, myDVSprite
if voidp(myDVStopTime) then myDVStopTime = 0
if voidp(myDVSprite) then myDVSprite = 1
if the movieTime of sprite myDVSprite > myDVStopTime then
set the movieRate of sprite myDVSprite = 0
end if

go to the frame

end exitframe

If this still doesn't work then I think the problem is somewhere else.
 
Horrid, you are a lifesaver - cannot thankyou enough
Lots of work compiling now and dividing up all the QTs and making buttons
Prototype due in 2 days, thanks to you and a little caffeine, should be no problems now
Well done - might be worth holding onto this a its very nifty,

Your time and effort much appreciated...


Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top