In the joined file I trace them in the java console with the instruction ggbApplet.debug().
And the global code seems to be executed after the object code !
If you want to store a value, you must use a GeoGebra variable using ggbApplet.getValue() and setValue().
They seem to work fine (even other more complex applets).
Comments have been locked on this page!