Associated Email list Windows_For_Shockwave
Each of your projects that uses WFS needs a copy of the "1: prepareMovie" movie script in your Cast.
In WFS, each window has a Window Manager, and each menu has a Menu Manager.
A Window Manager consists of
A Menu Manager consists of
No WFS behavior apart from the "3: Window Manager" or "Menu Manager" behaviors is properly attached to a Manager. They manage.
Windows and menus are multi-sprite entities. If you're going to call it a window or menu, it has to have at least a Manager and a background sprite below the Manager that has the "4: Window/Menu Element" behavior attached to it. A Manager on its own is not a window or menu.
A window or menu element is a sprite that is part of a window or menu. Each window or menu element (except Managers) must have the "4: Window/Menu Element" behavior attached to it. If they ain't got their Element behavior, the Manager doesn't know they exist.
Static window and menu elements figure out (on beginSprite) which sprite is their Manager. They assume that their Manager is the closest, currently instantiated Manager that is higher in the Score than they are. They introduce themselves to their Manager, and only then does the Manager know they exist and make them a part of the window or menu.
Put another way, a window or menu element figures out which window or menu it is part of, and elements assume they're part of the window or menu that is managed by the closest instantiated Manager higher in the Score than the element.
However, after static elements auto-run their beginSprite handler and find their Manager, you can use the wfsAddElementToManager handler to change which Manager they are managed by, and that can be any instantiated manager regardless of where it is in the Score
Dynamic elements do not figure out who their manager is. They are informed by WFS handlers who their manager is. Why? Because their manager may not be the closest manager to them that is above them in the Score. They must be told, therefore. WFS manages this for you.
Static window and menu elements begin on the frame or after the frame that their Manager begins on. In either case, the Manager should be above window or menu element sprites during the full course of the element's instantiation.
Dynamic sprites do not have a terminal point in the Score like static (drag and drop) sprites do. Once a channel is puppeted, that channel is puppeted, regardless of what frame we're in, until the sprite is destroyed.
Upon instantiation, static parent windows or menus must be higher in the Score than their children windows or menus. Ain't no kids' lib heresorry kids: the kids are under the parents. After instantiation, you can use wfsSetParent or wfsSetChild to change the parent-child relationships as you please
Dynamic parent windows are not necessarily higher in the Score than their children.
If you create dynamic sprites, you need a copy of the Dynamism script in a cast.
Don't name your global variables such that they start with "gWFS". Don't name your handlers such that they start with "wfs". Don't name your properties such that they start with "pWFS". If you follow these rules, you will have no name-space variable conflicts with WFS. Why? All WFS globals start with "gWFS"; all WFS handlers start with "wfs"; all WFS properties start with "pWFS".
The WFS icons in the Library Palette are blue or green or both. Blue ones are involved in window construction. Green ones are involved in menu construction. Blue and green ones are involved in both window and menu construction.
WFS moves the regPoint of background window or menu elements to the top left of the background so it can move windows and menus around properly. The background sprite is the sprite below a Manager. It doesn't change the regpoints of other elements. Just the background.
For some reason you can't use Lingo to change the regPoint of a Shape member created with the Tool Palette. So you'll have to create such members with Window>Vector Shape. These are Vector Shapes rather than just Shapes. But Shapes don't work as backgrounds with WFS.
You only need only one copy of any particular WFS behavior you use in your movie.
If you get an error message from WFS, followed by a bunch of error screens, don't worry about the other error screens. Fix the first one first.
The 'Esc' key stops a movie in the Director environment.