7 Replies Latest reply on Dec 12, 2006 11:52 AM by Newsgroup_User

    exitFrame not executing

    Level 7
      I've been using Director for 15 years and I've never seen this. I have a
      behavior attached to a sprite that has an exitFrame script. I have a
      breakpoint on the first line of that handler and when I run the movie the
      debugger doesn't open.

      I took the behavior off the sprite and put it back on, I made sure scripts
      were not dissabled, but it's baffling me.

      Any clues?

      --
      Craig Wollman
      Lingo Specialist
      Word of Mouth Productions
      212-928-9581

      www.wordofmouthpros.com


        • 1. Re: exitFrame not executing
          Level 7
          Forget it. I think it was just another example of the inconsistent behavior
          when using frame 1. My behavior sets the visibility of the sprite to FALSE
          on endSprite. Of course when a sprite's visibility is FALSE the exitFrame
          handler doesn't run. Even though the visibility is set to TRUE on
          beginSprite, well, I'm not going to try to explain but I'm just going to
          assume it's was frame 1 gibberish and that'll be that.

          --
          Craig Wollman
          Lingo Specialist
          Word of Mouth Productions
          212-928-9581

          www.wordofmouthpros.com
          "forum.macromedia.com" <lingoboy@wordofmo.com> wrote in message
          news:elmlkt$2v3$1@forums.macromedia.com...
          > I've been using Director for 15 years and I've never seen this. I have a
          > behavior attached to a sprite that has an exitFrame script. I have a
          > breakpoint on the first line of that handler and when I run the movie the
          > debugger doesn't open.
          >
          > I took the behavior off the sprite and put it back on, I made sure scripts
          > were not dissabled, but it's baffling me.
          >
          > Any clues?
          >
          > --
          > Craig Wollman
          > Lingo Specialist
          > Word of Mouth Productions
          > 212-928-9581
          >
          > www.wordofmouthpros.com
          >


          • 2. Re: exitFrame not executing
            Level 7
            Well, I was wrong, I moved the sprite span to start in frame 2 and the
            behavior in general is behaving inconsistently. I'm using this behavior to
            trigger all transitions in my project. This sprite spans the score. It
            takes an image of the stage, covers everything, and under it, Director
            navigates to the new frame. Then this sprite fades out, revealing the new
            frame. I find it much smoother than Director's built in transition. It has
            worked consistently for the past few years in various projects but now it's
            not but strangely enough it's only happening during the transition from the
            first marker in my score to the second marker. Any other navigation is not
            a problem.


            global g

            property pS, spriteNum, pFade, pSpeed, pDestinationMarker

            on beginSprite me
            pS = sprite (spriteNum)
            pFade = FALSE
            pS.blend = 0
            pSpeed = 20
            pDestinationMarker = ""
            pS.visible = TRUE
            pS.locZ = 150
            end

            on FadeAndNavigate me, destinationMarker
            pS.member.image = (the stage).image.duplicate ()
            pFade = TRUE
            pS.blend = 100
            if ["Forward", "Back"].getOne (destinationMarker) = 0 then
            go to destinationMarker
            else
            case destinationMarker of
            "Forward":
            go to marker (1)
            "Back":
            go to marker (-1)
            end case
            end if
            end

            on endSprite me
            pS.visible = 0
            pS.locZ = spriteNum
            end

            on exitFrame me
            if pFade = TRUE then
            put pS.blend
            if pS.blend > 0 then
            pS.blend = pS.blend - pSpeed
            go to the frame
            else
            pFade = FALSE
            end if
            end if
            end


            --
            Craig Wollman
            Lingo Specialist
            Word of Mouth Productions
            212-928-9581

            www.wordofmouthpros.com
            "forum.macromedia.com" <lingoboy@wordofmo.com> wrote in message
            news:elmlkt$2v3$1@forums.macromedia.com...
            > I've been using Director for 15 years and I've never seen this. I have a
            > behavior attached to a sprite that has an exitFrame script. I have a
            > breakpoint on the first line of that handler and when I run the movie the
            > debugger doesn't open.
            >
            > I took the behavior off the sprite and put it back on, I made sure scripts
            > were not dissabled, but it's baffling me.
            >
            > Any clues?
            >
            > --
            > Craig Wollman
            > Lingo Specialist
            > Word of Mouth Productions
            > 212-928-9581
            >
            > www.wordofmouthpros.com
            >


            • 3. Re: exitFrame not executing
              duckets Level 1
              Have you inadvertantly clicked the 'ignore breakpoints' button in the debugger window?

              - Ben
              • 4. Re: exitFrame not executing
                Level 7
                No. If I manually toggle the visible in the score, the debugger imediately
                opens.

                --
                Craig Wollman
                Lingo Specialist
                Word of Mouth Productions
                212-928-9581

                www.wordofmouthpros.com
                "duckets" <webforumsuser@macromedia.com> wrote in message
                news:elmmr8$4dd$1@forums.macromedia.com...
                > Have you inadvertantly clicked the 'ignore breakpoints' button in the
                > debugger window?
                >
                > - Ben
                >


                • 5. Re: exitFrame not executing
                  duckets Level 1
                  oh, the whole 'exitframe' handler isn't being called at all?

                  I just tried your script, pasted in as a behaviour, and set up - I think - how you would use it. It seems fine. I made the 'fade' sprite start on frame one, and span across the 5 frame labels I made. The blending worked fine, first time and each time after. So it's not your code - must be something to do with how you have it set up.

                  Does it work for you if you paste it into a brand new bare-bones director movie?

                  - Ben
                  • 6. Re: exitFrame not executing
                    Level 7
                    Of course, that would be the next course of action. The FadeAndNavigate
                    handler is called from any button that initiates navigation and of course
                    the behavior I sent gets put on any placeholder graphic in a low channel.
                    This way it doesn't cover all other graphics by the locz allows it to cover
                    everything when it's in action.

                    Interestingly, I got rid of the visible code in both handlers and it works
                    consitently correctly. Since I added the locZ code and moved the sprite to
                    sprite 2 (below all others on the stage) I didn't need the visible stuff
                    anyway. If I had seen consistent behavior when the visible code was there
                    I'd figure there was some logic I was missing in my code.

                    Anyway, thanks for the suggestions. We won't know what the real issue was
                    but it works perfectly now.

                    --
                    Craig Wollman
                    Lingo Specialist
                    Word of Mouth Productions
                    212-928-9581

                    www.wordofmouthpros.com
                    "duckets" <webforumsuser@macromedia.com> wrote in message
                    news:elmq53$8dd$1@forums.macromedia.com...
                    > oh, the whole 'exitframe' handler isn't being called at all?
                    >
                    > I just tried your script, pasted in as a behaviour, and set up - I think -
                    > how
                    > you would use it. It seems fine. I made the 'fade' sprite start on frame
                    > one,
                    > and span across the 5 frame labels I made. The blending worked fine, first
                    > time
                    > and each time after. So it's not your code - must be something to do with
                    > how
                    > you have it set up.
                    >
                    > Does it work for you if you paste it into a brand new bare-bones director
                    > movie?
                    >
                    > - Ben
                    >
                    >


                    • 7. Re: exitFrame not executing
                      Level 7
                      On Tue, 12 Dec 2006 17:56:23 GMT, forum.macromedia.com posted in
                      macromedia.director.lingo:

                      > If I had seen consistent behavior when the visible code was there
                      > I'd figure there was some logic I was missing in my code.
                      >
                      > Anyway, thanks for the suggestions. We won't know what the real issue was
                      > but it works perfectly now.

                      I've seen the same unpredictable behavior happen here - even if no code is
                      involved, but occasionally toggling the visibility in the Score window.

                      I suspect that's why, when using code, I set the sprite's locV to -1000 and
                      back rather than deal with the visible property.

                      I could be wrong, but doesn't the blend property still capture mouse events
                      (may be a good thing in your project)? Although, if its locZ is beneath
                      another sprite with mouse events, then I suppose not.


                      P.S. Didn't we just have a similar conversation? My memory fades fast.


                      --
                      Mark A. Boyd
                      Keep-On-Learnin' :)