# How can I open link in same window



## Alec2008 (Jul 13, 2008)

Hi,

I am extremely new to creating websites, I knew nothing three weeks ago. The site I have built is www.alecq.com the problem I am having is that after much trouble I managed to create a button in flash CS3 and export it to Dreamweaver CS3. The links work, however when pressed they open in a new window. How can I do this so that when a link is pressed it opens in the same window. 
I hope this makes sense. Below is the code I used in Flash for one of the buttons:

import flash.events.MouseEvent;
var getportfolio:URLRequest = new URLRequest("Untitled Document");
addEventListener(MouseEvent.CLICK,pclick);
function pclick(event:MouseEvent):void{
navigateToURL(getportfolio);
}

I will now show the relevant code from dreamweaver:






I would be so very grateful of some help, please keep it simple though, my knowledge is minimal! Many thanks in advance.


----------



## jamiemac2005 (Jul 5, 2007)

Change

```
navigateToURL(getportfolio);
```
to

```
navigateToURL(getportfolio, "_self");
```
it's explained here (navigateToURL has a second parameter that you can use):
http://livedocs.adobe.com/flex/2/langref/flash/net/package.html

Cheers,
Jamey


----------

