[Solved] Why this code fails the first time?

  • Please, helpme:

    This code doesn't work the first time when the web page loads, the rest of the time it works fine:

    Code
    <action name="centermylayer">
    set(layer[skin_map_scrollarea].x, calc(layer[elstand].x * -1));
    set(layer[skin_map_scrollarea].y, calc(layer[elstand].y * -1));
    </action>

    Any idea?*confused*

    Solved: preload="true" in layer "skin_map_image" (parent is skin_map_scrollarea)

    Einmal editiert, zuletzt von Fernando (11. Mai 2024 um 04:58)

  • Fernando 11. Mai 2024 um 04:54

    Hat den Titel des Themas von „Why this code fails the first time?“ zu „[Solved] Why this code fails the first time?“ geändert.

Jetzt mitmachen!

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