Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Can i use ActionScript3 to open my .mht file?

New Here ,
Oct 11, 2012 Oct 11, 2012

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)

TOPICS
ActionScript
2.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 13, 2012 Oct 13, 2012

more your mht file to the same directory as your swf and html.  then use:

var backLink:URLRequest = new URLRequest("Space.mht");

Translate
Community Expert ,
Oct 11, 2012 Oct 11, 2012

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 12, 2012 Oct 12, 2012

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 12, 2012 Oct 12, 2012

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 12, 2012 Oct 12, 2012

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)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 12, 2012 Oct 12, 2012

is your project supposed to be displayed in a web browser?  is your project supposed to be installed on user's computers?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 13, 2012 Oct 13, 2012

My project supposed to be displayed in my own computer and also in web browser...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 13, 2012 Oct 13, 2012

more your mht file to the same directory as your swf and html.  then use:

var backLink:URLRequest = new URLRequest("Space.mht");

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 13, 2012 Oct 13, 2012

Sorry... i can't really understand this...

what is more my mht file to the same directory as your swf and html...


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 13, 2012 Oct 13, 2012

"more" should be "move".

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 13, 2012 Oct 13, 2012

Is "same directory" mean by same folder?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 13, 2012 Oct 13, 2012

yes.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 14, 2012 Oct 14, 2012

Thank you for your assistance!

My project working prefect now!
Thanks for helping me!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 14, 2012 Oct 14, 2012
LATEST

you're welcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines