The problem that I have with hiding and showing sprites is that when I hide a sprite at one location of my project and then show it again in some other part of my code, my sprites does not come back or appear.
here are the basic steps...
-load all the animations, assign animation and sprite number for each
-play the animation to an image(basically to the same animation number)
-set a sprite for that image
-hide that sprite
-when I have to show a specific animation, show sprite...
Here is the code that gives me the problem:
// This is in my main function
dbLoadAnimation("animation1.avi", 1);
dbLoadAnimation("animation2.avi", 2);
dbLoadAnimation("animation3.avi", 3);
dbLoadAnimation("animation4.avi", 4);
:
:
// This is in another function
for(int i=1; i<5; i++)
{
dbPlayAnimationToImage(i,i,0,0,dbAnimationWidth(i),dbAnimationHeight(i));
dbLoopAnimation(i);
dbSprite(50+i, 100+(5*i), 100+(5*i),i);
dbHideSprite(50+i);
}
:
:
// And in another part of my code
for(int i=1; i<5; i++)
{
dbShowSprite(50+i);
}
I'm not using any of these numbers for animations in any part of my code other than these places. Can anybody see an obvious error that I have made?