TypeError: Error #1009: Cannot access a property or method of a null object reference

**I am creating a some xml gallery but have a some issue

Error**

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at gallery/init()
at gallery$iinit()

code:

package
{
import flash.events.MouseEvent;
import flash.display.MovieClip;
import flash.display.Sprite;
import flash.xml.;
import flash.net.URLRequest;
import flash.net.URLLoader;
import flash.events.
;
import flash.text.*;
public class gallery extends Sprite
{
private var xml:XML;
private var path:String=“photo.xml”;
private var loader:URLLoader;
private var mc:MovieClip;
private var xmllist:XMLList;
function gallery()
{
init();

	}
	public function init():void
	{
		createTextField();
		createBut();
		loader.addEventListener(Event.COMPLETE,xmlParse);
		
	}
	public function xmlParse(event):void
	{
		xml=new XML();
		xml.ignoreWhitespace=true;
		loader = new URLLoader(new URLRequest(path));
		xml=XML(loader.data);
		trace(xml);
		
	}
	
	private function createDynamicMc():void
	{
		mc = new MovieClip();
		mc.x=10;
		mc.y=10;
		addChild(mc);
	}
	private function createTextField():void
	{
		var text1:TextField = new TextField();
		text1.border=false;
		text1.x=300;
		text1.y=10;
		text1.width=240;
		text1.multiline=true;
		text1.height=50;
		addChild(text1);
		text1.text="demo";
	}
	private function createBut():void
	{
		var but1:flashBut= new flashBut();
		var text1:TextField= new TextField();
		text1.text="Next";
		but1.x=400;
		but1.y=350;
		addChild(but1);
		//but1.addChild(text1);
	}
}

}

**xml **

<project>
<img id=“123”>img/1.jpg</img>
<img id=“123342343”>img/2.jpg</img>
<img id=“123csdsdd3234”>img/1.jpg</img>
<img id=“12332423v rwerweer”>img/2.jpg</img>
<img id="123ewer werwr ">img/1.jpg</img>
<img id="123rwer werr rerwer ">img/2.jpg</img>
</project>