SoundCloud-AS3-API: Small Update and new URL

This is just a quick note that I’ve uploaded some minor changes to the SoundCloud-AS3-API on github. I finally added a method to retrieve a signed URLRequest for any API resource. This comes in handy when you want to access the stream of a private track.
Here’s a simple example:

</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">var urlRequest:URLRequest = scClient.getSignedURLRequest(myTrack.stream_url);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">var sound:Sound = new Sound(urlRequest);</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">sound.play();</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">

var urlRequest:URLRequest = scClient.getSignedURLRequest(somePrivateTrack.stream_url);

var sound:Sound = new Sound(urlRequest);

sound.play();

I also fixed an issue with GET parameters not being added. Thanks to Jesse for pointing this out  – check out his SoundCloud App for Android built with the AS3-API!

I’m trying to add support for SoundCloud’s new OAuth 2.0 API  in the next release. I’m not sure if this will bring any benefits but the guys at SoundCloud are asking every week for it 😉 However, they will continue to support the “old” API.

Note that the project now has a new URL because I changed my github username to “dorianroy”: http://github.com/dorianroy/Soundcloud-AS3-API.

4 thoughts on “SoundCloud-AS3-API: Small Update and new URL

  1. Hi Dorian,
    Do you have an example of how to call the “resolve” API with this library? I haven’t been able to get it to work. I’ve tried several patterns, but can’t get it to work. I am currently manually using the resolve API in the API console to resolve tracks from their URL. If you have got this working, I would very much appreciate some guidance.

    This wrapper has really helped me. Thanks very much for putting it out there.

  2. Hi Dorian,

    Thx for all your work, it’s awesome!

    I’m a Flash Developer and I read your tuto about how to build an SoundCloud Flash based app but I did not find how to simply load the player to read an artist track like Foo Fighters or an entire playlist.

    I tried to load the SoundCloud player with a loader but I have a security error…

    Can you help me? Please send me a link. I’m sure it’s very simple.

    Thx a lot.

Leave a Reply

Your email address will not be published. Required fields are marked *