[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:

    <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));

    Any idea?*confused*

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

    Edited once, last by Fernando (May 11, 2024 at 4:58 AM).

  • Fernando May 11, 2024 at 4:54 AM

    Changed the title of the thread from “Why this code fails the first time?” to “[Solved] Why this code fails the first time?”.

Participate now!

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