Topic: How do you get the Download Link to open in same window?

Hi Felix, hi everyone.

I have read a post and followed the instructions to get the Download Link to open in the same window:

Hey Ray,

There are two things to change, both in the StageManager.as file

The first is to change the openImage function to open in the image in the current window - change this:

private function openImage(){
getURL(mXMLManager.aImageFileNames[mCurrentImageIndex], "image_result");
}

to this (the only change was "image_result" to "_self"):

private function openImage(){
getURL(mXMLManager.aImageFileNames[mCurrentImageIndex], "_self");
}

And the second is to change the menu text that shows up when you right click.  It's around line 60 - just search for "Open image" and you'll see the existing menu text "Open Image in New Window..." and you can change it to whatever you want. 

Autoviewer will reload and start at the beginning when the user hits back.

Hope this helps,

Brian

The images now open in the same window but the DOWNLOAD LINK still opens in a new window everytime it is clicked. I would be eternally grateful if someone could let me know what I am doing wrong  and how I can get the Download Link(Powered by Autoviewer - Download) to open in the same window.

Thanks in advance.

Tom.

Re: How do you get the Download Link to open in same window?

In stagemanager.as do a search for this line:

                getURL(Options.linkURL,"autoviewer");

Change it to:

                getURL(Options.linkURL,"autoviewer", "_self");

Hope this helps,

Adam

Re: How do you get the Download Link to open in same window?

Brilliant! Thanks Adam.

Re: How do you get the Download Link to open in same window?

Hello
When I changing this line in StageManager.as and publish it, autoviewer stops working ? Not loading images at all sad((((( I am using flash cs3. Plese help I just want to see link from download at the same window.