# Help with loaderinfo in a class

**URL:** <https://forum.kirupa.com/t/help-with-loaderinfo-in-a-class/281841>\
**Category:** flash\
**Created:** [February 13, 2009, 7:12pm UTC](https://forum.kirupa.com/t/help-with-loaderinfo-in-a-class/281841 "2009-02-13T19:12:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rondog](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rondog/32/2478_2.png) [@rondog](https://forum.kirupa.com/u/rondog)\
**Post date:** [February 13, 2009, 7:12pm UTC](https://forum.kirupa.com/t/help-with-loaderinfo-in-a-class/281841/1 "2009-02-13T19:12:24Z")

</div>

I am trying to get data from SWFObject:

```auto

<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:

```auto

	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:

```auto

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?
