transition.dissolve ... use to remove object?

Hi. I use the following transition in my code:

transition.dissolve( object, nil, 0, 1500 )

Am I really removing this object using this transition or do I need to still remove it? Unfortunately, I don’t know how to test to see if the object still exists … I wouldn’t mind that answer either : )

Thanks! [import]uid: 25480 topic_id: 6085 reply_id: 306085[/import]

First off, transition.dissolve is kind of a sucky command so use transition.to to do fade outs. You can set an onComplete function with transition.to while still getting exactly the same fade effect. I don’t know why transition.dissolve even exists, since using transition.to is better.

In your case though I don’t think you even want to use a transition. It looks like you want the image to disappear immediately in 15 seconds; do that with the command performWithDelay() and use removeSelf() in the delayed function. [import]uid: 12108 topic_id: 6085 reply_id: 20876[/import]

Actually, I _was_ looking for a fade out at the end, so I changed it to transition.to as you suggested, which has it working better, thanks. I had tried transition.to before, but couldn’t get it to work until I added a delay value (or, actually, it was working, but it went so fast that I didn’t realize it was working until I added delay = 1500 … I thought a time = 1500 would do the fade out ).

I’m still using the dissolve, however, because I’m literally dissolving (melting) on object each time bullets hit it. So I dissolve from the complete object into melty versions of that object until the object has completely melted away (with the final image fading away). It’s a transition of 4 images. I’m guessing that once the object has completely melted I can call one function with remove commands for all of the image objects.

I don’t suppose there’s a “universal” remove function that gets rid of everything in one stroke so that when I start the next game on that level I’m starting fresh? [import]uid: 25480 topic_id: 6085 reply_id: 20900[/import]

For anyone looking at this. To get the “universal” remove function it looks like I needs to learn me some director class:

http://developer.anscamobile.com/forums/director-class

[import]uid: 25480 topic_id: 6085 reply_id: 21040[/import]

And here’s where you download it:

http://developer.anscamobile.com/code/director-class-10 [import]uid: 25480 topic_id: 6085 reply_id: 21042[/import]