Ask a Question related to Macromedia Director Lingo, Design and Development.
-
sean #1
QT time tracking
Hi all,
I'm trying to execute various commands based on the time of a QT movie. The
owner wants to stay away from cuepoints and I wanted to stay away from a
massive "if then" mess. The following works, but I see potential problems,
especially if other processor intensive items are being executed at the same
time. I don't like the fact it gets called so often. Any thoughts, insights,
suggestions appreciated.
Thanks,
Sean
--on QT sprite
property my, pTimeList
on beginSprite me
my=sprite(me.spriteNum)
pTimeList=[99:"nothing", 200:"nothing", 300:"beep"]
timeOut("timer").new(1, #getTime, me)
end
on getTime me
if my.movieRate=1 then
ct = my.movieTime
t = getaProp(pTimeList, ct)
if t<> void then
do t
end if
end if
end
on endSprite me
timeout("timer").forget()
end
sean Guest
-
Ad Tracking
This is my first time working with Ad Tracking in Flash and I want to make sure I'm going about it correctly.. I can't test it on my side, so I want... -
InDesign tracking vs. Quark tracking?
Hi Anne Marie, I would describe letter, word, and glyph scaling parameters as things the paragraph composer can fuzzy-logic work with. Fuzzy logic... -
Tracking create and change time
Hi, in the MySQL documentation up to version 5.1 the page "Data Types -> .... -> TIMESTAMP Properties as of MySQL 4.1" states: "It is not... -
Module for time tracking and billing?
I'm looking for a Perl module/application that can help me track the amount of time I spend on various projects and then generate some reporting off... -
Formatting a time field to 24 hour time (Military time) in the Datagrid
Anyone know how to do this? -
JB #2
Re: QT time tracking
The biggest problem is expecting an exact movietime match while
monitoring a value incrementing 1000 times a second, odds are the exact
times in pTimeList=[99:"nothing", 200:"nothing", 300:"beep"]
will be missed. Actually only movitimes a multiple of 1000/ the
movierate will be encountered.
IF the movie is guranteed to play in a linear fashion only the next
value in a sorted list must be watched for.
You can also do the periodic movietime chacks at the director score
frame rate ( a reasonable interval) with a score or sprite script.
-- try this untested modified script's approach
--on QT sprite
property my, pTimeList, nextTimeEntry -- added
on beginSprite me
my=sprite(me.spriteNum)
pTimeList=[99:"nothing", 200:"nothing", 300:"beep"]
nextTimeEntry = 1 -- added look for first list entry
end
on prepareFrame -- of director score
on getTime me
if my.movieRate=1 and nextTimeEntry then
ct = my.movieTime
if ct >= getPropAt(pTimeList, nextTimeEntry) then -- at time
do getProp(pTimeList, getPropAt(pTimeList, nextTimeEntry))
-- increment time pointer
if nextTimeEntry < count(pTimeList) then
nextTimeEntry = nextTimeEntry + 1
else
nextTimeEntry = 0 -- turn it off
end if
end if
end if
end
JB Guest
-
sean #3
Re: QT time tracking
Brilliant. Thanks JB.
Much cleaner.
"JB" <lingoguy@sbcglobal.net> wrote in message
news:lingoguy-7E5741.20420701122003@forums.macromedia.com...> The biggest problem is expecting an exact movietime match while
> monitoring a value incrementing 1000 times a second, odds are the exact
> times in pTimeList=[99:"nothing", 200:"nothing", 300:"beep"]
> will be missed. Actually only movitimes a multiple of 1000/ the
> movierate will be encountered.
>
> IF the movie is guranteed to play in a linear fashion only the next
> value in a sorted list must be watched for.
>
> You can also do the periodic movietime chacks at the director score
> frame rate ( a reasonable interval) with a score or sprite script.
>
>
>
> -- try this untested modified script's approach
>
>
> --on QT sprite
> property my, pTimeList, nextTimeEntry -- added
>
> on beginSprite me
> my=sprite(me.spriteNum)
> pTimeList=[99:"nothing", 200:"nothing", 300:"beep"]
> nextTimeEntry = 1 -- added look for first list entry
> end
>
> on prepareFrame -- of director score
>
>
>
> on getTime me
> if my.movieRate=1 and nextTimeEntry then
> ct = my.movieTime
> if ct >= getPropAt(pTimeList, nextTimeEntry) then -- at time
> do getProp(pTimeList, getPropAt(pTimeList, nextTimeEntry))
> -- increment time pointer
> if nextTimeEntry < count(pTimeList) then
> nextTimeEntry = nextTimeEntry + 1
> else
> nextTimeEntry = 0 -- turn it off
> end if
> end if
> end if
> end
sean Guest



Reply With Quote

