Forum Discussion

kasiris's avatar
kasiris
Channel Surfer
4 years ago

AudioListExample "skipcontent" and "play next"

Hello group, I have a small problem ... I'm trying to get the "AudioListExample" to programically play all of the audio's in the "audiolabellist" without user interaction. The way SceneGraph appears to me is equal to java (or in my case Android) however when I try to apply what generally works for some reason it simply don't. Below is my code and it would be a great help to findout where or how I'm going about my task wrong, thanks in advance 

 

    sub setaudio()
      audiocontent = m.audiolist.content.getChild(m.audiolist.itemFocused)
      m.audio.content = audiocontent
	  m.audio.control = "play"
	  
    end sub

    sub playaudio()
      m.audio.control = "stop"
      m.audio.control = "none"
      m.audio.control = "play"
	  
	  
    end sub

    sub controlaudioplay()
      if (m.audio.state = "finished") 
        m.audio.control = "stop"
        m.audio.control = "skipcontent"
      end if
    end sub

1 Reply

  • kasiris's avatar
    kasiris
    Channel Surfer

    I've tried this 

        sub playaudio()
          audiocontent = m.audiolist.content.getChild(m.audiolist.itemFocused)
          audiocontent.contentIsPlaylist=true
          m.audio.content = audiocontent
          m.audio.control = "stop"
          m.audio.control = "none"
          m.audio.control = "play"
          m.audio.nextContentIndex = "-1"
          m.audio.loop = true
        end sub

    but it just put the player in loop on "itemFocused" any help anyone???