Copy link to clipboard
Copied
Preface: I'm a novice a little over his head. Trying to teach myself on the fly, so any answers given might need a little more context or explanation than usual. Thanks in advance.
I'm building a simple menu interface. Buttons link to various URLs on the company intranet and well as documents and folders on the company network. My URL links work fine, but the ones I created for network folders and files aren't working properly. When I test the movie in Animate, they work fine, but they don't work after I publish the movie.
I used the code below to create the network links:
pg_5_btn16.addEventListener(MouseEvent.CLICK, pg5_btn_16);
function pg5_btn_16(event:MouseEvent):void
{
navigateToURL(new URLRequest("file://NETWORK LOCATION"), "_blank");
}
I suspect I'm using the wrong action for what I want to do, but I'm not sure. I've poked around some and tried experimenting with fscommand and externalinterface, but haven't been able to use either of those methods to resolve the issue. Any advice is appreciated.
if the loading and loaded files are on the same server, use a relative path. that path will be the same when testing as when deployed (as long as the relative locations stay the same).
Copy link to clipboard
Copied
your navigatetourl path is almost certainly incorrect.
Copy link to clipboard
Copied
great...so how do I fix it? The use of file:// in place of http:// is needed due to restrictions on what file types are allowed to be uploaded to the company intranet sites. I can't upload the needed files to a site, so I they will never have an http:// URL. I have the true network path in my code. I used NETWORK LOCATION as a place holder to redact proprietary information.
Again, I'm a novice, so some context and explanation is helpful. Thanks.
Copy link to clipboard
Copied
if the loading and loaded files are on the same server, use a relative path. that path will be the same when testing as when deployed (as long as the relative locations stay the same).
Copy link to clipboard
Copied
What do you mean by a relative path? As of now, my path is set up like this:
file://server/folder/folder/filename
I have my SWF movie file in the same folder as the files to be loaded. I have not changed any of the locations.
Copy link to clipboard
Copied
use google to learn about path references. afaik there's no shortcut unless you want to hire someone to do this for you.
Copy link to clipboard
Copied
I did some research on relative paths. I don't think you're answering what I'm asking. The files I need to load are not among the assets in my movie. They are located completely outside of my SWF. I just need a way to link these files without having to rely on a hypertext URL
Copy link to clipboard
Copied
what do you mean by, "I just need a way to link these files without having to rely on a hypertext URL"?
you don't want to use navigatetourl()?
do you know how to reference the url using an anchor tag?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now