Hi, trying to get hotspot pixelwidth/pixelheight when dynamically added.
I use callwhen (hotspot[name).loaded...) with no success.
callwhen is executed even if pixelwidth/pixelheight values are not available, so is there a way to know when pixelwidth/pixelheight values are available ?
Code
<action name="seturl">
addhotspot(img_hs,ih);
copy(ih.ath,hotspot[%1].ath);
copy(ih.atv,hotspot[%1].atv);
set(ih.url,%1.jpg);
set(ih.width,300);
set(ih.height,prop);
set(ih.onclick,removehotspot(get(name)));
callwhen(ih.loaded,showlog();trace('width = ',ih.pixelwidth,' height = ',ih.pixelheight));
</action>
example : https://www.360images.fr/callwhen_loaded/
Many thanks !
EDIT: works with a delayedcall