Is it possible to have a fade out effect for SimpleAudioEngine background music using the CCActionTween? I know that the volume property is an float between 1 and 0.
If it is possible, then a sample code would be much appreciated.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
AFAIK, there are no mechanisms within cocos2d to do what you are asking about. A CCNode derivative has the runAction method, but there are no CCNode derivatives for that embed sound controls. I perform sound fade in-out in the main loop as shown here . The method fadeOutBackgroundMusic is exposed by a singleton, and available anywhere in the code. It has a corresponding fadeInBackgroundMusic method.