Help with loaderinfo in a class

I am trying to get data from SWFObject:


<div id="flashcontent">
  <script type="text/javascript">
		var so = new SWFObject("inc/modules/scenarios/playlistEditor.swf", "playlistEditor", "850", "370", "9", "#39566F");
		so.addParam("allowfullscreen", "true");
		so.addVariable("userid", "1");
		so.write("flashcontent");
    </script>
</div>

I am trying to get the userid into flash and in my class I have:


	public class PlaylistEditor extends MovieClip
	{
		private var userID				:Number;
		public function PlaylistEditor()
		{
			userID = this.loaderInfo.parameters.userid;

//etc....


when I compile I get this error:


TypeError: Error #1009: Cannot access a property or method of a null object reference.
	at com.dopeditor::PlaylistEditor()[E:\POST\VTOD\04. VTOD Teaching\inc\modules\scenarios\com\dopeditor\PlaylistEditor.as:60]
	at playlistEditor_fla::MainTimeline/frame1()[playlistEditor_fla.MainTimeline::frame1:21]

I know its null in the flash IDE, but when I run it in the browser it shouldn’t be. It wont let me compile though. Any suggestions?