Danh mục

Flash After Effects- P3

Số trang: 50      Loại file: pdf      Dung lượng: 2.91 MB      Lượt xem: 23      Lượt tải: 0    
Hoai.2512

Hỗ trợ phí lưu trữ khi tải xuống: 13,000 VND Tải xuống file đầy đủ (50 trang) 0
Xem trước 5 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Flash After Effects- P3: Flash Designers: Take your projects to the nextlevel with After Effects’ robust toolset. You areabout to take a journey that combines thesetwo powerhouse applications. Enter the worldof Adobe After Effects. Welcome aboard.
Nội dung trích xuất từ tài liệu:
Flash After Effects- P3 Exercise 2: Loading Video Using ActionScript The Import Video Wizard provides an easy method for creating and importing video files into Flash. ActionScript offers another way to load Flash Video. Unlike the Import Video Wizard, ActionScript does not create the actual FLV file; it can only load FLVs and control their playback. You must encode the video file in the FLV format using either After Effects, Flash Import Video Wizard, or the Adobe Flash CS3 Video Encoder prior to loading it with ActionScript. The code that imports the FLV file follows a strict procedure that first connects to the FLV file and then streams its content into a Video object added to the Flash Stage (Figure 3.44). Net Net Connection Stream links to FLV transfers data Video Object Figure 3.44: Loading FLV files using ActionScript.1. Open 02_VideoActionScript.fla located in the 03_FLV folder in Chapter_03. The project is already assembled using three layers: buttons, TV, and Screen. Figure 3.45: Open 02_VideoActionScript.fla. It contains all the artwork you need.86 Chapter 3: From After Effects to Flash Let’s deconstruct how the imagery was created in Photoshop. The photo of the vintage television set has a transparent hole where the actual picture tube is. Using the Pen tool, the shape of the picture tube was traced, selected and deleted. The Screen layer holds a PNG image of reflective glass. Its opacity was set to 50% in Photoshop. The video will play underneath both layers giving the illusion of a television broadcast. Figure 3.46: The television set is made up of two PNG images. The imported video will playback underneath the two layers adding to the illusion of a television broadcast. The buttons layer holds a movie clip instance. The panel artwork was created in Photoshop and imported as a PNG file. A button symbol was created in Flash and placed over each thumbnail image. Each button has a unique instance name that can be referenced through ActionScript. When the buttons are clicked, Flash will load a specific FLV file into a Video object. Figure 3.47: The buttons are invisible button symbols created in Flash. Each has a unique instance name that will load a specific FLV file when clicked on. The movie clip also contains an animation of the panel moving up and down. A mask layer is used to hide the panel when not in use. Frame labels are assigned to reference specific frames through code (Figure 3.48). For example, each time a thumbnail image is clicked, ActionScript instructs this movie clip to jump to the frame labeled “close” and play the frames that follow it.Working with Flash Video (FLV) 87 Figure 3.48: The movie clip contains an animation. Frame labels are used to identify the movement of the video panel. Where are the videos? They are kept external from this Flash file. Locate the FLV folder inside the 03_FLV folder. It contains three FLV files that were rendered out of After Effects through the Render Queue. These files will be loaded externally into Flash using ActionScript. Now that you have an idea of how the Flash file is set up, let’s start programming.2. On the main Timeline add a new layer labeled actions. Select the blank keyframe in Frame 1 and open the Actions panel.3. The first step is to create a NetConnection object. This object links, or provides directions, to the FLV file. Null is used for the connection name since you are accessing the FLV files locally from your hard drive. Finally, create a NetStream object to control the playback of the video. In order to stream the data correctly, the NetConnection is passed into the NetStream. Enter the following code: // create a NetConnection var vConnection:NetConnection = new NetConnection(); vConnection.connect(null); // create a NetStream var vStream:NetStream = new NetStream(vConnection);4. The Flash Player receives descriptive information embedded in the FLV file being played. This information is referred to as metadata. It could contain the title, author, comments, etc. You need to set up an object that will listen for this metadata information. This object will be linked to the NetStream object since that is what is transferring the data into Flash. Enter the following code in the Actions panel. Add it after the code you entered in Step 3. The code vStream.client attaches the metadata object to the NetStream obj ...

Tài liệu được xem nhiều: