Its a complicated senario for me.
I have a sound management singleton with an asset like dictionary storing all referances to my urls and assets and the guff inside it-
I have a function called addItem(id:String, url:String):Object
I would love to do something similar as soundManager.addItem(id:String, url:String).play()
or soundManager.addItem(id:String, url:String).stop()
of which it'll both add my item to my dictionary, and begin playing the sound
Currently I do soundManager.addItem(id:String, url:String)
then soundManager.play('myID')
.
My sound asset is an object containing a few bits like Sound, SoundChannel, SoundTransform, URL and some other none descript parts.
I know it will be prototyping - I just get uber stuck when I need to prototype my custom functions and objects.
Thanks in advance
conclusion:
Well, I did do the autoplay as mentioned in my accepted answer.
I also did something pretty cool which I like the look of.
I create a SoundManager class, of which handles and uses a SoundObject of which contains SoundTransform, SoundChannel and anything else Sound object requires.
This way when I add an item to the SoundManager, it'll always return the SoundObject Class that incorporates all the play(), pause(), volume(), position() I need.
Its really very useful and I've already used it on 4 projects! Yey.
Thanks guys for your help.