Beiträge von magnus

    Hello,

    from what I am seeing in your xml file you are using version 1.0.8 of krpano and the googlemaps plugin is from version 1.0.7
    The error showing up usually appears when the plugin version and the version of the krpano player do not match. Did you try downloading the latest krpano and replace your version of the googlemaps plugin with the current one.

    Magnus

    I am dealing with a huge hotspot in a panorama at the moment, which takes up almost 1/4 of the panorama. The problem I am running into is that one cannot move though the panorama with the mouse when nothing but the hotspot is visible, as the movement of the mouse after pressing the left mouse button is not recognized by krpano.
    Is there any way to solve that problem, as I am about to do a panorama tour including a lot of large hotspots and I want to use to be able to move though it using the mouse.

    Thanks in advance,
    Magnus

    Thanks a lot for the help again, michel.
    Your solution works fine for me, even when using a new picture for ondowncrop it switches back to the original picture when I am releasing the mouse button.

    I was hoping to get around using another attribute but as long as it works I am fine with this solution.

    Hello,

    I am using one a png image for all my buttons in a panorama, and am cropping parts from it for the buttons and the images for the onover event.

    Code
    <plugin name="help"
    	url="buttons/buttons.png"
    	crop="96|0|16|16"
    	onovercrop="96|16|16|16" />

    The problem is, that when I am holding the left mouse button pressed while being on a button and moving the mouse away from the button it keeps the crop from the onover event and does not go back to the original button image. In my example the button says red (onover colour) instead of going back to black (normal colour).
    Is there any workaround for this problem?

    Thanks in advance,
    Magnus

    Ich habe mir das Ganze gerade mal angeguckt.

    Du musst in der zum Panorama gehörenden xml-Datei die buttons-include.xml includen

    Code
    <include url="buttons-include.xml" />

    In der buttons-include stehen die einzelnen Buttons, wie dieser:

    Code
    <plugin name="in"   	keep="true" align="bottom" x="-160" y="10" url="buttons.jpg" crop="160|0|40|40" onovercrop="160|40|40|40" ondowncrop="160|80|40|40" blendmode="screen" ondown="set(movevectorz,-1);"  onup="set(movevectorz,0);" />


    In der buttons.jpg sind die Bilder zu den Buttons abgelegt. Mit dem crop Befehl gibst du an welcher Ausschnitt aus dem Bild angezeigt werden soll. Das selbe für onovercrop und ondowncrop, die das Bild beim mouseover und klicken festlegen.
    Mit x und y wird die Position der Buttons festgelegt.

    Magnus

    Hallo Jürgen,

    guck mal im krpano Verzeichnis in examples/buttons
    Es ist zwar keine Anleitung, aber wenn du das Beispiel Schritt für Schritt bearbeitest solltest du zum gewünschten Ziel kommen.

    Magnus

    Code
    <plugin name="textfeld"
     ...
     alpha="0.50" />

    Mit dem alpha Attribut kannst du das komplette Textfeld transparent machen. Der Wertebereich beträgt 0 bis 1. Der Text wird dann allerdings auch transparent.

    In dem Zusammenhang fände ich ein Attribut backgroundalpha sehr nützlich, das nur die Hintergrundfarbe und mögliche Rahmen transparent macht, nicht aber den Inhalt (Text und Bilder).

    Schöne Grüße,
    Magnus

    Strange. I am using the krpano1.0.8beta8 for this. No html embedding, just the swf and xml file. Not even a panorama picture included.
    I will check your version as soon as I am on my home PC michel. Hopefully it works for me. I will also reduce my xml file to this action only, to make sure the problem is not coming from another part of the script. I'll keep you updated.

    Thanks a lot for your help, michel. It is great to know there is a forum with people helping whenever you are running into a problem. Hopefully I can give back some of that one day. :)

    Thanks a lot for the help michel. I just tested it, but without success though.

    Here is the full script I am working on. It adds a close button to the top right corner of a textfield, at least that it what it is supposed to do. (The maths is a little of at the moment.)

    I added the showtext to test if my variables are ok. What I ran into is that it has to be

    Code
    showtext(get(newx));

    , to show the value of the variable. If it is

    Code
    showtext(get(newx););

    instead of the value ot the variable the text "get(newx);" will be displayed, which is a little strange I think.
    As a result of that I think it also has to be

    Code
    set(plugin[%1_close].x, get(newx));

    and not

    Code
    set(plugin[%1_close].x, get(newx););

    . However, I tested both without succes. The button does not even show up.When I am setting the values for x and y by hand (180 and 80 instead of the get statements, same values as the variables) it works fine. So the problem must be on the get part.

    Help would be greatly appreciated.
    Magnus

    Thanks a lot Klaus.
    Adding plugins and calling actions with parameters works just fine. However, the maths leaving me puzzled.

    I tried to write an action that moves a plugin based on its width. (The example does not make a lot of sense yet, but it part of something bigger.) When calling the action it gets the name of the textfield plugin to move as a parameter. When I am calling the action nothing happens whatsoever.

    Code
    <action ="moveplugin">
    	<!-- %1 = nameoftextfield -->
    	set(txtwidth, get(plugin[%1].width));
    	sub(newx, txtwidth, 20);
    
    
    	set(plugin[%1].x, newx);
    </action>

    I tried adding another plugin with it which works, so the problem must be on the mathematic part of the action or the variables.
    Any ideas? I also tried storing the value of the substraction in txtwidth, instead of newx, but that did not change anything.

    Thanks in advance,
    Magnus

    Thanks for finding the missing bracket. Finding that out of an xml parser error would have taken lots of time most likely.
    I just tested this with the 1.0.8beta8 and found out you must not put quote sign around false, because you'll run into a parser error otherwise.
    Both if statements in this thread are working fine. Thanks again for pointing me into the correct direction michel.

    Next part to find out is how to realize basic mathematic operations with my variables, in case the variable is an int, float whatever. And how to call actions with parameters.

    Thanks a lot for the help, michel
    This means it is time to update to 1.0.8 beta. Seems like the is a new feature. Great to know it works.

    As I need the variable the full action would have to look like this:

    Code
    <action name="callhelp">
    set(helpvis,get(plugin[helptext].visible));
    if(helpvis  == false, set(plugin[helptext].visible,true);, set(plugin[helptext].visible,false;);
    </action>

    helpvis is a global variable in this case, so I can use it in other actions as well?
    And what about quote signs in line 3 for false? I think things can turn out strange when a variable is named the same as any argument of any attribute set in the xml file, so it might be better to used quote signs for normal text.
    Klaus, if you are reading this, what is the reason for the syntax? I am not familiar with actionscript, but I would somewhat prefer to see javascript syntax and full javascript support, as it would open the door to web2.0 features integrated into krpano.
    Whatever, I am looking forward to play with this some more tomorrow and getting used to the syntax.

    Magnus

    Hello,

    I am new to krpano and I totally love what I have seen so far. Simply the best pano viewer. Great work Klaus and everybody else who has contributed.

    At the moment I am trying to figure out what is possible with this tool, so I decided to write a simple navigation. The basic idea is that a textfield opens when the user clicks on a button and closes again on the next click on the button.
    Here is the action I wrote for it:

    Code
    <action name="callhelp">
    	var helpvis = get(plugin[helptext].visible);
    	if (helpvis == "false") {
    		set(plugin[helptext].visible,true);
    	}
    	else {
    		set(plugin[helptext].visible,false);
    	}
    </action>


    It does not return an error once it is loaded, however if I click the button nothing happens.
    The basic version of it with the following action works fine, so it must have to do with the variable and/or if statement. Based on the documentation I am not even sure if javascript is possible in the xml file.

    Code
    <action name="callhelp">
    		set(plugin[helptext].visible,true);
    </action>

    Help would be greatly appreciated,
    Magnus

    Edit: I am using the 1.0.7 demo for testing.