Ask a Question related to Macromedia Director Lingo, Design and Development.
-
Jai G #1
Urgent: Repeat loop and Film loop clash!
Hi All,
Scenario
I have a script running in which the spelling which was typed in by the
student is corrected. The alphabets are moved to their correct positions to
form the correct spelling and appropriate explanations are given to explain
how the spelling could be corrected. When the sound is playing a 'repeat
loop' is played in order to loop until the sound is done playing. After that
the program proceeds to execute the next code block.
Problem
Now I have a animated character which will be narrating these sounds. The
problem is that I have used a film loop for this animation and it gets
slowed down a lot when the program goes into the repeat loop. The main
problem I have is that the repeat loop cannot be eliminated. So somehow I
have to make the repeat loop and the animation to play at the same time
without much compromises.
Please help me out with this.
Thanks in advance.
Regards,
Jai G
Jai G Guest
-
repeat loop
Hi Thanks a lot for the reply , I use the value and now its working. But now if i want to store the values of nam1 to nam4 in the other set of... -
End of film loop
Is it possible to check the end of a film loop? My situation is: I have a "looping" film loop and when i press the mouseDown i change the member... -
Can a film loop play once, then loop on the last frame(s)?
I need a film loop to play once, then loop playback on the last frame so I can keep the LOOP of the film loop set. This will allow the tell commands... -
Film loop rollovers working with tell sprite, but only if Loop is checked
on mouseWithin me cursor 280 tell sprite 40 --the sprite containing the film loop sprite(60).member = member("networkmapsbuttonroll") --swapping... -
Urgent Please :- Updatestage in Film Loop
Hi All, I have a film loop animating on stage. Now for the purpose of another functionality, I am forced to use the 'updatestage' command. But... -
Gretchen Macdowall #2
Re: Urgent: Repeat loop and Film loop clash!
In article <bg34ku$fpc$1@forums.macromedia.com>, "Jai G"
<logic_writer@yahoo.com> wrote:
If you want other things to happen while you are waiting for the sound to> how the spelling could be corrected. When the sound is playing a 'repeat
> loop' is played in order to loop until the sound is done playing. After that
> the program proceeds to execute the next code block.
>
> Problem
>
> Now I have a animated character which will be narrating these sounds. The
> problem is that I have used a film loop for this animation and it gets
> slowed down a lot when the program goes into the repeat loop. The main
> problem I have is that the repeat loop cannot be eliminated.
stop you have to get rid of the repeat loop. The only other way to do it
is to put an updatestage command inside your repeat loop, which will
advance the film loop but at a rate much faster than you would want.
Use an exitframe handler to wait for the sound instead:
on exitframe me
if soundBusy(1) then
go the frame
end if
end
That will loop in one frame until the sound is done.
Gretchen Macdowall
[url]http://www.updatestage.com/[/url]
Gretchen Macdowall Guest
-
RaveN J #3
Re: Urgent: Repeat loop and Film loop clash!
Hi,
Thank you very much for replying to the message. But unfortunately I am
unable to use 'exitframe' for my purpose. I have a script in which I have to
call one narration after another using 'sound playfile' in between other
program statements. First a narration is played (the program waits till
sound is finished), the some codes are executed and then another narration
is played and the program waits for it to finish. After that again some
program statements are executed and so on. So I have to execute everything
within a single script. Thus I do not know if 'exitframe' will be useful for
my purpose.
So what can I do if that is the case? Please suggest.
Thank you.
Jai G
"Gretchen Macdowall" <gcm@updatestage.com> wrote in message
news:gcm-2807031138400001@192.168.1.102...that> In article <bg34ku$fpc$1@forums.macromedia.com>, "Jai G"
> <logic_writer@yahoo.com> wrote:
>> > how the spelling could be corrected. When the sound is playing a 'repeat
> > loop' is played in order to loop until the sound is done playing. AfterThe> > the program proceeds to execute the next code block.
> >
> > Problem
> >
> > Now I have a animated character which will be narrating these sounds.>> > problem is that I have used a film loop for this animation and it gets
> > slowed down a lot when the program goes into the repeat loop. The main
> > problem I have is that the repeat loop cannot be eliminated.
> If you want other things to happen while you are waiting for the sound to
> stop you have to get rid of the repeat loop. The only other way to do it
> is to put an updatestage command inside your repeat loop, which will
> advance the film loop but at a rate much faster than you would want.
>
> Use an exitframe handler to wait for the sound instead:
>
> on exitframe me
> if soundBusy(1) then
> go the frame
> end if
> end
>
> That will loop in one frame until the sound is done.
>
> Gretchen Macdowall
> [url]http://www.updatestage.com/[/url]
RaveN J Guest
-
Gretchen Macdowall #4
Re: Urgent: Repeat loop and Film loop clash!
> First a narration is played (the program waits till
You'd still be better off restructuring it so that you have a list of> sound is finished), the some codes are executed and then another narration
> is played and the program waits for it to finish. After that again some
> program statements are executed and so on. So I have to execute everything
> within a single script.
handlers you call in order, checking your status on an exitframe. To keep
what you have you could add a timer to try to execute an updatestage at
intervals similar to your framerate. Assuming your framerate is 10fps:
global lastCheck
lastCheck = the ticks
repeat while something
-- other code
now = the ticks
elapsed = now - lastCheck
lastCheck = now
if elapsed > 6 then
updateStage -- advance film loop
end if
end repeat
Gretchen Macdowall
[url]http://www.updatestage.com/[/url]
Gretchen Macdowall Guest
-
Jai G #5
Re: Urgent: Repeat loop and Film loop clash!
Hi Gretchen,
Thanks a lot for this suggestion. It was very helpful.
Have a great day!
Regards,
Jai G
"Gretchen Macdowall" <gcm@updatestage.com> wrote in message
news:gcm-3007031857200001@192.168.1.102...narration> > First a narration is played (the program waits till
> > sound is finished), the some codes are executed and then anothereverything> > is played and the program waits for it to finish. After that again some
> > program statements are executed and so on. So I have to execute>> > within a single script.
> You'd still be better off restructuring it so that you have a list of
> handlers you call in order, checking your status on an exitframe. To keep
> what you have you could add a timer to try to execute an updatestage at
> intervals similar to your framerate. Assuming your framerate is 10fps:
>
> global lastCheck
>
> lastCheck = the ticks
> repeat while something
> -- other code
> now = the ticks
> elapsed = now - lastCheck
> lastCheck = now
> if elapsed > 6 then
> updateStage -- advance film loop
> end if
> end repeat
>
> Gretchen Macdowall
> [url]http://www.updatestage.com/[/url]
Jai G Guest



Reply With Quote

