Dont know if it's possible yet (I suppose no) to execute hotspot onclick onover onout etc... from an action :
<action name="my_action">
hotspot[name].onclick;
hotspot[name].onover;
...
</action>
Thanx !
Dont know if it's possible yet (I suppose no) to execute hotspot onclick onover onout etc... from an action :
<action name="my_action">
hotspot[name].onclick;
hotspot[name].onover;
...
</action>
Thanx !
Hi!
you can, but there is on edofference
for example
hotspot name="hs1" onclick="trace(ath)" - will trace THIS hotspot ath
and you can call it by hotspot[hs1].onclick();
but ath will be undefined becouse of different scope
Andrey
Great Andrey !
I just forgot the () at the end...
But this does work only for onclick isn't it, not for onover and onout ?
It works. E.g.
<layer name="test" myattribute="showlog();trace(works);" />
<hotspot name="test2" myhotspotattribute="trace(hi from hotspot);" />
<action name="my_action">
layer[test].myattribute();
hotspot[test2].myhotspotattribute();
</action>[/code]
call your action at will open log and trace works and in next line hi from hotspot
Hi!
yes, you can call any action .onclik .onover and so on
and, one more thing, you can call any castom actions too
hotspot name="test" my_custom_action="trace(custom);"
action name="test_action"
hotspot[test].my_custom_action(); - will trace "custom"
/action
And one more thing
you can add any custom tags and actions and use it anywhere
<custom_tag someattribute="23" some_action="trace(hello from custom tag)" />
<action name="test"> trace(get(custom_tag.someattribute)); custom_tag.some_action(); </action>
Hope it help
Andrey
Hi,
just as quick (preview) note:
In version 1.18 there will be a new 'callwith(caller, actions)' action - with that actions can be called with a custom caller scope.
E.g. to call the onclick event from hotspot[spot1] with the scope of hotspot[spot1]:
Best regards,
Klaus
Great!
feature request done!! super
Andrey
Don’t have an account yet? Register yourself now and be a part of our community!