get variable problem

  • I'm having trouble understanding how variables work

    I'd like to use a language cookie to set a variable which I can then use to select which images to display. So to get started I'm testing this code:


    the first trace shows the correct variable but the second trace, inside the action, shows that get(language) is null

    I'm baffled...



    4 Mal editiert, zuletzt von hfeist (30. Juli 2015 um 19:13)

  • I've now got it working by moving the showLanguageBtn() call from the scene onstart

    <scene name="scene_GareRilly_pano" title="GareRilly" onstart="showLanguageBtn();" thumburl="panos/GareRilly_2_pano.tiles/thumb.jpg" lat="" lng="" heading="" >


    to

    <events name="currentpano" onnewpano="showLanguageBtn();" onremovepano="stopsound(bgsnd);"/>


    I guess there wasn't enough time for the variable to register

  • I don't think there's a good reason to put actions in scenes.
    There's a definitely code loading order which you can see what happens when by using traces.

    For scene specific action code use <scene onstart=""
    besides anything in actions has to be redeclared unless you have keep="true" although I'm not sure it works for actions. Very strange. First time I've seen an action inside a scene.

Jetzt mitmachen!

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