[ Pobierz całość w formacie PDF ]
.The If Frame Is Loaded action is helpful for verifying that a large file(such as a bitmap or sound) is loaded.You can also use the _framesloadedproperty (within an If action) to check whether the contents of a specific frame areavailable locally.Using either the action or the property, you can start playing a simple animationwhile the rest of the movie downloads to a local computer.Both check whetherthe contents of a specific frame are available locally.Typically, the If Frame Is Loaded action is used as a frame action, but it can alsobe used as a button action.To test an If Frame Is Loaded condition, use theStreaming option with the Test Movie command.The frames load as if streamingfrom a Web site.For more information, see  Testing movie downloadperformance on page 315.To check whether a frame has been loaded:1 Select the frame, button instance, or movie clip instance to which you willassign the action.2 Choose Window > Actions to display the Actions panel.3 In the Toolbox list, click the Basic Actions category to display the basic actions,and select the If Frame Is Loaded action.4 In the Parameters pane, for Scene, select the scene containing the desiredframe: Current Scene or a named scene.5 For Type, choose Frame Number, Frame Label, or Expression.6 For Frame, specify the frame to be loaded before the action is triggered as aframe number, frame label, or expression, according to your selection in step 5.7 Select the action to occur when the particular frame has been loaded.Flash enters ActionScript similar to the following in the Actions list:ifFrameLoaded (100) {gotoAndPlay (10);}Creating Interactive Movies 297 To use the If Frame Is Loaded action to play a short animation as a movie loads:1 Create a short animation loop at the beginning of the movie.For example, youcan create a loop that displays the message  Movie loading.2 Create a frame action with the If Frame Is Loaded action that jumps out ofthe animation loop when all the frames are loaded and continues playingthe movie.For example, a 30-frame movie that has a 2-frame animation loop at thebeginning requires the following action attached to Frame 1:ifFrameLoaded (30) {gotoAndPlay (3);To complete the example, attach the following action to Frame 2, to restart themovie at Frame 1:gotoAndPlay (1);When the frame specified in the If Frame Is Loaded action loads, the movieskips the second frame and continues playing the movie from the third frame.To use the _framesloaded property in an action to play a short animation loop as amovie loads:1 Create a short animation loop at the beginning of the movie.For example, youcan create a loop that displays the message  Movie loading.2 Create a frame action that jumps out of the animation loop after all the framesare loaded and continues playing the movie.For example, a movie that has a two-frame animation loop at the beginningrequires the following action attached to Frame 2:if(_framesloaded==100) {gotoAndPlay (3);} else {gotoAndPlay (1);}For more information on the _framesloaded property, see the ActionScriptReference Guide.298 Chapter 12 13CHAPTER 13Creating Printable Movies.Once you have set up interactivity in your Flash movie, you can set certain framesin the movie to be printable so that users can print them with the Flash Player.You can use the Flash Player printing feature to print catalogs, coupons,information sheets, receipts, invoices, or other documents in your Flash movies.The Flash Player prints Flash content as vector graphics at the high resolutionsavailable from printers and other output devices.Printing as vector graphics scalesFlash artwork so that it prints clearly at any size without the pixelated effects thatcan occur when printing low-resolution bitmap images.Printing movies from the Flash Player instead of from the browser gives Flashauthors several advantages.You can do the following:" Specify which frames in a Flash movie can be printed.This lets you createlayouts appropriate to printing and protect material from unauthorizedprinting." Determine the print area of frames." Specify whether frames are printed as vectors (to take advantage of higherresolutions) or as bitmaps (to preserve transparency and color effects)." Assign Print actions to print frames from movie clips, even if the movie clipsare not visible.This lets you provide printable material without using valuablebrowser space.299 Printing from the Flash PlayerUsers can print movies directly from the Flash Player in a browser in two ways:either using the Flash Player context menu and its Print command, or using thePrint action.A Print action gives more control over how a Flash movie can beprinted and eliminates the need to use the Flash Player context menu.The Print action can print frames in any Timeline, including the main Timelineor the Timeline of any movie clip or loaded movie level.The Print action also letsyou specify a print area and lets you print color effects, including transparency.The Flash Player context menu is more limited in its printing: it only printsframes in the main Timeline and does not let you print transparency or coloreffects.Note: Flash Player versions earlier than 4.25 (Windows) or 4.20 (Macintosh) do notsupport direct printing of frames.Preparing movies for printingTo set up printing from the Flash Player, you can set which frames to print and settheir print area [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • czarkowski.pev.pl
  •