how to get right hotspot

  • 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:

    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

  • hi everyone:
    I have find out two ideas:

    a: txtadd(hotspot[get(hsText)].onclick, 'doSomething(',get(hsText),')' );
    b: set(hotspot[get(hsText)].onclick, doSomething(get(name)) );

    *g*

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!