Associated Email list Windows_For_Shockwave
Tutorial 8: wfsWriteElement
wfsWriteElement is a handler defined in the "Script Writer" script, which is new to WFS 4. wfsWriteElement writes Lingo code for you that allows you to make dynamic copies of elements of multi-sprites that you have constructed in the Score.
Static sprites are sprites that you see in the Score. Normally you drag Cast Members into the Score and compose movies that way, ie, normally you compose movies entirely of static sprites. But you cannot destroy static sprites and remain in the same frame of the movie. The way static sprites are destroyed is to move to a different frame and have the static sprite not be present in that frame. This can pose problems for the number of features and options you can present users at the same time.
Dynamic sprites are created via puppeting sprite channels and populating the channel with a cast member. You cannot see dynamic sprites in the Score while the movie runs in authoring mode. But you can see them on the stage.
Tutorial 8 is about how to use wfsWriteElement to create dynamic elements of multi-sprites. It goes step by step through an example of the use of wfsWriteElement in the WFS48x.DIR source code. WFS48x.DIR is in the 'samples' folder of your WFS documentation.
The tutorial also shows you how to destroy dynamic elements of multi-sprites.
There are 10 steps involved in using either wfsWriteMultiSprite, wfsWriteMultiSpriteFamily, or wfsWriteElement. The documentation about the "Script Writer" script outlines the generic 10 steps. But the documentation of each of the three public handlers of the "Script Writer" script (wfsWriteMultiSprite, wfsWriteMultiSpriteFamily, and wfsWriteElement) each contains a very detailed example that goes step by step through the 10 steps of each particular handler.
It is recommended that you just go through the whole documentation of wfsWriteElement to get a detailed picture of how to use wfsWriteElement.
|Tutorial 8: wfsWriteElement|