Change design_bgcolor at runtime

  • Hi folks!
    It is possible to change the skin_settings.design_bgcolor at runtime?
    I'm trying with:

    Code
    <action name="load_italyart_scene">
        loadscene(%1,null, MERGE, LIGHTBLEND(1.0, 0xFFFFFF, 2.0, linear));
        set(skin_settings.design_bgcolor, 0xE93730);
        trace('0xE93730');
      </action>

    Thanks,

    Namastè.

  • I would say this way: Yes, it is possible to change skin_settings.design_bgcolor when ever you want but the question is what you want to achieve with it. This is like changing any other variable set(a,123);
    If you want that some element (layer/hotspot) that is already using "old" value be updated I think you have to set their attributes again with new values. Maybe updatescreen() or invalidatescreen() could do this too, not sure. Check this.
    Umalo

  • Hi,

    in vtourskin.xml the value of skin_settings.design_bgcolor will be evaluated a xml-parsing time via the special get: and calc: attribute values.

    That means during the xml parsing the values will copied/calculated, but after xml parsing at run-time there is no relation anymore between the design_bgcolor variable and color values of the other elements.

    You could write a kind of 'update_bgcolor' action and update there all elements that should use that color.

    Best regards,
    Klaus

Jetzt mitmachen!

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