You are not logged in.

1

Monday, December 3rd 2012, 1:13am

dynamically change smth in layer

is it possible to change e.g. url in custom layer selected by variable.

I want to dynamically change url for many layers that have name: radar_1, radar_2, radar_3...

this works if i pass variable:

Source code

1
set(layer[radar_%1].url, %SWFPATH%/skin/radar_selected.png);


but i must calculate passed variable to smth else. Is possible to use e.g. %custom_variable instead of %1?

tnx,

regards

2

Monday, December 3rd 2012, 6:53pm

Hi,

you could first generate the name and then use it,

e.g.
txtadd(tmp, 'radar_', get(custom_variable));
set(layer[get(tmp)].url, %SWFPATH%/skin/radar_selected.png);


Best regards,
Klaus

3

Tuesday, December 4th 2012, 12:13am

this is awesome! It works;) this solves a lot of issues i had

Thanks