Home/Help/Import and export/Exporting a flow

IMPORT AND EXPORT

Exporting a flow

An animated SVG can carry its flows: the file starts in the flow's first state and reacts to the pointer as the preview did, with the player inside it. The page around it can follow and drive the flow from its own script.

Do it in the editor: guided tour5 steps · about 3 minutes · opens a practice scene

Step by step

  1. Open Export

    Click Export at the right of the top bar (Ctrl E), then Animated SVG across the top of the window.

  2. Start it with the flow

    In Playback, pick With the flow “Main” in Starts: the first choice whenever the file has a flow in use. Repeat, Direction and Speed then belong to each state, so their rows go; another Starts exports the plain animation.

  3. Try it in the preview

    Click the switch in the preview: the preview is the file itself. Under it, the LIVE bar says which state plays and What happened lists each step; Variables and Themes show there too when the flow has them.

  4. See what the page can call

    Click Embed in your site, then Player API. It lists what the page can call, with the file's own ids: player.flow() starts the flow again, player.flowState() names the state it is in, and the SVG fires cin:state on every change. A flow with variables adds player.set(), player.get() and player.send(). The other tabs have the code to put the file in your page.

  5. Download it

    Click Download .svg. The file has the player and the flow inside: it plays on its own in any page.

Good to know. A flow needs the JavaScript export, with the embedded or the external player (1.4.0 or later): CSS only can't run one, and says so. Every flow that is on goes into the file; player.flow("Name") switches to another. A link that a flow opens uses the page's window.open, and Send to the page fires cin:event on the SVG.

Keys

Ctrl EExport