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.

Posted in Uncategorized | 5 Comments

Scup Source Code Released

If you want some more sample code for the SoundCloud-AS3-API, look no further: I just pushed the Scup repository to github: http://github.com/dorianroy/Scup.

Before you can play around with the code, you’ll need to install the SoundCloud-AS3-API, the Swiz framework and get an application key from SoundCloud first. See the readme file for details.

I decided to release the code under GNU license to make sure that any improvements and modifications will have to be open-source,  too. Let me know if you’d like to contribute to the next release and want your modifications to be included in the next “official” release.

Posted in Scup | Tagged , , , , , | 1 Comment

Scup 1.1 released – now runs on Linux as well

I’ve just released a minor update for Scup. If you have already installed Scup, you should get the update automatically the next time you launch it. If not, get it here.

The new version 1.1 adds the new set type “Sample Collection”, enables bulk editing of the track type parameter and fixes a few issues (thanks for your bug reports!). Most important is a workaround for an annoying AIR bug under Linux that prevented Scup from opening the authentication page in the browser with the right parameters. I could only test it with AIR 2.0 on Ubuntu 10.04, but I’m confident that Scup now runs on other Linux distributions as well.

I know that there are some feature requests that didn’t make it into this release as I’m quite busy with another project and could only spend a few hours on Scup this time.  I hope to have more time for the next update.

The feedback forum for Scup has got an update as well, I’ve switched from Getsatisfaction to Uservoice because they offer different categories for issue reports. So now you can report a problem as a problem, and a question as a question. Makes sense, huh?

Posted in Scup | Tagged , , | Leave a comment

SoundCloud Uploader Scup 1.0 released

scup.dasflash.comThat’s right, Scup is now out of beta! You can grab the 1.0-release from the newly designed website scup.dasflash.com. If you have already installed Scup, you should get the update automatically the next time you launch it.

And if you haven’t heard of Scup before, here’s what it’s all about.

The new version allows you to enter extended track settings like BPM, video-URL, label name, song type, tags and more. I’ve also included a button to copy all fields from the set to all if its tracks, so you don’t have to fill-in common fields like label name and license for each track of the set. Besides the new features, I’ve also added many little improvements (e.g. a signout-button) and bugfixes(removed tracks are now deleted on the server). The interface got some polish, too (smoother fonts, iPhone-like buttons).

Let me know what you think of it in the comments!

Posted in Scup | Tagged , , , | 7 Comments

New Tutorial and Updates for the SoundCloud AS3 API

I just wrote a new tutorial for the SoundCloud AS3 API, “How to Go Through OAuth Authentication in a Single Browser Window”. This tutorial explains how to set up a web-based Flash application in a way that the user stays in the same browser window during the OAuth authentication and does not need to copy /paste the verification code manually.

For example, this could be a good solution for a music player that lets users listen to their favourite SoundCloud playlists. It works without any backend services by using some Javascript and the Local Shared Object aka “Flash Cookie”. The tutorial requires some basic knowledge of how to pass variables to Flash, a little bit of JavaScript and intermediate AS3 skills.

The basic concept of the solution applies to every other API using OAuth 1.0a as well, so you also might find this tutorial interesting if you use Flash clients to access the API’s of Google Apps, Twitter or MySpace. Read More »

Posted in Soundcloud | Tagged , , , , | 13 Comments

We don’t need Flash on the iPad, we need better tools to build HTML5 sites

The recent discussion about whether the web needs Flash or not was overdue. My opinion is this: Yes, we need an alternative to Flash Player, and HTML5 could soon replace it in most cases. But most of all we need a good IDE to develop content for modern browsers.

Flash has two critical shortcomings that make it hard to use for many projects, not only on mobile devices:

  1. Flash Player is an alien in the browser. You just need to look at the strange code that is necessary to embed it to know that. You can’t use your browser’s “Find” function to search its text. The browser can’t save passwords you’ve entered in a Flash form or even fill out a form with the data you’ve entered on other sites. Flash wouldn’t trigger special input tools of a device like mobile Safari’s Picker UI or work with the tap-to-zoom feature. You can’t use the browser’s controls to increase the font size used inside Flash Player. And there are many other examples. I wouldn’t create a complex UI for the browser with Flash anymore because of this.
  2. Flash needs too many system resources. Thats’s something I always thought would get better over time with faster CPUs, but it never did. I don’t know if it is because of Adobe’s laziness or because content keeps getting heavier as well (more pixels per videoframe, more complex video codecs, more 3D objects, bigger screen sizes etc). All I know is that a site that makes heavy use of Flash burns my 2.4 GHz Core 2 Duo today just as it did with Flash Player 4 and my 500MHz Pentium III ten years ago. And that’s why I think Flash Player will never really work on a mobile device.

But today, using HTML5/Canvas for rich clients instead of Flash is no option either as it is not widely adopted by the browsers yet. You would end up in browser hell again. So what can you do as a Flash Developer to solve this situation in the next years? I think it depends on the type of project you are creating:

Read More »

Posted in Flash Platform | Tagged , , , , , , | 16 Comments

Introducing Scup

ScupToday I’ve released a little AIR tool for all SoundCloud heavy-users. It’s called Scup, which is short for SoundCloud Uploader – and it does just that. You can upload tracks from your desktop by simply dragging them on the program window and then create a set (i.e. a playlist) consisting of these tracks. Grab it here! I hope you’ll find it useful.

I’ve built Scup as a demo application for the SoundCloud AS3 API and also as a learning project for myself, because it’s the first project I’ve done with the Swiz framework and the first using Spark components. When I find time to clean up the code a little I’m going to put it on github.

Thanks to the wonderful people at SoundCloud for having the idea (Eric), making the screen design (Katharina) and most of all helping me master the API and OAuth stuff (Hannes)! This is for you ;)

Posted in Scup | Tagged , , , , , , , | Leave a comment

Updates to the SoundCloud AS3 API

During the last week I made some improvements to the SoundCloud AS3 API library:

  • Full ASDoc documentation is now available online
  • Uploaded an example file for Flash CS4
  • API is now prepared for scenarios where you want to automatically get an access token after authentication (I’ll do an extra post on this in the next days)
  • Added support for requests to public resources without having to authenticate first

I should say a few words about the last point: If you want to build a simple audio player app like Citysounds (check it out, great stuff!) that only accesses public resources, chances are you don’t have to deal with OAuth authentication at all. Read More »

Posted in Soundcloud | Tagged , , , , | 10 Comments

Quick Start Tutorial for the SoundCloud AS3 API

The first release version of the SoundCloud AS3 API wrapper is now available on github. This library enables your Flash or Flex projects to communicate with SoundCloud’s API to upload tracks, create playlists, edit user info and so on. It handles all the complicated OAuth authentication in the background so you only have to deal with a few simple methods. The project is still work in progress and needs some more testing, but I think the API won’t change anymore so you can definitely include it in your projects.

I’ve also written a little Quick Start Tutorial on the Wiki pages and put a sample AIR application in the download section that will hopefully help you getting started with the API.

Some features are currently only documented in the code comments, e.g. switching the response format between JSON and XML. I hope to find some time soon to set up a proper ASDoc documentation.

Posted in Soundcloud | Tagged , , , , | 1 Comment

Renaming Flex Builder solves one problem but causes another

Yesterday I had a meeting with a client who was looking for a Flex Developer to maintain an existing Flex project. I had a look at the code and was pretty confused because, well, it wasn’t Flex. It was just a huge Flex Builder ActionScript project including several .fla files full of library assets. Just because he had been given a repository with a Flex Builder project in it, the client thougt he had to look for a Flex Developer to add some features to his application.

It took me a while to explain the difference between Flex, Flash, the Flash IDE and Flex Builder and why it makes a big difference whether you create your project as an ActionScript or Flex project. That made me realize why renaming Flex Builder to Flash Builder absolutely makes sense. If this would have been a “Flash Builder” project, the client wouldn’t have thought he’d have to look for a”Flex Developer” that is still much harder to find than a “Flash Developer”. Read More »

Posted in Flash Platform | Tagged , , , | Leave a comment