JavaScriptInjections

This is a pseudo-class, similar to a Model in an MVC configuration. It stores various inclusions to be packaged with the API into the final SWF. This may include anything from encryption keys and hashes to JavaScript injection code but from the code perspective it is merely a data payload (hence the name).

As a general rule, it is good practice to enclose any freeform data or code in XML CDATA section to preserve formatting.

XML standards state that CDATA sections are to be used as-is (not interpreted), but this seems not to be the case with Flash. When using a backslash (“\”), Flash interprets this as an escape character. To use a single backslash in the injected code, it must be doubled in the CDATA section. A simple find/relpace operation should ensure correct formatting.

__/ NOTES \__

This class includes third-party packages that were not written by Bay New Media. Licensing on each package may differ from the BNMAPI MIT license so please read each injection header below before using the library in your own project.