0 Replies Latest reply on Feb 5, 2008 9:00 AM by sofanova

    best way to control graphics synchronized to video cue points

    sofanova
      Hello,

      I've recently completed (well, 'completed' is a strong word) a phase one implementation of a synchronized video presentation using After Effects and Flash. The basic idea driving the synchronization of cue points to motion graphics revolves around creating a listener in the following fashion:

      var listenerObject:Object = new Object();
      listenerObject.cuePoint = function(eventObject:Object):Void {
      // Put any code you like here
      trace("Cue point name: " + eventObject.info.name);

      }
      my_FLVPlybk.addEventListener("cuePoint", listenerObject);

      and then using the cue point name to play a variety of movieclips at the appropriate time in the presentation.

      The video presentation had four sections, each of which could be arbitratrily browsed to at any point in the presentation, so it was important that the the movieclips did not need to play in order and that they could be interrupted at any point without an visual confusion.

      I dealt with this two ways (I am sure these are not the best ways, which is why I am writing this post):

      First, every single movieclip was already on the stage from the outset, stopped on the first frame, with the alpha property set to 0 (based on Aran Balkan http://aralbalkan.com/444). The final frame of each clip had a gotoAndStop(1) action on it so that when a clip finished playing it 'reset' itself. I also wrote a "rewind" function which pretty much did the same thing whenever a user clicked on one of the navigational tabs.

      For a first iteration, this worked pretty well, and it impressed enough people in my organization (university) that now the President wants to deliver a similar message. It seemed prudent at this point to ask a general question about best practices in this area. I am working with the full Master Collection suite, and can target later versions of the Flash Player (I believe I can use AS 3.0, although I will have to learn it). One thing that I am hoping any pointers you guys might have will cover is this:

      How do you handle starting/stopping/pausing of the video and also make sure any currently playing graphical assets also start/stop/pause on cue? I was thinking of setting a variable on the second frame of each movieclip, something along the lines of 'nowPlaying = this;' and then resetting that to null at the end of the clip and in the rewind function, then using that variable to control the currently playing clip (would have to bu just one, I imagine).

      But there has got to be a better way. I have some down time to do research and to experiment, but it is going to be very high profile when it rolls around, so I thought I'd send out some feelers.

      Has anyone done anything like this? Seen a better way? Etc . . .

      Thanks so much.