The third part of the media organization mode (on)
First, resource management
Library is the resource manager of the Flash document. All resources that can be utilized by Flash can be placed in the library, and the library is accepted. Before using Flash to create design or software development, you must first add media content to the flash document, of course, you can also create vector or text directly in Flash. Or import vector map from the outside, bitmap, video, and sound; you can create components, which can be reused media content. At runtime, you can also use scripts to dynamically add media content to the document. For media resources that have been imported, Flash uses library (library) to manage them. From another perspective, the library is used to store the imported files and use them as a resource that can be reused. Documents imported from the outside and the graphics directly drawn directly in Flash are the foundation of creation. These media can be further organized using a nested manner to make it independent but repeatable modules. Components include: graphic, buttton, and movie clips. The library can also include components added to the document, and components are displayed in the library as compiled clips. Different Flash documents can also communicate with library projects. A Flash document can open another Flash document library that gets the library items required for the current document to achieve resource sharing. The library can be saved as a resource, and Flash is automatically loaded, and Flash also provides several sample libraries for users. At the same time, library resources can be exported to a URL as a SWF file to create a runtime sharing library. Here you need to involve two concepts: resource documents and target documents. The so-called target document refers to the current editing and needs to utilize the documentation of resources in the shared library, and the resource document refers to the SWF file that has been exported to a URL for repository resources for the target document. The URL here must comply with the requirements of the Flash Player 7 safety sandbox, simply, the target document and the resource document must be located at the same domain name or specify the domain name after the release, however this is indeed unrestricted when local debugging. The SWF or EXE file running locally is not limited by this security mechanism, and resources can be used directly in the runtime sharing library. Runtime shared libraries are very useful for RIA development, so that the development of library projects is integrated into separation, and the shared repository can be used by multiple target documents to improve the reuse of library project resources. The library can also manage the library project, create a folder to the library project, and modify the properties of the library project. The imported resource can call other editing programs directly in the library to edit, and Flash can directly update the original project in the library after editing. You can select unused library items, so developers can delete some useless library projects, streamline library resources, make Flash documents smaller. It should be noted here that in general, unused library items do not include in the released SWF document, only when the library item is exported to be a runtime sharing library, the unused library item is also exported to SWF. Documentation.
Second, the organization of time axis
Objects are called instances in Flash, and library items in the library are usually symbol (Symbol), similar to class usually object-oriented. The so-called "tissue of the time axis" is also an organization of the time axis. The timeline is divided into a lot of small grids, which is discretized, each with a state -flash execution state, and the small grid is called: frame. The frame includes two, key frames, and ordinary frames (FRME). You can place the content in the keyframe, and the normal frame does not allow placing content, and is automatically generated by the Flash according to the content of the keyframe. Different timelines are independent of each other, and their playback does not affect each other. It is to be pointed out here that the time axis of the single frame is different from the multiframe time axis, and the time axis of the single frame is not looped, and the time axis of the multi-frame is continuously looped continuously without the scripting statement control. The tissue between the time axis and the time axis is a tree structure that is always tissue in a nesting. The parent Time axis contains a child time axis and can reference and control each other. The main timeline (_root) is the root node of this tree structure. In any node, the sub-node set is not always maintained, and the collection of sub-nodes is also changed as the time axis is promoted, and the collection of children is also changing, so this tree is a dynamic tree in time. It is because of such an organizational mode, each object has a path indicating the location of the object in this tree so that the script is referenced. The path includes an absolute path and a relative path. The absolute path begins with the primary timeline; and the relative path begins by the current position, for example, the MC._Parent refers to the parent timeline of the MC. Flash timeline tree tissue mode (1)
Flash time axis tree tissue mode (2)