Close multiple images/textfields etc.

  • Hello,

    Is there a simple way to close multiple components when opening another. For instance I have googlemaps, an about, image info, etc. Right now the user can click open all components and they will stay open. I'd like to open one while closing the others. I know I would have to include a statement on the onclick to call all the actions that relate to each and every button or hotspot but that seems to be a lot of repeat coding. If there is a simpler way please let me know.

    Thanks

    Robert

  • Robert,

    You can write an action called "SwitchComponent" (or whatever) and pass as a parameter the name of the component you wish to make visible.


    (I haven't tested this, but this is how I would go about it.)

    Good luck.

    - Ronny D'Hoore

  • Sorry but I'm not understanding the switch component and how to integrate it into what I have below. Right now I have each hide action in the onclickA which works but when you want to go back to a particular plugin you have to click it twice. At some point this may also get to big if there are more than 5 actions. If it can be done without too many changes to what i have I would like to find a better solution. Thanks in advance.

  • This is almost getting ridiculous.

    I am trying everything to get a switch working. I tried using the example below and it does not work.

    I have created two button hotspots and am at a loss as to how to get them to work.

    Can someone please help as there are no examples that show a simple example

  • they're both plugins.

    About us is a textfield and maps is googlemaps.

    I have two hotspots.

    Sorry, I'm use to pano2vr and not a programmer. I figure if I can at least get two working I can apply it to the rest of my the plugins that have to act the same way.

    Thanks for your help!

  • Ok, I have it half working. Although each hotspot button fires off each plugin, what it doesn't do is when one is clicked close the other automatically. Here is my code.

  • Hello,

    Can someone please confirm whether this is right or wrong? Obviously many have looked at it, some offer fixes that are vague and then don't want to follow through. Don't get me wrong I appreciate the help but it is very frustrating when people just disappear.

    I'm new to krpano and not a programmer but learning. I just need to tweek some of these settings.

    Thanks

    Robert

  • Hi Robert,

    Your are trying to make a custom action with name switch... switch() is already an native Krpano action...
    try something like:

    Hope this help...

    -------------------------------------------------------------------------

    " I take and returns back ..."

    Quote

    Obviously many have looked at it, some offer fixes that are vague and then don't want to follow through. Don't get me wrong I appreciate the help but it is very frustrating when people just disappear.

    Yes, also frustrating is when people simply do not appear and just asks questions and takes what they need... Of course it takes some effort to take the time in answering... That's why the answers are so valuable... (I just take this opportunity to make think... Nothing personal)

    SAlut.

  • Hello Michel,

    Thanks for the help but I am not a programmer and my programmer who does understand this got into a very bad accident and is disabled. Rather than looking for someone else to do the work I thought I would give this a try as I need to keep my business going. I'm not stupid and have come a long way in a very short period of time.

    So as an example when someone sends me a very cryptic example of code do you think I should ignore it and right away ask someone else if it is right or wrong. If you noticed when the original post was made, I have been attempting to get it working, and looking at other examples, but looking at the example given how would I think it was already in KRpano. Also if you notice I have asked other questions and still waiting on a possible answer, for example when the next version is coming out with the fix for mis-aligned tiles. I still don't have an answer for that and I have clients that want to see their properties on an ipad.

    Having said all that if I knew as much as some of you already know on the workings of krpano, I would certainly give and not only take as you implied. No point giving back something I don't know that much about. This way Krpano becomes better overall if everyone can show it's capabilities and I really don't believe someone in France, UK, Germany, or elsewhere would really be my competition.

    Sorry if it the help is of a time limit on this forum. Teaching is one of the greatest gifts one man can offer another.

    Robert

Participate now!

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