Hi! I have some trubles with addlayer() action.
I want to create a simple layer for each hotspot on scene (draw a little circle on bottom of the screen). When hotspot is active, layer will be blinking (or change color/size, don't know yet). But something wrong with my code (or bug?). Only one layer with name="layer_7" is created (There is 8 hotspots on scene)
Here is my code:
Code
for(set(hsix, 0), hsix LT hotspot.count, inc(hsix),
calc(temp_name,'layer_' + hotspot[get(hsix)].name);
addlayer(temp_name);
mul(layer[temp_name].x,hsix,40);
dec(layer[changes_breadcrumbs].x,20);
assignstyle(layer[temp_name],'breadcrumbs_style');
txtadd(layer[temp_name].html,get(hsix));
);
Help me pls!
OMG I forget get()
Code
for(set(hsix, 0), hsix LT hotspot.count, inc(hsix),
calc(temp_name,'layer_' + hotspot[get(hsix)].name);
addlayer(get(temp_name));
mul(layer[get(temp_name)].x,hsix,40);
dec(layer[changes_breadcrumbs].x,20);
assignstyle(layer[get(temp_name)],'breadcrumbs_style');
txtadd(layer[get(temp_name)].html,get(hsix));
);