Associated Email list Windows_For_Shockwave
Tutorial 3: The Score
Tutorial 3: The Score
Check out Scene 3 of the feature tour. The source code is available in WFS48x.DIR which is in the 'samples' folder of your documentation.
Scene 3 illustrates that multi-sprites do not have to form rectangles in the Score. The rule is simply this: when elements come into existence, they become elements of the nearest, higher, instantiated manager in the Score.
Scene 3 also illustrates that WFS 4 implements smarter multi-sprites than in version 3.0. Note that you can move the window around when the movie is playing, and then click the big arrows in the windows of scene 3. This takes you to another part of the Score where new elements of the window are born. Yet even though you have moved the window around, the newly born elements are positioned correctly within the window. Elements that are born after the window has been moved around are positioned relative to their position in the window during authoring, rather than being positioned exactly where they were authored.
The below Score illustrates two (unusual) windows: an orange window and a blue window. Note that sprite 8 becomes a part of the orange window when it comes into existence in frame 5. Because the blue manager is not instantiated in frame 5. In frame 5, the orange manager is the closest, higher, instantiated manager to sprite 8 in the Score.
Note also that the background element of both the blue window and the orange window begins and ends on the same frame as the manager. The background element of the orange window is sprite 2. The background element of the blue window is sprite 6. Background elements should be instantiated through the same frames as the manager.
Note also that there is an empty channel between sprite 9 and sprite 11. This is OK. When sprite 11 comes into existence in frame 20, the blue manager is the nearest, higher, instantiated manager, so sprite 11 becomes an element of the blue window.
Although, upon instantiation, elements locate the nearest, higher, instantiated manager in the Score and become elements of that multi-sprite, you can, thereafter, use the wfsAddElementToManager handler to make their manager be any instantiated manager, regardless of where it is in the Score. See tutorial 4 for example usage.
When elements end in the Score, they tell their Manager about it. The Manager then deletes the element from the list of sprites managed by the Manager. Managers maintain a list of the spriteNums of the elements they manage. A duplicate of this list is retrievable via wfsGetElementList.
|Tutorial 3: The Score|