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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determine MovieLoop stop

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Here's the case:
you've created a movieloop and placed it in a single frame with a simple 'go to the frame'.
The movieloop starts playing.
In this single frame several scripts will be active but that Lingo may only jump into action when the movieloop has reached it's final frame. (no loop in the movieloop!)
Is there a way to determine wheter the movieloop has reached it's end????
Like:
if movieloop=has reached final frame and stopped
then do this
end if

I'm a professional Dutch Director programmer but I can't seem to figure this one out!

All help welcome!

Thanks!

M@rCu5


 
u can try this code

property spriteNum
on mouseUp me
myMember = sprite(spriteNum).member
myDuration = member(myMember).duration
myMovietime = sprite(spriteNum).movieTime
if mymovietime < myduration then
alert &quot;movie is not over&quot;
else
alert &quot;movie is over&quot;
end if
end
 
u can try this code

property spriteNum
on mouseUp me (or exitframe)
myMember = sprite(spriteNum).member
myDuration = member(myMember).duration
myMovietime = sprite(spriteNum).movieTime
if mymovietime < myduration then
alert &quot;movie is not over&quot;
else
alert &quot;movie is over&quot;
end if
end
 
First, thanks for your reply.
I started working with your script but found out I made a mistake.
I was talking MovieLoop when I actually meant FilmLoop.
A castmember consisting of a row of pictures thus creating an animation.
I'm now thinking that Director FilmLoops don't use the property duration.
Perhaps I could calculate the duration by multiplying the framerate with the number of frames the FilmLoop consists of? I can't figure it out.
I hope you've got a suggestion 'cause I'm a professional programmer and this is for a big project and the deadline is just around the corner!
Macromedia, where's the function 'when FilmLoop has finished then....'?????

M@rCu5

 
u can use a global variable var-A tested on enterframe and a global binar variable var-B seted on mouseup.
var-A is incremented on exitframe.
u can test to see what is the max value of this variable until the film begin to play again in loop.
then reset the variable to &quot;0&quot;.

on mouseup change var-B to &quot;1&quot;
on enterframe test the 2 global variables:
if var-A = 0 and var-B = &quot;1&quot; then &quot;go antoher frame&quot;
else &quot;go the frame&quot;

how this works for you ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top