Code for calling rtmp?

Hi,

I want a song to accompany a Flash slide show; but placing the song in the .swf makes the file load too slowly, even over a good DSL connection.

So I thought, since it’s just non-synched background music, streaming the audio would speed things up.

I uploaded the song as a sound file in the form of an .flv to my favorite streaming video server site. (I tested it beforehand and it worked great.)

A techie at the server company suggested I use their rtmp code to load it into my slide show file. Their rtmp code looks something like this:
/* wonderfulworldaudiortmp://00.000.000.00/fvssod/fandm00.000.000.00 */
(I’ve replaced the real numbers with zeros.)

I guess I need some actionscript to call this but can’t find the right combo on the internet.

I’ve tried things like:
/*var videoInstance:Video = WonderfulWorldAudio;
var nc:NetConnection = new NetConnection();
var connected:Boolean = nc.connect(“rtmp:/00.000.000.00//fvssod/fandm00.000.000.00”);
var ns:NetStream = new NetStream(nc);
videoInstance.attachVideo(ns);
ns.play(“WonderfulWorldAudio”);
*/

and like this:

/**
Requires:

  • FLVPlayback component on the Stage with an instance name of my_FLVPlybk
    /
    import mx.video.
    ;
    trace("Before load, autoPlay is: " + my_FLVPlybk.autoPlay);
    my_FLVPlybk.load(“http://www.helpexamples.com/flash/video/water.flv”);
    trace("After load, autoPlay is: " + my_FLVPlybk.autoPlay);
    my_FLVPlybk.play();
    */

But haven’t hit the number yet.

Any ideas?

Thanks.