Help with code please.

  • Hi all
    I am trying to make a button (plugin) open up another plugin (a photo) in the centre of my pano but it isn't working.
    Here is the code;


    Any help would be appreciated.
    Thank you.

  • Hi designsubway,

    I have copy past your code and it works....
    Only one mistake in line 23.... onclick="event:action(hidegymwindow,gympic);" .... the event: must be erased:

    Code
    onclick="action(hidegymwindow,gympic);"
    Quote

    ..... but it isn't working.

    Perhaps you are using an old version of Krpano ?

    Salut.

  • Hi,

    Your button is loaded right ? if so, and if your image is in the same folder as your button:

    Code
    <plugin name="ibutton" keep="true" url="plugins/info_button.swf"


    Use the same path to your image:

    Code
    <plugin name="gympic" url="plugins/gym.png"

    Salut.

  • Hi, the button loads fine.
    I had actually changed the paths to what you suggested after I posted my first query but it still doesn't work.
    I am going to try a different approach tomorrow and see if that works.
    Thanks for your help.

  • Hi,

    Make sure your button is enabled.... By default the pluging.enabled is set to true but perhaps somewhere in your code it is set to false.
    Try this code:

    Code
    <plugin name="ibutton" keep="true" url="plugins/info_button.swf"
    enabled="true"
    align="rightbottom" x="5" y="5" scale="0.8"
    onclick="action(show_gym_field);"
    />

    Also, try using a png or jpg file as button instead of swf to see if , for some reason , the problem comes from the swf himself. (do not think so but way to not try... the code himself is correct)

    Salut.

  • Hi designsubway,

    First, make sure you are using at least Krpano version 1.0.7 (see these post from Klaus)
    I think you have a path issue... Your code above is basically correct...
    I suggest you to use the following code for test purpose... It is a simplified code of the textfield example that comes with the Krpano 1.0.7 download file. This file use only one external file, the textfield.swf plugin... Simply, make sure you have this plugin in the right path: %SWFPATH%/plugins/textfield.swf.


    If the paths are correct and you use at least Krpano 1.0.7, this code must work.
    If it does, put your image and button files into the same folder than the textfield.swf plugin.
    %SWFPATH%/plugins/info_button.swf
    %SWFPATH%/plugins/gym.png
    And use this code:


    It should work well.

    Salut.

Participate now!

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