My popup link doesn't work

hi i’m trying to create a thumbnail gallery in which the images and the url links are obtained dynamically from my main html document. so far i am able to get the images to work but not the links. when i click on the thumbnail i get the following error message in the popup window:

No file exists at the address “…/…/undefined”

here is my code with the variable portions in bold:


import fl.transitions.*;
import fl.transitions.easing.*;

var borderSize = 10;

**var photoURL:String = new String();
photoURL = String(this.loaderInfo.parameters.source);

var popupURL:String = new String();
popupURL = String(this.loaderInfo.parameters.url);**

var imageLoader:Loader = new Loader();
var movOriginal:MovieClip = new MovieClip();
var movOver:MovieClip = new MovieClip();
var home:MovieClip = this;	

imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,onLoadedImage);
**imageLoader.load(new URLRequest(photoURL));
**
function onLoadedImage(e:Event):void {

	var g:Graphics = movOriginal.graphics;
	g.clear();
	g.beginFill(0x000000);
	g.drawRect(0,0,imageLoader.width+borderSize*2,imageLoader.height+borderSize*2);
	g.endFill();
	var g2:Graphics = movOver.graphics;
	
	g2.clear();
	g2.beginFill(0x83C15C);
	g2.drawRect(0,0,imageLoader.width+borderSize*2,imageLoader.height+borderSize*2);
	g2.endFill();
	
	movOver.alpha=0;
	movOver.x = movOriginal.x  = imageLoader.x-borderSize;
	movOver.y = movOriginal.y  = imageLoader.y-borderSize;

	home.addChild(movOriginal);
	home.addChild(movOver);
	home.addChild(imageLoader);
}

imageLoader.x = 10;
imageLoader.y = 10;
imageLoader.addEventListener(MouseEvent.CLICK, doSomething);
imageLoader.addEventListener(MouseEvent.MOUSE_OVER, mouseOverHandler);
imageLoader.addEventListener(MouseEvent.MOUSE_OUT, mouseOutHandler);

function doSomething(Event:MouseEvent):void {
**	var _link:URLRequest = new URLRequest(popupURL);
**	navigateToURL(_link);
}

function mouseOverHandler(e:MouseEvent):void {
	var myTween:Tween = new Tween( home.movOver, "alpha", Strong.easeOut, home.movOver.alpha, 1, 5, false);

}

function mouseOutHandler(e:MouseEvent):void {
	var myTween:Tween = new Tween(home.movOver, "alpha", Strong.easeIn, home.movOver.alpha, 0, 5, false);

}

and here is my html code:


<script type="text/javascript">
AC_FL_RunContent(
	'type', 'application/x-shockwave-flash',
	'data', 'project.swf?source=projects/bird.jpg',
	'width', '390',
	'height', '100',
	'movie', 'project?source=projects/bird.jpg' 
	);
        </script>

so lets say i wanted the popup to go to bird.html, how would i do that?:vamp:

can someone help me? is there a way to link the swf from dreamweaver and just forget about trying to use a variable url in my flash doc?