Sprite Listener function not, um....functioning

Hey gang,

i hope I’m in the right forum, so here goes.

I’ve been working on an app that uses a sprite animation after a successful pick. It’s been working great for months, but as of the lastest daily build(s), the sprite listener function isn’t setting the visibility properly any more. Here’s the listener function:

local function spriteListener( event )  
 if (event.phase == "end") then  
 print("the sprite has finished")  
 event.sprite.isVisible = false  
 end  
end  

Is the event.sprite.isVisible not a valid way to do this?

Thanks!
–Kev
[import]uid: 70550 topic_id: 27002 reply_id: 327002[/import]

Hey @Kev, not sure if this helps, but I kind of remember reading a thread/post about .isVisible not working on sprite animation/object recently (like… sometime this week). The workaround sounded like you need to change its alpha property to 0 to make it invisible.

Anyhow, you might want to test to see if .isVisible true/false works on the sprite animation/object outside the event listener and if it does, then it would indeed be something to do with the listener, but if it doesn’t, then you may want to file a bug so that it gets fixed.

Naomi [import]uid: 67217 topic_id: 27002 reply_id: 109561[/import]

We are aware of issues with the .isVisible property of sprites, there has been a bug report filed. Case num: 14555 [import]uid: 84637 topic_id: 27002 reply_id: 109667[/import]

Ah-ha! Yep, the alpha was a great work around. And I’m glad to see there’s already a bug ticket. Thanks y’all!

–Kev [import]uid: 70550 topic_id: 27002 reply_id: 109767[/import]

After getting my save code to work (thanks Naomi) my sprite visibility started acting up, which made me paranoid at first because I wasn’t anywhere near that section of code. Glad to see there is a case filed. In case it helps, in my game I have a main actor sprite for normal walking (herowalk), but if you ride something, I make herowalk invisible and make heroride visible. Since updating to the latest build 828, making herowalk invisible fails, and I can set its alpha, but cannot change its x, y, Scales, or rotation. [import]uid: 117490 topic_id: 27002 reply_id: 110924[/import]

edit:double post, sorry. [import]uid: 117490 topic_id: 27002 reply_id: 110925[/import]

deleted. [import]uid: 66228 topic_id: 27002 reply_id: 115634[/import]