usecontentsize, distorted and dimensions problem

  • Hi,
    What I'm trying to do is to create a hotspot that reads a bitmapData from the other plugin and displays it. The communication part is solved already. The problem is when I'm trying to set the distorted attribute to true. The image is being cropped! I can see only the portion of the swf that is defind by: [SWF(width=....)] in hotspot's swf file. When distorted is set to false the hotspot shows whole image (loaded bitmapData from the plugin). I can't set the [SWF(width and height)] values because it's depended on the plugin that sends the bitmapData and on xml file. When i set width and height in xml then my hotspot is being stretched (scaled). I've found the usecontentsize attribute that sounds like a solution for me but when i set usecontentsize to true then hotspot disappears.
    So, in other words: I want to create a hotspot with dinamic dimensions that don't crop the conent and is distorted.
    How can I achieve it?
    Please help. Without this hotspot whole project and months of work will go to trash.

  • Hi,

    the plugin object has a function for setting the size of the internal bitmap that was used when using a plugin as distorted hotspot:

    Code
    var plugin_object:Object = krpano.get("hotspot[name]");
    plugin_object.setbitmapsize(newwidth,newheight);

    additionally you could access the internal BitmapData object via the "bitmapdata" member of the plugin object,

    but note - this are internal interfaces, they are not documented because they could maybe be changed in future versions!

    best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!