# Passing a variable with URLRequest

**URL:** <https://forum.kirupa.com/t/passing-a-variable-with-urlrequest/295533>\
**Category:** flash\
**Created:** [September 1, 2009, 1:32am UTC](https://forum.kirupa.com/t/passing-a-variable-with-urlrequest/295533 "2009-09-01T01:32:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![keld](https://avatars.discourse-cdn.com/v4/letter/k/8baadc/32.png) [@keld](https://forum.kirupa.com/u/keld)\
**Post date:** [September 1, 2009, 1:32am UTC](https://forum.kirupa.com/t/passing-a-variable-with-urlrequest/295533/1 "2009-09-01T01:32:55Z")

</div>

Hello all,

I’m desperately trying to pass a variable from as3 to as2 using URLRequest. I’ve done this before this way for some reason i can’t anymore.  
Here is what I’m doing:

var movie:String=“mymovie.swf”;  
var mLoader:Loader = new Loader();  
var mRequest:URLRequest = new URLRequest(“swfloader.swf?m=”+ movie);  
mLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);  
mLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgressHandler);  
mLoader.load(mRequest);

in my main file and the file swfloader.swf is an as2 file and inside I do:  
var movie:String=\_root.m; //get the movie name passed  
…  
loader.loadClip(“tutorial\_movies/”+movie, container);  
etc…  
all my loading process to load mymovie.swf

But I get a Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found. in my main file. If I remove the “m=”+ movie" from the url request then i don’t get the error

Please help,

Thank you!
