How do I play audio in a sequence

how can I play audio in this sequence? I have preloaded the audio already.

sequence%20help

  1. post code, not screenshots.

  2. have you tried running the code you posted? What happens? Errors?

Use lambda with CallFunc.

And you already have them, just put your sound code into lambda:

auto autoHideCallback = [this]()
{
    // add your code here
    hide();
};

Sequence* seq = Sequence::create(
    MoveTo::create(1.f, pos),
    DelayTime::create(8.f), // wait 8 sec
    CallFunc::create(autoHideCallback)
);

when I go into the scene in which this code runs in, I am told that 'Unhandled exception thrown: read access violation.
this->my sprite-> was 0xDDDDDDDD.

It’s another issue.
It seems your sprite variable is not initialized.

yup, so, OP:

  1. post code

  2. thanks for posting the error…now we have a clearer path.