Beiträge von MMeldrum

    Is it possible to have two tween actions occur simultaneously?

    I want to have the visual effect of a new hotspot 'dropping' into the KRPano image by combining scale and alpha. The following code would ideally add a hotspot and then animate it 'down' onto the KRPano:

    Code
    // initial setup
    addhotspot(h);
    set(hotspot[h].scale, 10);
    set(hotspot[h].alpha, 0.3);
    // now animate
    tween(hotspot[h].scale, 1, 0.5);
    tween(hotspot[h].alpha, 1, 0.5);

    ..but the last two lines, of course, are executed in serial. i.e. the hotspot first reduces in size and *then* becomes opaque.

    Can this be done?

    I am trying to add hotspots dynamically using javascript. Everything seems to work except setting the style attribute, which is being ignored. (I can set the img attribute but if I use a style containing an url, the img is ignored.)

    For example, with the following style in place:

    Code
    <style name="skin_hotspot" url="hotspots/ico_doc.png"/>


    ..setting the style does not work:

    Code
    krpano.set("hotspot["+name+"].style", "skin_hotspot");


    ..but setting the img to the same image path does:

    Code
    krpano.set("hotspot["+name+"].url", "hotspots/ico_doc.png");

    Is there a reason why the two results would be different?

    Thanks
    Martin

    Thanks for the reply.

    Having looked into it further I've also realised that the objects (hotspots, etc.) are not held in a single object 'graph' but are in separate arrays of objects.

    I guess I misinterpreted the editor.swf, thinking that it showed use of an API call to retrieve the updated XML. (I think it should be more clear that there is no underlying single KRPano state.)

    Edit: thanks for confirming Klaus - I didn't see your reply until I had already clicked 'Submit'. We will extract the properties from KRPano and apply the changes to the original XML stored in our database. It's an extra step but not a big problem.

    Hi,

    I am trying to extract the generated (i.e. 'live view') XML from KRPano using the API. It seems that the variable "xml.content" only contains the original XML before it was manipulated (e.g. hotspot added).

    I can see that the Editor plugin has a "get generated xml" button which does exactly what I require, but the plugin source is not available to see how it is done.

    How can I extract the 'live' XML from memory?

    Thanks.

    Martin