Quote from
luishp on January 31, 2022, 7:36 am
The only issue I have is trying yo find myclass in the NeoAni sample app. Not seeing it under the CSS section.
@neal-stone it's an non-existent class :)
The only purpouse of that class is to work as a selector. When you want to animate a single object you just use it's ID (name). But, as names are unambiguous you can't select a group of objects this way. That's the reason we apply the same class to all the elements in a group, so we can select all of them just by their class name.
Most VisualNEO Web commands allow to apply an action to a selected object, but it's possible to use CSS selectors too:
CreateEmptyObject [mycss]
SetVar [mycss.background] "red"
SetObjectCSS "Container1 .myclass" [mycss]
This code will change the background color of every object inside Container1 with the CSS class "myclass".
As you can see, this is a very powerful feature :)
Regards.
The only issue I have is trying yo find myclass in the NeoAni sample app. Not seeing it under the CSS section.
@neal-stone it's an non-existent class :)
The only purpouse of that class is to work as a selector. When you want to animate a single object you just use it's ID (name). But, as names are unambiguous you can't select a group of objects this way. That's the reason we apply the same class to all the elements in a group, so we can select all of them just by their class name.
Most VisualNEO Web commands allow to apply an action to a selected object, but it's possible to use CSS selectors too:
CreateEmptyObject [mycss]
SetVar [mycss.background] "red"
SetObjectCSS "Container1 .myclass" [mycss]
This code will change the background color of every object inside Container1 with the CSS class "myclass".
As you can see, this is a very powerful feature :)
Regards.
joferar333 and javadrajabihakami have reacted to this post.
joferar333javadrajabihakami