Interesting problem, because you're not just interested in where it moved to, but how it got there. In other words, once they start moving the slider, you need to record the whole process, because they might be doing, say, a fade, and the way they get there is critical.
I guess that every time the slider position is different than it was before, I'd record the time point. I wouldn't compare values at every interval, because (1) if it's not moving, you're just storing a lot of the same information over and over and (2) if it is moving, you're going to miss critical information (unless your timeout is VERY short, which just makes #1 worse).
Instead, if I saw that the locV changed from one moment to another (which is only going to happen during a mouseDown event on the sprite, so it's easy to track), then if it was different than the previous locV then I would store away the locV and the time that it happened.
I'd neither use a frame script nor a timeout, but instead put it in the mouseDown event:
on mouseDown
lastV =-1 -- Or 0 or anything different
repeat while the mouseDown
currV =the mouseV
if (currV <> lastV) then
-- The slider has been dragged!
-- Record the information here
-- Now, watch for it again
lastV =currV
end if
end repeat
end
Later on, you can use that info to replicate the movements back.
- Tab
At 05:42 PM 12/17/02, Charlie Fiskeaux II wrote:
First I'll explain my project and then I'll ask my question (which is whether to use a timeout object or a frame script).I'm creating an application to simulate a 16 channel audio mixer, where the user/student has a ten minute video clip with sixteen channels of audio, and they can record their mixing of the audio (I'm using 16 QT sprites for the audio channels). The "recording" is saved in arrays (one for each mixer channel) containing the movieTime of a slider movement and the locV that it moved to. Now, the question is, when the teacher or student plays back this "recording", and the application has to compare the arrays with the current movietime to know when to move the sliders and change the volume, should I use a timeout object to compare the values every interval, or should I use a cycling frame script (both would cycle at about 15 fps)? Does one take less memory than the other? Charlie Fiskeaux II Media Designer The Creative Group www.cre8tivegroup.com 859/858-9054x29
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
