7 Replies Latest reply on Jan 9, 2007 8:21 AM by Newsgroup_User

    onEnterframe troubles

    MatMaar
      Hi

      I call a function in one of my scripts and in that script 2 onEnterFrame function are placed.

      Now when I call that function, flash don't execute the onEnterframe function.
      Hope somebody can help me here.

        • 1. Re: onEnterframe troubles
          DazFaz Level 1
          I can see there are 2 possible reasons why it’s not working:
          1. The actual "imageCentral_mc" does not exist at the time of the function call
          2. There is a relative path issue.
          • 2. Re: onEnterframe troubles
            MatMaar Level 1
            imageCentral_mc and imageRight_mc are in the root of the movie and on frame 1 of the movie.

            I tried _root.imageRight_mc an I am on frame 1 of the movie, so.....
            • 3. Re: onEnterframe troubles
              MatMaar Level 1
              The part where it says loadMovie, does execute.
              And I use the same path for the onEnterFrames. That's why it is strange to me that this does not work

              • 4. Re: onEnterframe troubles
                Level 7
                > The part where it says loadMovie, does execute.
                > And I use the same path for the onEnterFrames. That's why it is strange to
                me that this does not work

                That is actually *why* it doesn't work. When you load content to a
                movieClip, all of that clip's parameters (including for instance it's
                enterFrame handler) are overwritten. Load your images into your clips using
                a preloader - when the images have loaded, *then* assign the enterFrame
                handlers...

                --
                -------------------------------
                Remove '_spamkiller_' to mail
                -------------------------------



                • 5. Re: onEnterframe troubles
                  MatMaar Level 1
                  I call this script from this script. This explains maybe a bit more.

                  • 6. Re: onEnterframe troubles
                    MatMaar Level 1
                    quote:

                    Originally posted by: Newsgroup User
                    > The part where it says loadMovie, does execute.
                    > And I use the same path for the onEnterFrames. That's why it is strange to
                    me that this does not work

                    That is actually *why* it doesn't work. When you load content to a
                    movieClip, all of that clip's parameters (including for instance it's
                    enterFrame handler) are overwritten. Load your images into your clips using
                    a preloader - when the images have loaded, *then* assign the enterFrame
                    handlers...

                    --
                    -------------------------------
                    Remove '_spamkiller_' to mail
                    -------------------------------






                    So If I put the loadMovie before the functions, this will work?
                    Sorry but fi I do this, nope... nothing Not even the trace within the onEnterframe function.

                    • 7. Re: onEnterframe troubles
                      Level 7
                      > So If I put the loadMovie before the functions, this will work?
                      > Sorry but fi I do this, nope... nothing Not even the trace within the
                      > onEnterframe function.

                      No, that's not enough. Put the loadMovie assigning the enterFrame, but ALSO,
                      wait for the image to *actually load*

                      --
                      -------------------------------
                      Remove '_spamkiller_' to mail
                      -------------------------------