Accesssing plugins and hotspots from javascript

  • I was wondering if this is a bug or a known change that I just happened to miss. I used to be able to tell if a plugin or hotspot existed by doing this:

    Code
    pano().get('plugin[map].spot[map_navy-pier_48]');

    Note that I'm not calling a specific attribute of the spot object. I'm not sure when this stopped working but now all I receive when doing this with plugins and hotspots is an error that says "Error in Actionscript. Use a try/catch block to find error."

    I tried it on a data object and it worked fine with no errors, it just returned the object as expected.

  • Hi,

    this seems to be a Flashplayer security limitations (you can see a Flash security error when using the debug Flashplayer),
    maybe it's just not possible to access Flash objects that have also private or protected variables...

    best regards,
    Klaus

  • Hi,

    I think this has something to do with some properties.

    for instance this works and return the complete object:
    krpano.get('view');
    krpano.get('display');
    krpano.get('propgress');

    these give errors with the flashviewer (havent tested jsviewer yet):
    krpano.get('image');
    krpano.get('plugin[n2]');
    krpano.get('hotspot[n1]');

    I'm not sure why this is and was hoping Klaus could enlighten and perhaps fix this issue?

Jetzt mitmachen!

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