I haven't tried it but yeah, if you paste that code in your first frame of the fla it should work.

However to actually connect to your channel you'll have to supply your api key instead of where it says YOUR_API_KEY

loader.load(new flash.net.URLRequest("http://www.justin.tv/widgets/live_api_player.swf?video_height=480&video_width=6 40&consumer_key=YOUR_API_KEY"));

It seems you need to log in to your accounts, covert it to a developers accounts and then create an application within your developers console. That should generate at key for you to use.