STEP 11 smart PRELOADS


When I test the file, I notice that the playhead does indeed catch up to the stream, and does so right in the middle of one of Christina's phrases. So it just sort of cuts her off mid- sentence . By placing a couple of smart preloads we can control the stream and decide on good places for the presentation to pause and preload assets, thus avoiding sudden interruptions.

  1. In the label layer, add a keyframe on frame 1.

  2. Double-click the keyframe to open the Frame Properties dialog.

  3. From the Label tab, enter 01 into the Name text field and make sure that the Label option is selected. Click OK when you're done.

    A label named 01 is inserted.

  4. Repeat steps 13 on frame 3 to create a label named Start.

  5. Repeat steps 13 on frame 27 to create a label named Load (see figure 07:20).


    Figure 07:20.

    graphics/07fig20.jpg


  6. In the action layer, double-click the keyframe in frame 1 to reopen the Frame Properties dialog.

  7. From the Actions tab, choose the Plus button and select If Frame is Loaded from the drop-down list.

  8. Select the Label option and choose Load from the drop-down list.

    Now you need to tell Flash what to do if the frame you specify has been loaded.

  9. Select the Plus button again and choose Go To from the drop-down list.

  10. Enable the Go To and Play option.

  11. Choose the Label option and choose Start from the drop-down list (see figure 07:21). Click OK when you're done.


    Figure 07:21.

    graphics/07fig21.jpg


    For this action to work properly, another loop must be added.

  12. In the action layer, add another keyframe to frame 2 and double-click it to open the Frame Properties dialog.

  13. In the Actions tab of the Frame Properties dialog, add a Go To action, specifying the 01 label. Be sure to enable the Go To and Play option. This creates a loop that sends the playhead back to the script in frame 1, until that script returns a positive.

When I test the movie, I still get an interruption midway through the file. So I write another preload action, choosing a pause in Christina's delivery as the spot to preload (see figure 07:22). Now, if you view this movie on a DSL, cable modem, or T1 these preload scripts will be read, but will return a positive immediately. In other words, they will basically be invisible and cause no hesitation in the playback. However, if you view the movie on a 56.6, there will be a 2-second pause at the start and another 2- to 4-second pause about a third of the way through. That second pause is placed in a natural pause of Christina's delivery, so it's not that noticeable. Once past that pause, enough of the file is preloaded to stream perfectly to the end.


Figure 07:22.

graphics/07fig22.jpg




Flash Web Design The Art Of Motion Graphics
Flash Web Design oder: the art of motion graphics
ISBN: 3827256623
EAN: 2147483647
Year: 2005
Pages: 192

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net