0 Replies Latest reply on Apr 18, 2006 1:18 AM by inactiveforumnotifier

    User-activation of looped flash projector

    Level 1
      I have a 6 minute long flash animation for a show i have coming up. Rather than having the movie on a constant loop i wanted a viewer to be able to actually physically start the movie. So, I decided using a modified keyboard was the best idea.

      When the time came to actually implement this in flash, I found it was much harder than expected. Anyway, the way I have it implemented now is as such:

      In frame 1 of the first scene, "start", I have:

      frame 2:
      pressStart.focusEnabled = true;

      and frame 3:
      gotoAndPlay("scene 2", 1);

      Also in this scene is a movieclip (which is really just a text field that says "Press Start") with an instance name 'pressStart'. In the actions for this movie clip I have the following:
      onClipEvent(keyDown) {

      the idea is, if any button on the keyboard is pressed, the movie starts. If you're wondering why its done in such a convoluted way, im not sure i have a good answer. For one, I was having trouble trying to simply put the gotoAndPlay("scene 2", 1) or nextScene() inside the onClipEvent handler (i tried adding _root and _parent also).

      The other half of the equation is at the end of the last scene of my movie, where i have
      gotoAndPlay("start", 1)

      NOW, this whole thing works the first time around, no problem, and it gets back to the inital scene. But key presses no longer work, and thus i cant start the movie again. The thing is, I made a test fla, which consisted of only the first and last scene of my movie, using the same exact as, and it works (repeatedly). I dont really see why having the whole movie in there would break this. There is a fair bit of actionscript for sounds, etc, but still...

      Any help would be greatly appreciated. thank you!