Hi,
I would recommend using several elements and showing and hiding them - when changing the url, the image need to be reloaded and this can take a bit of course.
Regarding changing the url itself - just set the url to new one,
e.g. when directly calling from an event of an element, you can change the attributes directly:
|
Source code
|
1
|
set(url, 'newimage.png');
|
when not directly calling the the full attribute path need to be used:
|
Source code
|
1
|
set(layer[skin_btn_rotate_play].url, 'newimage.png');
|
In your case with the <style> usage, you could also use the loadstyle() action to load the attributes from the given style,
e.g.
|
Source code
|
1
|
loadstyle(play);
|
or
|
Source code
|
1
|
layer[skin_btn_rotate_play].loadstyle(play);
|
Best regards,
Klaus