Urgent: Repeat loop and Film loop clash!

Ask a Question related to Macromedia Director Lingo, Design and Development.

  1. #1

    Default 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

  2. Similar Questions and Discussions

    1. 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...
    2. 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...
    3. 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...
    4. 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...
    5. 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...
  3. #2

    Default Re: Urgent: Repeat loop and Film loop clash!

    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. 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.
    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]
    Gretchen Macdowall Guest

  4. #3

    Default 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...
    > 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. 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.
    >
    > 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

  5. #4

    Default Re: Urgent: Repeat loop and Film loop clash!

    > 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.
    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]
    Gretchen Macdowall Guest

  6. #5

    Default 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...
    > > 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.
    >
    > 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

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139