3 Replies Latest reply on May 23, 2006 8:35 AM by Mattnesss

    Need help debugging integrated Flash movie

    Mattnesss Level 1
      Hi, I am somewhat ne to director, and here is my problem,
      I have an animated flash scorecard movie that I am using in a director quiz game project. The flash movie is a linear movie of a flipping scorecard with stops at each number. Whenever the user gets the question right I call .play() on the flash movie to advance the scorecard. The flash movie then stops when it reaches the next score number. This works great. My problem is, there are several different quizzes in a row, and I want to reset the score each time. When I put a second instance of the flash movie into my director score, instead of starting at the begining of the movie, it starts where the first instance left off. I have tried calling .rewind() on the flash sprite during "on beginSprite" but it complains that a handler is not found for the object. If I call rewind after the sprite is up and running, for instance if I call it right before I call .play(), .rewind() works, but I want it to rewound when the sprite begins.

      Any help?

        • 1. Re: Need help debugging integrated Flash movie
          Mattnesss Level 1
          Ok, I solved this problem by calling .rewind() on endSprite instead of on beginSprite so that it rewinds at the end of the first flash movie instance, instead of at the begining of the second. I still would like to know when I should call flash functions on a flash movie if I want to call them when the sprite enters the stage. Apparently, the flash handlers are not defined yet during "on beginSprite"
          • 2. Re: Need help debugging integrated Flash movie
            Level 7
            As you've discovered, #beginSprite is too early.
            Some possibilites are to give Flash sprites a frame cycle before trying
            to communicate with them, or to have Flash notify Director when it's
            fully loaded. A common trick is to move the Flash sprite so that 1 pixel
            of its corner remains on stage for a frame cycle - or until ready - and
            then move it into position. It won't load or establish communication
            with Director unless at least one pixel is on stage
            • 3. Re: Need help debugging integrated Flash movie
              Mattnesss Level 1
              Interesting trick. I'll have to remember that. When I started this director project, I was trying to be nice and organized, but it has become extremely messy with kludgy work arounds, when things haven't worked quite the way I expect them. Coming from an After Effects background, I still find the interface and design process much more intuitive than Flash.