ssCore.init

Initialization method for ssCore.


Availability:

First available in version 3.0 build 2039.


Parameters:

None.


Notes:

Method; used to initialize ssCore. This method is optional but it is recommended that you use it as the first V3 ActionScrpt API call. Typically you would write this as the first line of code in frame 1 of your main movie. You only need to use this in a movie that is running as your main movie in _level0. If you load another movie into _level0 you will need to call this method in that movie as well.

ssCore does not require the init method to initialize ssCore, however it does safeguard you against a limitation of the ssCore initialization process. When your main movie loads, Flash will call an onData function in _level0. ssCore contains a function for initialization that is called when the onData event is triggered. Because of this it is recommended that you do not write a function called onData in _level0. If you must use an onData function in _level0 use ssCore.init in frame 1.

If you write your function as _level0.onData = function (){...}, it will not exist and will not be called. This is because ssCore protects its onData function. However, if you provide a named function as function onData(){...}, the ssCore onData function will be overwritten and your onData function will be called. In this case the ssCore initialization will never occur and you will not be able to receive any callbacks from the ActionScript API.

By writing ssCore.init() as your first command, you ensure that the API initialization occurs without having to worry about the onData limitation.


Examplpe:

ssCore.init();