Using switch when changing button URL - problem

  • Hi joekki,

    Zitat

    Huh,
    I tried the same myself, and like you said, it worked...??? What's going one? Is it a security thing of the Flash again or what? I just copied the source code to index.html to my desktop with all the files and renamed those, and it worked.. I guess I have to double check the paths, like you said earlier.

    I have an other suggestion to do....

    Try to put your html page into the folder http://www.panoraamakuvat.fi/asiakkaat/ to see what's append. *unsure*

  • Klaus said:

    Zitat

    I hope I could clear that a little bit


    Now it is clear !!! *thumbsup*

    Zitat

    %SWFPATH% is always the path of the krpano.swf file,

    Then use it in all url on the xml file...

    I think I have learned a lot with this thread. *rolleyes*

    Thank you Klaus, and thank you joekki... like I said before I had some good time with that. *g* *g*

    Salut

  • a way to make also the dynamic "url" paths relative is to use the "placerholders",
    e.g.

    Code
    set(plugin[name].url, %SWFPATH%/buttons/image.jpg);

    %SWFPATH% is always the path of the krpano.swf file,
    this can be used to have always the full correct url, regardless of the BASE path,

    Hi Klaus, the code I'm using now is the following:

    And still, it doesn't work. Only the %SWFPATH%/buttons/btn_stop.png is shown.

    It is really strange. I would like to really know the reason. *w00t*

    At least we got some good time in grating the head. *thumbsup*

    Salut.

    Me too! *g* Hehe, soon we will loose all the hair..

    Hi Joekki,

    I noticed a new thing now in your new page *unsure* ....
    Look at the debugger (pressing the o key)

    Code
    WARNING: ExternalInterface NOT available

    *question* *question*

    Salut.

    Phew, that ExternalInterface thing is solved, I changed
    new SWFObject("http://www.panoraamakuvat.fi/asiakkaat/krpano.swf", "krpanoSWFObject", "100%", "100%", "9.0.28","#000000");
    to
    new SWFObject("/asiakkaat/krpano.swf", "krpanoSWFObject", "100%", "100%", "9.0.28","#000000");

    It didn't like the domain there. :P

  • Hi Joekki,

    Zitat

    Good times still continue. *squint*

    Your avatar have good looking... It seems this is a good place . I think I am going to take a sit beside that guy on this "ban public" (the wood sit,... don't know how in English) to take some beers and think on that. *smile* *smile* *cool*

    Must have a reason of that... *w00t*

  • Hi joekki,

    Zitat

    There it lies, and with the same results. Not working. *sleeping*

    why not to try with %FIRSTXML% or %CURRENTXML% instead of %SWFPATH%..... they must be the same path in this case but

    *huh*

  • Zitat von michel


    I have uploaded your files in my web site.
    Look at this link http://andorra360.com/Joekki/joekki.html
    It works.

    You have lots of work there! You have come here for a beer. *wink* *g*

    The solution must be with the paths, I am making the "/kuvat/krpano/" etc. folders with .htaccess file (mod rewrite).. Is that some how confusing the Flash? Only the "/asiakkaat" is a REAL folder.

    Zitat von michel


    why not to try with %FIRSTXML% or %CURRENTXML% instead of %SWFPATH%.....

    Now i have changed to the following:

    Code
    onclick="switch(plugin[rotate].url, %CURRENTXML%/buttons/btn_stop.png, %CURRENTXML%/buttons/btn_rotate.png); switch(autorotate.enabled);"

    And I tried with the %FIRSTXML% also, but still nothing..

    Zitat von michel


    Your avatar have good looking... It seems this is a good place . I think I am going to take a sit beside that guy on this "ban public" (the wood sit,... don't know how in English) to take some beers and think on that. *smile* *smile* *cool*

    Must have a reason of that... *w00t*

    http://panoraamakuvat.fi/kuvat/turku/au…kesakuussa-2009

    Welcome here in Finland for a beer then *cool* *thumbsup*

  • Hi Joekki,

    Zitat

    The solution must be with the paths, I am making the "/kuvat/krpano/" etc. folders with .htaccess file (mod rewrite).. Is that some how confusing the Flash? Only the "/asiakkaat" is a REAL folder.

    It seems you got it. *thumbsup*
    I have a really tiny idea about .htaccess file (mod rewrite) but It seems that is the cause. *rolleyes*

    Zitat

    Yes, I saw it a few days before, looking at your web site.., It's a great pano, catch at the blue hour and the men on the "ban public" gives sense to all the scene. great pano *thumbsup*

    The beer was excellent , sure i will come back again. *thumbup*

    By joekki.

  • Hello,

    Very interesting syntax to switgh button in a same line command. To go further, is ther any syntax to change the associated onhover showtext like
    onclick=" toggle (swhotext(on),showtext(Off));"

    <plugin name="rotate" url="buttons/btn_stop.png" align="bottom" edge="center" y="30" x="90" onhover="showtext(Pysäytä automaattinen pyöriminen / Jatka pyörimistä,infostyle)" blendmode="screen" onclick="switch(plugin[rotate].url,buttons/btn_stop.png,buttons/btn_rotate.png);switch(autorotate.enabled);" onover="set(plugin[rotate].blendmode,add);" onout="set(plugin[rotate].blendmode,screen);" keep="true" alpha="0.7" width="40" height="prop" />

    Regards

  • Very interesting syntax to switgh button in a same line command. To go further, is ther any syntax to change the associated onhover showtext like
    onclick=" toggle (swhotext(on),showtext(Off));"

    Hi,

    in the case of autorotation you could check for the current state and show the right message,
    e.g.

    Code
    onhover="if(autorotate.enabled, showtext(disable autorotation), showtext(enable autorotation) );

    or use an custom variables in the plugin that holds the on/off/current message,
    and switch them on click,
    e.g.

    Code
    <plugin ...
       hovermessage_on="disable autorotation"
       hovermessage_off="enable autorotation"
       onloaded="copy(hovermessage_cur, hovermessage_on);"
       onhover="showtext(get(hovermessage_cur),STYLE);"
       onclick="....; switch(hovermessage_cur, get(hovermessage_on), get(hovermessage_off));"
    />

    best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!