Hi everyone,
when you try to use a variable xml.url I got an empty value
have anyone have any experience with xml.url?
thanks to all
xml.url is empty value
-
-
Hi,
in which case?
It should be only empty when calling loadxml()...
Best regards,
Klaus -
Hi, Klaus,
Code<action name="startup"> loadscene(get(scene[0].name), null, MERGE, BLEND(1)); trace(-------------------------------------------------------------------------------------------------); trace(xml.url=,xml.url); trace(xml.scene=,xml.scene); trace(xml.content=,xml.content); trace(-------------------------------------------------------------------------------------------------); </action>
use "o" to see, plsCodeINFO: ------------------------------------------------------------------------------------------------- INFO: xml.url= INFO: xml.scene=scene_air INFO: xml.content=<krpano><image><cube url="object/0/air.tiles/mobile_%s.jpg" /></image><autorotate enabled="true" speed="1" /><view fovtype="MFOV" hlookat="0" vlookat="0" fovmin="60" fovmax="140" fov="100" /></krpano> INFO: -------------------------------------------------------------------------------------------------
-
Hi,
sorry, you're right - when using loadscene() the xml.url is empty as well...
A loadscene(name, ...) is internally basically a loadxml(get(scene[name].content), ...) - so both calls finally run into the same code path where the xml.url will be set to empty.
Currently this behavior is intended (because it's not the originally loaded xml anymore), but changing this would be possible...
Best regards,
Klaus -
Hi,
sorry, you're right - when using loadscene() the xml.url is empty as well...
A loadscene(name, ...) is internally basically a loadxml(get(scene[name].content), ...) - so both calls finally run into the same code path where the xml.url will be set to empty.
Currently this behavior is intended (because it's not the originally loaded xml anymore), but changing this would be possible...
Best regards,
KlausHi , looks like xml.url is still empty when using scenes, is there a workaround ?
-
Hi,
yes, it's still empty because that's intended, I wrote it 'would be possible' to change that...
About 'workaround' - you could use the onxmlcomplete event and store the xml.url value when it is not empty:
Best regards,
Klaus
Jetzt mitmachen!
Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!