Displaying static images

  • Hi there

    I'm making a tour where I have some static images which are displayed after an hotspot is pressed. The images are displayed by changing the "url" parameter of a plugin and then making it visible.

    However, after the image is "loaded", it can be seen changing to its (correct) position from some other position. This happens very quickly, but it can be seen. Is there some way to wait until the image loads completely after the plugin's "url" parameter is changed, so that I can make it visible only then?
    Also, would there be some way to "preload" these static images without having to create one plugin for each of them?

    Thanks
    Manuel


  • Nevermind, managed to find a hack around it :)

    Right after the panorama loads, I set the "url" of the then invisible plugin to each of the images one right after another. This seems to force krpano to start loading the images, so when I really want to display them and make the plugin visible, they appear much quicker.

  • In case someone is interested, it seems that this is not such a good way to display pictures. When I switched between displaying 2 different pictures (so, changing a plugin's URL some times), krpano got really slow. I wonder if this has something to do with memory management, since when I looked at it with Editor, I noticed that the "mem imagefiles" and "mem imagedata" went down to "0" whenever the url was changed.

    So, the way I solved this was by dynamically creating a plugin for each picture. Then I just adjust the alpha parameters, depending on which one I want to display.

    I guess that displaying pictures is a problem of its own, which is probably why you have flash plugins done just for this :P I think the perfect solution is to have such a flash plugin which can be embedded in KrPano and controlled from KrPano. And it would be really great if also had zooming capabilities.
    I'm thinking of messing around with OpenZoom a bit, as it is open source. I'm a programmer, but I don't have any experience with ActionScript/Flex/Flash. I don't even understand all these things are related... So, I have a couple of questions. Are Flex and Flash platforms to develop swf applications? Is AS a language used in both Flex and Flash? Is there some tutorial on developing a plugin for KrPano, or some example source code?

    Thanks a lot. I'm very happy with what I've been able to do with KrPano so far, but I would like to take it to the next step and extend it with plugins.

    Cheers
    Manuel

  • Hi,

    Is there some way to wait until the image loads completely after the plugin's "url" parameter is changed, so that I can make it visible only then?

    there is the "onloaded" Event, it will be called when the image was loaded completely,
    normaly the image shouldn't be visible before completely loaded and positioned...


    I noticed that the "mem imagefiles" and "mem imagedata" went down to "0" whenever the url was changed.

    the "imagefiles" and "imagedata" values are counting only the pano (tiles) memory usage,


    So, I have a couple of questions. Are Flex and Flash platforms to develop swf applications? Is AS a language used in both Flex and Flash? Is there some tutorial on developing a plugin for KrPano, or some example source code?

    AS3 (Actionscript 3) is the basic language for Flash,
    Flex and Flash CS are just frameworks,

    for developing flash apps just the free mxmlc compiler is necessary (it is included in the free Flex SDK),

    here is a very great beginners tutorial for it:
    http://www.senocular.com/flash/tutorials/as3withmxmlc/

    and here the as3 language reference:
    http://help.adobe.com/en_US/AS3LCR/Flash_10.0/

    some plugin sources were included in the 1.0.7 download package,
    get it here from the download archive:
    https://krpano.com/download/archive/

    best regards,
    Klaus

  • Manuel- I am also interested on displaying static images along side my panoramas. Would you be kind enough to share a link to your panorama with static images and explain how you achieved it. Is this done in XML, or did you have to write some action script code?

    Is there <image type=??? > xml tag for displaying static images?

    Any info would be appreciated ...

Jetzt mitmachen!

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