Copy link to clipboard
Copied
Hello This is probably a simple answer but I haven't used flash since version 3 so I am on a bit of a steep learning curve.
I am trying to produce a interactive presentation using animate CC with action script 3 which will all be presented locally on a laptop.
When I use the code
name1_button.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_5);
function fl_ClickToGoToWebPage_5(event:MouseEvent):void
{
navigateToURL(new URLRequest("wibble.htm"), "_blank");
}
to try and open the webpage wibble,htm it can't find the path of the file even though the wibble.htm is in the same directory as my swf and wrapper html file.
Is there a way to define a directory for paths of webpages and other media I want to link to somewhere in the program, or is there a better way to click on a button to open a webpage locally?
thanks
James
don't use an absolute path.
fix your security settings to allow the directory you're using to test per message 1.
or you can try changing your publish settings:
Copy link to clipboard
Copied
make sure there is a wibble.htm (not eg, wibble.html).
if that doesn't help and you're testing locally adjust your security settings or test non-locally, Adobe - Flash Player : Settings Manager - Global Security Settings panel
Copy link to clipboard
Copied
Hello kglad, thanks for the ideas but I still can't seem to get it to link to local files. I've tried with both htm and html, also importing a video file none of which are found once it is in the browser on the local machine.
What is the syntax for specifying an absolute path to a file rather than a relative one?
e.g.
name1_button.addEventListener(MouseEvent.CLICK, fl_ClickToGoToWebPage_5);
function fl_ClickToGoToWebPage_5(event:MouseEvent):void
{
navigateToURL(new URLRequest("c:\temp\wibble.htm"), "_blank");
}
Copy link to clipboard
Copied
don't use an absolute path.
fix your security settings to allow the directory you're using to test per message 1.
or you can try changing your publish settings:
Copy link to clipboard
Copied
Brilliant thanks so much, it was Chrome being odd. When I tried to add a folder in the security settings using the browse for folder option it wouldn't do it. I then tried this in IE and it worked. As a get around in chrome I just pasted the location rather than using the browse for folder.
Thanks for the help you are a star!
James
Copy link to clipboard
Copied
you're welcome.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now