hi I wanted to know if it is possible to make a loop for assigning css styles.
I tried but it enters the same name for all DIV
My code
Code
<events name="start_event" keep="true" onxmlcomplete="create_css();"/>
<action name="set_css_class" type="Javascript"> caller.sprite.className = args[1];</action>
<action name="create_css" >
for(set(i,0), i LT hotspot.count, inc(i),
if( hotspot[get(i)].style == "my style", set(name_spot, get(hotspot[get(i)].name)); set(hotspot[get(name_spot)].onloaded, set_css_class(get(name_spot)); maker(get(name_spot));); ); ); </action>
Results: I have 3 Spots, but all <div> have same Class name ( last hotspot name, count in loop)
Thanks
mauma