what is the first function loading ?

  • Hi,

    What function occurs first beetween this :

    Code
    addEventListener(Event.ADDED_TO_STAGE, startup_plugin);

    and this

    Code
    krpano.addPluginEventListener(this, krpano_as3_interface.PLUGINEVENT_REGISTER, registerEvent);

    ?

    I would like to know if, in the startup_plugin function, I can to access the name of my plugin, or if I have to wait for the registerEvent

    I don't know if my question is clear ...

    Thanks !

  • Hi, of course your question is clear

    1. first the ADDED_TO_STAGE event,
    2. then in this event - register the PLUGINEVENT_REGISTER listener,
    3. and then after this event has happend - you have the name/object and full access
    4. (and don't forget to clean up everything in the REMOVED_FROM_STAGE event)

    have a look at the examples sources of the plugins (*.as files in "plugins-sources/flex-sdk-mxmlc/")

    all plugins work in the same way:

    ADDED_TO_STAGE => PLUGINEVENT_REGISTER => using it -> REMOVED_FROM_STAGE

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!