Questions tagged [skaudionode]
32 questions
0
votes
1 answer
works when gameScene is loaded first , but play for half a sec and immediately stops (no error) when loaded by another scene, why ?
in the gameScene.swift:
declaration:
var backgroundMusic: SKAudioNode!
in didMoveToView:
if let musicURL = NSBundle.mainBundle().URLForResource("Jalandhar", withExtension: "mp3") {
backgroundMusic = SKAudioNode(URL: musicURL)
…

Elazaron
- 476
- 11
- 21
-1
votes
1 answer
SpriteKit not playing audio file?
I have made a custom class, SoundNode, to handle the playing of audio files. For now, it only plays the default "A2.mp3"
class SoundNode : SKSpriteNode{
func playSound(){
run(SKAction.playSoundFileNamed("A2", waitForCompletion: false))
…

Erik Martin
- 99
- 1
- 1
- 8