Copy link to clipboard
Copied
I have been searching this for a long time...
Button_home.addEventListener(MouseEvent.CLICK, back);
function back(e:MouseEvent):void{
var backLink:URLRequest = new URLRequest("C:\Users\HP\Desktop\Web Space\Space.mht");
navigateToURL(backLink, "_blank");
}
I am not really sure that i put this correctly but... when i open it said that
"No webpage was found for the web address: file:///C:/UsersHPDesktopWeb%20SpaceSpace.mht"
So... is there anyway to open this file(.mht) correctly by my .swf?(By the button inside .swf)
(PS:Sorry if i said something incorrectly)
1 Correct answer
more your mht file to the same directory as your swf and html. then use:
var backLink:URLRequest = new URLRequest("Space.mht");
Copy link to clipboard
Copied
you need to use the correct address. in addition, unless this is an air or projector file, you should upload your files and test from a server. use a relative, not absolute, path.
Copy link to clipboard
Copied
So that's mean that i can't open my file(.mht) unless i upload it?
and there is no other way huh?
So is that same as file of html?
Copy link to clipboard
Copied
no, that's not what i meant.
but you should narrow your problem by uploading to a server and using a relative path unless you're creating a projector or air project.
Copy link to clipboard
Copied
Sorry but what is air project?
and
I can't upload it to server because i was doing my school project so...(i dont have internet at my school)
Copy link to clipboard
Copied
is your project supposed to be displayed in a web browser? is your project supposed to be installed on user's computers?
Copy link to clipboard
Copied
My project supposed to be displayed in my own computer and also in web browser...
Copy link to clipboard
Copied
more your mht file to the same directory as your swf and html. then use:
var backLink:URLRequest = new URLRequest("Space.mht");
Copy link to clipboard
Copied
Sorry... i can't really understand this...
what is more my mht file to the same directory as your swf and html...
Copy link to clipboard
Copied
"more" should be "move".
Copy link to clipboard
Copied
Is "same directory" mean by same folder?
Copy link to clipboard
Copied
yes.
Copy link to clipboard
Copied
Thank you for your assistance!
My project working prefect now!
Thanks for helping me!
Copy link to clipboard
Copied
you're welcome.

