wierd onover/onout behavior

  • this is the code I used to change an icon from A to B then back to A again. at some point it stopped working. all it does now is flash. this code used to work or else the zoo would not have paid for it. i have no idea when it quit working or why. god I look at the code i used to create this tour and it is embarassing now. created plugins for everything rather than using actions and variables. i am not going to go back and recode everything I just need to figure out why this stopped working and why it puts things into a loop now rather than work the way it did when it was first written.

    onover="set(url,heads/polarbear.png); tween(scale,1); set(hotspot[polar].visible,true);"
    onout="set(url,hotspot_ani.swf); tween(scale,.35); set(hotspot[polar].visible,false);"

    http://www.virtualnorthland.com/panos/world/ hover over any of the "I" buttons.

    any ideas?

  • Sorry if this is bogus, I'm on my phone and can't check it, but for the onout event shouldn't you set the visibility in the "ondone" parameter of the tween command? Otherwise you start the tween and then immediately execute the next command which changes the visibility...

    My best guess...

    Steve

  • there is an 'ondone' ? i was not aware of this parameter. I may just end up changing it the the animal icons and skip the changing of the url. i also though of creating an action that sets the onout at the end and leaving that blank in the main plugin. i think that would stop the loop also. i just can't wrap my head around why it used to work. nothing had changed.

  • there is an 'ondone' ? i was not aware of this parameter.


    It's actually documented at the donecall argument, not the ondone--sorry. It's the fifth argument for the tween command.

    i just can't wrap my head around why it used to work. nothing had changed.

    There were definitely some changes to the way some of the commands worked in one of the recent releases. I would not set the onout parameter as a default and set it inside the onovercrop event (as the last command). That may fix your problem.

  • Hi,

    that onover/onout and url changing behavior is a problem/bug in the current version,
    when the url was changed then the image was not there for a short moment and therefore
    the mouse is not hovering the image itself anymore and therefore the onout event was
    called, which changes the url back again - that's the problem here,

    in the new version this is fixed/corrected internal,

    but for the current version this here would be a workaround - change the onout event to that:

    Code
    onout="delayedcall(0.1, ifnot(hovering, set(url,hotspot_ani.swf); tween(scale,.35); set(hotspot[polar].visible,false); ));"

    best regards,
    Klaus

Participate now!

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