plugin may fail to get correct values after a loadstyle - when plugin has a parent in scene onstart

  • <style name="blue" url="%SWFPATH%/skin/seeit360_blue_v3.png" ></style>
    <style name="green" url="%SWFPATH%/skin/seeit360_green.png" ></style>

    <plugin name="next_scene" align="right" url="%SWFPATH%/skin/next_prev_<?php print $style ?>.png" crop="0|92|90|92" onovercrop="90|92|90|92" onclick="nextscene();" autoalpha="true" visible="true" alpha="0" zorder="1" keep="true" tag="nav" />
    <plugin name="next_diamond" parent="next_scene" align="right" stylet="<?php print $template ?>" style="<?php print $template ?>" crop="328|160|15|18" capture="false" rotate="180" x="17" y="0" zorder="2" keep="true" tag="nav" />

    <scene onstart="plugin[next_diamond].loadstyle(green)"
    </scene>

    The x,y position are not updated correctly or something.
    Reading out the values is correct, but the onscreen display is wrong.
    settting x to itself pops it back into place.

    removing parent and it works again or otherwise calling loadstyle when a scene is not loading.

  • Hi,

    Thanks for the example!

    A quick update - the problem was not directly related to the style or the loadstyle, it was related to the url changing and the reloading.

    In version 1.0.8.15 there are a lot of internal performance optimizations that should avoid unnecessary recalculations of the <plugin> elements. And because of this, in this case the child elements weren't updated correctly (or better - updated at the wrong moment - during loading, where the parent image still has the size 0x0).

    In the next release this problem will be fixed.

    Best regards,
    Klaus

Participate now!

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