# Query strings. help a noob out man

**URL:** <https://forum.kirupa.com/t/query-strings-help-a-noob-out-man/263593>\
**Category:** Uncategorized\
**Created:** [June 17, 2008, 3:18pm UTC](https://forum.kirupa.com/t/query-strings-help-a-noob-out-man/263593 "2008-06-17T15:18:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sabresfan](https://avatars.discourse-cdn.com/v4/letter/s/3bc359/32.png) [@sabresfan](https://forum.kirupa.com/u/sabresfan)\
**Post date:** [June 17, 2008, 3:18pm UTC](https://forum.kirupa.com/t/query-strings-help-a-noob-out-man/263593/1 "2008-06-17T15:18:53Z")

</div>

i’m desperate. i want my flash file to use an external image and link to a page in a popup window that is defined in my html doc. using a query string i was able to get the external image part down but not the link. please, can someone help me figure this out???

[here is what i have so far](http://www.ronniesalvato.com/help) (click)

```auto

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

```

the part thats not working is in bold:

```auto
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);

}

```

i need to figure out if the code in my actionscript is correct (probably not) and where to define the desired URL popup link in my html code. thanks in advance to anyone who can put me out of my misery.

---

<div class="post-metadata">

**Author:** ![dthought](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/dthought/32/3573_2.png) [@dthought](https://forum.kirupa.com/u/dthought)\
**Post date:** [June 17, 2008, 3:23pm UTC](https://forum.kirupa.com/t/query-strings-help-a-noob-out-man/263593/2 "2008-06-17T15:23:46Z")

</div>

Off the top of my head, I vaguely recall something about URL variables being removed from AS3. The replacement way to send variables to Flash from the HTML embed is via FlashVars.  
[http://kb.adobe.com/selfservice/viewContent.do?externalId=tn\_16417](http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_16417) for example…
