Browse the notebook

Tag: document class

Dynamic Timeline Vars

this.myVar = "I am a dynamic variable";
trace(this.myVar);

// trace(myVar) // will cause an error

This code will add dynamic untyped variables to the timeline. Although this example is pretty useless, it scratches the surface of an interesting topic…. by default all flash timeline code gets compiled into a giant dynamic document class that uses the undocumented addFrameScript() function. This means that all import statements on the timeline, even ones not on frame one become part of this large document class.

Read snippet: Dynamic Timeline Vars