My usecase:
I have a game object with just a sprite on it. I create this game object from a factory. I then need to animate its opacity. That’s tint.w
on the child sprite (not on the game object itself). So question is, how do I access the sprite?
local piece = factory.create(msg.url("my_factory"), position)
local sprite_url = piece + "#sprite" -- This won't work since piece is a hash
go.animate(sprite_url, "tint.w", go.PLAYBACK_ONCE_FORWARD, 0.0, go.EASING_LINEAR, 0.4)
EDIT: I managed to do what I needed to do by placing a script on the game object and doing the animation there, but it feels like there should be a way to do it directly.