Hello:
i need to add many hotspots dynamically by code, and add onclick action for every hotspot; when click every hotspot,it should be done different things;
my xml code as below:
Code
<action name="addHotspot">
txtadd(hsText, 'hsText_', %1);
js(console.log('consolelog-hostspotCount=',get(hotspot.count)) );
addhotspot(hsText);
set(hotspot[get(hsText)].url, "%SWFPATH%/pic/test.png");
set(hotspot[get(hsText)].width, 150);
set(hotspot[get(hsText)].height, 40);
set(hotspot[get(hsText)].ath, %2);
set(hotspot[get(hsText)].atv, %3);
set(hotspot[get(hsText)].onclick, doSomething(get(hsText)) );
</action>
<action name="doSomething">
js(console.log('hotspotName=',%1 );
</action>
Display More
i called the addHotspot action as below:
addHotspot('test1',15, 0);
addHotspot('test2',25, 0);
addHotspot('test3',-15, 0);
but when i click the hotspot "test1"and "test2", it always print the "test3"; i kown the rayson because of var hsText final value is "test3"; And i can not come out any idea, could some one can help me? thanks