How can I add a mute button ?

  • Thanks Job1. I finally figured this plugin was from the beta. But I can't get anything to happen. Do I need to code my own litle buttons as swfs ? The documentation on this stuff is a bit sparse.

    ( I also just took the soundinterafce.swf by itself from the beta and dropped it into my existing plugins folder. I suppose that is OK ? )

  • OK, done that, but still no luck.

    I must say that the haphazard blobs of XML scattered about various areas of this site, combined with the awful command line "interface" of the tool set, makes KR Pano one of the most horribly tedious time-vampire apps I've used in a long time.

    But I am most grateful for your help Job1 ! *smile*

  • You are very kind to keep going with me !

    I have tried various permutations of the buttons. I can get one to appear top-left, and the "hand" appears on rollover, but never any sound.

    The old sound.swf works fine. *sad*

  • Here's the documentation from the original posting. I agree... things get scattered about when using the beta version since all documentation is in the forum... but there's no other real place to put it I guess, until the "stable" version is released and the main site is updated.

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

    A new Sound Plugin - soundinterface.swf

    • this plugin adds functions to play and controls sounds direct from the xml.
    • only this one plugin must be loaded for all sound.


    Attributes:

    • onloaded
      • this action is called when the plugin was loaded and is ready for use.
      • can be used for preloading sound.
    • rootpath
      • root path of the sound files.
      • relative from the xml file, default="".

    Functions:

    • preloadsound(mp3file);
      • preloads a sound file
      • this can be used to reduce the latency when starting play
      • mp3file = the filename/path of a sound file
    • playsound(id,mp3file,loops);
      • plays a sound file
      • id = id/name of the sound (use "auto" for a automatic new id for every play)
      • loops = optional, number of loops, 0=endless, default=1
    • stopsound(id);- stops playing a sound
      • id = id/name of the sound
    • stopallsounds();
      • stop all current playing sounds

    XML usage example:


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

    Looks like Job.1 identified it correctly... you are not specifying an ID (i.e. mymusik) for the sound in playsound.

  • Thanks for all the help here *smile*

    I do like KRPano, and it is very powerful. I'm finding you just need to be patient.

    Anyway, for reference purposes, here's the code which finally worked. MP3 is called "chica.mp3", and there's two buttons positioned along the bottom called "play-sound.png" and "stop-sound.png". Everything else is standard.

    Edit: One thing still puzzles me. Why is the soundinterface plugin 500 x 375px ? Is it meant to include its own buttons ?

  • If you want switch the sound button to mute button, and you have only once button for the music

  • Edit: One thing still puzzles me. Why is the soundinterface plugin 500 x 375px ? Is it meant to include its own buttons ?

    Hi,

    this size is determined from the editor plugin,
    every swf has a "default"-size defined, even if there are no visible elements, but the editor plugin doesn't know that,
    so the values can be just ignored (or better - removed - to avoid confusing )
    but anyway - I will try to fix this in the final editor version.

    best regards,
    Klaus

Participate now!

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