Hi,
I am new with Velo and I am trying to change the color of a victor image with the .onclick() function.
I have tried it with two different methods. The first one is:
$w("#vectorImage4").onClick( () => {
$w("#box42").hide();
$w("#box43").hide();
$w("#box8").show();
$w("#vectorImage4").style.color = 'white';
}
);
With this it says: 'Property ‘style’ does not exist on type ‘VectorImage’.
The second method is:
$w("#vectorImage4").onClick( (event) => {
$w("#box42").hide();
$w("#box43").hide();
$w("#box8").show();
const clickedElement = event.target;
clickedElement.style.color = 'white';
}
);
In the debug screen on the preview mode it says: Cannot set properties of undefined (setting ‘color’)
What can I do to fix this or make it work if it is even possible? It is maybe a noob question but i’m trying to learn and understand the language
Thanks in advance.
Regards,
Klaas