Home SKAction play sound not from begining
Reply: 0

SKAction play sound not from begining

user492 Published in July 23, 2018, 1:18 pm

I want to play sound not from the beginning of the mp3 file, but from 14s after beginning. I have the following code for sound playing, but i was not successful in finding the solution:

if let textAudio = textAudio {
        let wait = SKAction.wait(forDuration: 0.1)
        let play = SKAction.play()
        if view.scene! == scene02 {
            // play 14s after begining
        textAudio.run(SKAction.sequence([wait, play]))
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.406956 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO