# Does flash\[in ActionScript 3.0\] supports relative URL?

**URL:** https://forum.kirupa.com/t/does-flash-in-actionscript-3-0-supports-relative-url/291903
**Category:** flash
**Created:** [July 7, 2009, 11:53am UTC](https://forum.kirupa.com/t/does-flash-in-actionscript-3-0-supports-relative-url/291903 "2009-07-07T11:53:15Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![SrihariCh](https://avatars.discourse-cdn.com/v4/letter/s/f1d935/32.png) [@SrihariCh](https://forum.kirupa.com/u/SrihariCh)
#### Post date: [July 7, 2009, 11:53am UTC](https://forum.kirupa.com/t/does-flash-in-actionscript-3-0-supports-relative-url/291903/1 "2009-07-07T11:53:15Z")

</div>

Hi all,

```
  I am new to the Flash platform. My work is on Java. But, I need the help of a flash file(.swf) in my Java application to work with. So, I came to here to listen my doubts like this in this forum.

 **Can we pass relative-url using ActionScript 3.0 with Flash?**

```

I have worked with absolute-url till now[WHICH IS IN BOLD] within localhost server only. And my sample piece of code looks like below:

```auto
var request:URLRequest = new URLRequest("http://localhost:8082/getviews");
var urlLoader:URLLoader = new URLLoader();
urlLoader.dataFormat = URLLoaderDataFormat.TEXT;
urlLoader.addEventListener(Event.COMPLETE, completeHandler1);
urlLoader.load(request);

function completeHandler1(event:Event):void {
    trace(“ Inside COMPLETE handler.”);
    var loader:URLLoader = URLLoader(event.target);
    var listData:String=loader.data;
    trace("listData: "+listData);
    var viewswithusertype:Array=listData.split("$");
    /* These are the fields saved in the database server. 
     * Further,I am trying to pass these fields using URLVariables 
     * class available in AS-3.0 into
     */
    usertype=viewswithusertype[0];
    var views:String=viewswithusertype[1];
    var users:Array = views.split(".");
    trace("list is:"+users.length); 
    for (var t=0; t<users.length; t++) {
	trace("in for loop");
	var itemname:String=users[t];
	var itemslist:Array=itemname.split(",");
	trace("itemslist : "+itemslist);
	comboBox_mc.addItem({label:itemslist[1],data:itemslist[0]});

   }//for
}//CompleteHandler1()

```

Can anyone post me with an example or a url regarding this problem.  
I request you to please spend 2 minutes of your valuable time in replying to this post so that I can solve this issue.

Thanks in advance,…  
Srihari.Ch
