I love Snowman because I'm good with jQuery but the missing macros really bother me....
How can I display one passage within another? I have some scripts that I reuse often but organizationally don't really belong in Story Javascript.
Additionally, has anyone got any ideas about implementing prerender and postrender events in Snowman?
Comments
note: The following example includes very basic namespace and function definitions for simplicity sake.
a. Define your custom functions using a namespace. b. Call the function within your passage
You use the story.render function to do this
The story.show function is called when a the story navigates between passages, it includes a number of events which can be used to run custom code.
a. The showpassage event, which occurs before a passage is shown. You can use code like the following in your Story Javascript area: b. The showpassage:after event, similar to the A except it occurs after a passage has been shown. You can use code like the following in your Story Javascript area: C. The passage _readyFunc helper function can be used within a passage to setup a customer function to be called on only that passage's showpassage:after event. You use the special $ method: