# Using variables in getUrl via JAVA. How?

**URL:** <https://forum.kirupa.com/t/using-variables-in-geturl-via-java-how/316592>\
**Category:** Uncategorized\
**Created:** [November 27, 2010, 4:49am UTC](https://forum.kirupa.com/t/using-variables-in-geturl-via-java-how/316592 "2010-11-27T04:49:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![martinibianko](https://avatars.discourse-cdn.com/v4/letter/m/58956e/32.png) [@martinibianko](https://forum.kirupa.com/u/martinibianko)\
**Post date:** [November 27, 2010, 4:49am UTC](https://forum.kirupa.com/t/using-variables-in-geturl-via-java-how/316592/1 "2010-11-27T04:49:12Z")

</div>

Hi. I’ve got a picture gallery based on some flash code that reads an XML data from file and assign appropriate variable parameter.

So. I’ve got XML  
\<gallery\>  
\<thmb=“thumbnails/003\_tmb.jpg” weblink=“[http://www.reverbnation.com/universeupsidedown](http://www.reverbnation.com/universeupsidedown)”/\>  
\</gallery\> in xml document

…flash code

myPhoto = new XML();  
myPhoto.ignoreWhite = true;  
myPhoto.load(“xmlphoto.xml”);  
myPhoto.onLoad = function(success) {

\_global.urllink = [];

Cycle reads xml… for i to length…  
picHolder = myPhoto.firstChild.childNodes\*;  
\_global.imagefile\* = myPhoto.firstChild.childNodes\*.attributes.thmb;  
\_global.urllink\* = myPhoto.firstChild.childNodes\*.attributes.weblink;

watewer… As the result I’ve got a gallery presented as buttons which contains appropriated image loaded into it…  
And, then you’ve clicked at the thumbnail - appropriate big picture will be loaded in a new created movie clip.

Then I’de like to open a new blank floating window with html page loaded into it accordingly to a button id

I’ve found getURL(‘[http://www.macromedia.com](http://www.macromedia.com)’);  
and rewrite the code a bit:

url\_txt = urllink[this.id];  
getURL(‘url\_txt’);

It’s just opens a new tab in a browser with html page loaded accordingly to the thumbnail id.  
But I want to create a new floating window with a certain page loaded into it

and I found next example:

getURL("javascript:openNewWindow(‘[http://www.macromedia.com](http://www.macromedia.com)’,‘thewin’,‘height=400,width=400,toolbar=no,scrollbars=yes’) ");

I’ve decided to put url\_txt variable instead of the adobe page into getUrl on JAVA, so I got:

getURL("javascript:openNewWindow(‘url\_txt’,‘thewin’,‘height=400,width=400,toolbar=no,scrollbars=yes’) ");

But it stoped working.

When the new floating window is created the page says:  
it couldn’t find a file on a local disc\volumes\canyon\project\url\_txt

Can I use a variable data instead of a straight url adress with a getUrl using JAVA code… As I understood a new floating window is possible to open just using JAVA code…  
Ho can I put varriable istead of adress on Java and ActionScript?;(

Thank you.
