[Solved] SWF files cannot be opened

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
fargred

[Solved] SWF files cannot be opened

Unread post by fargred » 2015-01-05, 12:35

When I’m trying to open an SWF file, Pale moon shows a small dialog window in which it asks what it should do with this file: open with… (Palemoon itself by default, choosing this option causes the dialog to reemerge) or save. In Preferences → Applications ‘SWF file’ item is set to ‘Use Shockwave Flash (in Palemoon)’.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35650
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: SWF files cannot be opened

Unread post by Moonchild » 2015-01-05, 13:13

Files offered over the internet are not just handled by file extension. Instead, they are handled by MIME type. If the web server offers an incorrect MIME type for the file, then Pale Moon will handle the file type as-indicated by the web server. if that is a generic binary type or unknown type, Pale Moon will open the standard file handling dialog box.

I'll also be moving this topic to community support since it is off-topic for browser dev.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

fargred

Re: SWF files cannot be opened

Unread post by fargred » 2015-01-05, 15:38

I was trying to open an SWF file from my hard disk.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35650
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: SWF files cannot be opened

Unread post by Moonchild » 2015-01-05, 16:08

fargred wrote:I was trying to open an SWF file from my hard disk.
Um, yeah, since you didn't specify, I gathered normal use for a web browser, i.e. viewing it on the 'net.

I don't think opening from a local file *should* be an issue but I've never tried it. That's normally the task of a standalone flash player or media player with swf support.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

fargred

Re: SWF files cannot be opened

Unread post by fargred » 2015-01-05, 17:01

Moonchild wrote:That's normally the task of a standalone flash player
Do they still exist? And why would I need one if I already have fully capable flashplugin for my browser?
Moonchild wrote:or media player with swf support.
I use mpv, which relies on ffmpeg, to play videos and mpv to play audio. None of them consider executing ActionScript code as their mission. Because UNIX-way says ‘one tool for one purpose’.

User avatar
ron_1
Moon Magic practitioner
Moon Magic practitioner
Posts: 2860
Joined: 2012-06-28, 01:20

Re: SWF files cannot be opened

Unread post by ron_1 » 2015-01-05, 23:10

Off-topic:
fargred wrote:
I use mpv, which relies on ffmpeg, to play videos and mpv to play audio. None of them consider executing ActionScript code as their mission.
Not familiar with ActionScript code, but do you think mpv would play the file if you changed the file extension from .swf to .flv?

lyceus

Re: SWF files cannot be opened

Unread post by lyceus » 2015-01-06, 03:40

How to see a swf in your PaleMoon:

1. Have flash plugin installed (duh!)
2. Use the menu File > Open File and select your SWF file
3. SWF will show full screen and start to play.
4. Enjoy! Notice the screenshot with the local file loaded.

PS. For FLV you can use VLC player without trouble.

fargred

Re: SWF files cannot be opened

Unread post by fargred » 2015-01-06, 09:30

helloimustbegoing wrote:Not familiar with ActionScript code, but do you think mpv would play the file if you changed the file extension from .swf to .flv?
mpv can play audio from the SWF, but what I would want is to play on old flash game. And that requires, ahem, flash, i.e. ActionScript code interpreting.

fargred

Re: SWF files cannot be opened

Unread post by fargred » 2015-01-06, 09:32

lobocursor wrote:How to see a swf in your Pale Moon:

1. Have flash plugin installed (duh!)
2. Use the menu File > Open File and select your SWF file
3. SWF will show full screen and start to play.
Except that it doesn’t.
http://webmup.com/jRol5/

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35650
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: SWF files cannot be opened

Unread post by Moonchild » 2015-01-06, 10:38

Okay, essential information in the uploaded video: You're not using Windows - I guess Linux, judging by the looks of the controls.

Also, the flash player you are trying to use, instead of starting, shows you the settings instead -- so it looks like you have a wrong association there to the SWF file type.

Moving this to the Linux board, and maybe some Linux folks can assist.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

fargred

Re: SWF files cannot be opened

Unread post by fargred » 2015-01-06, 12:19

Moonchild wrote:Also, the flash player you are trying to use, instead of starting, shows you the settings instead -- so it looks like you have a wrong association there to the SWF file type.
I actually started the topic mentioning that the association IS PRESENT and SWF files are set to be opened with Adobe flash plugin in Pale moon. If you have certain reasons to not believe me, here’s screenshot: http://i.imgur.com/BfkMNJt.png I see it like Pale moon doesn’t provide the flash plugin for standalone SWF files.

squarefractal

Re: SWF files cannot be opened

Unread post by squarefractal » 2015-01-06, 14:38

It seems like you have set Pale Moon to open Flash files with the flash-player-properties executable. Please try opening the SWF file in a clean profile.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35650
Joined: 2011-08-28, 17:27
Location: Motala, SE

Re: SWF files cannot be opened

Unread post by Moonchild » 2015-01-06, 17:55

fargred wrote:the association IS PRESENT and SWF files are set to be opened with Adobe flash plugin in Pale moon. If you have certain reasons to not believe me,
It's not that I don't believe you, just saying it's linked to the wrong thing...
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

martywd

Re: SWF files cannot be opened

Unread post by martywd » 2015-01-06, 19:45

squarefractal wrote:It seems like you have set Pale Moon to open Flash files with the flash-player-properties executable. Please try opening the SWF file in a clean profile.
Not sure that Pale Moon was 'set' that way by default, but yes, the 'properies/settings' fuctionality definitely complicating this issue.

I would suggest un-installing either 'adobe-flash-properties-gtk' or adobe-flash-properties-kde package or whatever the flash 'properties/settings' package is called in the *nix version that the OP is running. In Linux Mint/Ubuntu, the 'properties/settings' package _is_not_ necessary for the flash browser plugin to function. I would suspect that in other *nix's that also the case?

OP: What flavor of Linux are you running?
.

fargred

Re: SWF files cannot be opened

Unread post by fargred » 2015-01-07, 08:18

squarefractal wrote:It seems like you have set Pale Moon to open Flash files with the flash-player-properties executable. Please try opening the SWF file in a clean profile.
And how could I even do that? There is only one option related to flash that Pale moon suggests.

fargred

Re: SWF files cannot be opened

Unread post by fargred » 2015-01-07, 08:24

martywd wrote:I would suggest un-installing either 'adobe-flash-properties-gtk' or adobe-flash-properties-kde package or whatever the flash 'properties/settings' package is called in the *nix version that the OP is running… I would suspect that in other *nix's that also the case?
OP can’t because the flash-player-properties binary and the plugin itself are coming with the same adobe-flash package.
martywd wrote:OP: What flavor of Linux are you running?
Gentoo ~amd64.

kmikazuki

Re: SWF files cannot be opened

Unread post by kmikazuki » 2015-01-07, 14:59

Not sure if this is how to fix it on Gentoo, but with Arch Linux it is a mime type issue from the freedesktop.org.xml.

So try this:
sudo vim /usr/share/mime/packages/freedesktop.org.xml
Search for: <mime-type type="application/vnd.adobe.flash.movie">
Change it to: <mime-type type="application/x-shockwave-flash">
Then exit vim or your prefered text editor.
Then run: update-mime-database /usr/share/mime

There is a more insane version of doing this that does not require a mime type patch. You use a hex editor and search for "application/futuresplash" in libflashplayer.so, once finding the instance of it that is followed by the string "FutureSplash Player". You overwrite "application/futuresplash" with "application/vnd.adobe.flash.movie", then add enough zeros at the end to cut off "FutureSplash Player" to "ash Player".

fargred

Re: SWF files cannot be opened

Unread post by fargred » 2015-01-07, 20:04

kmikazuki wrote:Change it to: <mime-type type="application/x-shockwave-flash">
I’m not sure whether I should do that, because in my current freedesktop.xml there is already an alias for that.

Code: Select all

  <mime-type type="application/vnd.adobe.flash.movie">
	<comment>Shockwave Flash file</comment>
	<alias type="application/x-shockwave-flash"/>
	<alias type="application/futuresplash"/>
	<generic-icon name="video-x-generic"/>
	<magic priority="50">
	  <match value="FWS" type="string" offset="0"/>
	  <match value="CWS" type="string" offset="0"/>
	</magic>
	<glob pattern="*.swf"/>
	<glob pattern="*.spl"/>
  </mime-type>

kmikazuki

Re: SWF files cannot be opened

Unread post by kmikazuki » 2015-01-07, 20:22

fargred wrote:
kmikazuki wrote:Change it to: <mime-type type="application/x-shockwave-flash">
I’m not sure whether I should do that, because in my current freedesktop.xml there is already an alias for that.

Code: Select all

  <mime-type type="application/vnd.adobe.flash.movie">
	<comment>Shockwave Flash file</comment>
	<alias type="application/x-shockwave-flash"/>
	<alias type="application/futuresplash"/>
	<generic-icon name="video-x-generic"/>
	<magic priority="50">
	  <match value="FWS" type="string" offset="0"/>
	  <match value="CWS" type="string" offset="0"/>
	</magic>
	<glob pattern="*.swf"/>
	<glob pattern="*.spl"/>
  </mime-type>
Mine looks similar, changing it to <mime-type type="application/x-shockwave-flash"> for the first line (<mime-type type="application/vnd.adobe.flash.movie">) is the one that should fix your problem

Code: Select all

 <mime-type type="application/x-shockwave-flash">
   <comment>Shockwave Flash file</comment>
   <alias type="application/x-shockwave-flash"/>
   <alias type="application/futuresplash"/>
On another note, I should add, when you run the command: update-mime-database /usr/share/mime you will need to sudo it too. (Sorry forgot to add that note.)

Here is my exact section if you are interested:

Code: Select all

  <mime-type type="application/x-shockwave-flash"><!-- This used to be: <mime-type type="application/vnd.adobe.flash.movie"> -->
    <comment>Shockwave Flash file</comment>
    <comment xml:lang="ar">ملف Shockwave Flash</comment>
    <comment xml:lang="be@latin">Fajł Shockwave Flash</comment>
    <comment xml:lang="bg">Файл — Shockwave Flash</comment>
    <comment xml:lang="ca">fitxer Shockwave Flash</comment>
    <comment xml:lang="cs">Soubor Shockwave Flash</comment>
    <comment xml:lang="da">Shockwave Flash-fil</comment>
    <comment xml:lang="de">Shockwave-Flash-Datei</comment>
    <comment xml:lang="el">αρχείο Shockwave Flash</comment>
    <comment xml:lang="en_GB">Shockwave Flash file</comment>
    <comment xml:lang="eo">dosiero de Shockwave Flash</comment>
    <comment xml:lang="es">archivo Shockwave Flash</comment>
    <comment xml:lang="eu">Shockwave Flash fitxategia</comment>
    <comment xml:lang="fi">Shockwave Flash -tiedosto</comment>
    <comment xml:lang="fo">Shockwave Flash fíla</comment>
    <comment xml:lang="fr">fichier Shockwave Flash</comment>
    <comment xml:lang="ga">comhad Shockwave Flash</comment>
    <comment xml:lang="gl">ficheiro sockwave Flash</comment>
    <comment xml:lang="he">קובץ של Shockwave Flash</comment>
    <comment xml:lang="hr">Shockwave Flash datoteka</comment>
    <comment xml:lang="hu">Shockwave Flash-fájl</comment>
    <comment xml:lang="id">Berkas Shockwave Flash</comment>
    <comment xml:lang="it">File Shockwave Flash</comment>
    <comment xml:lang="ja">Shockwave Flash ファイル</comment>
    <comment xml:lang="kk">Shockwave Flash файлы</comment>
    <comment xml:lang="ko">Shockwave 플래시 파일</comment>
    <comment xml:lang="lt">Shockwave Flash failas</comment>
    <comment xml:lang="lv">Shockwave Flash datne</comment>
    <comment xml:lang="ms">Fail Shockwave Flash</comment>
    <comment xml:lang="nb">Shockwave Flash-fil</comment>
    <comment xml:lang="nl">Shockwave Flash-bestand</comment>
    <comment xml:lang="nn">Shockwave Flash-fil</comment>
    <comment xml:lang="pl">Plik Shockwave Flash</comment>
    <comment xml:lang="pt">ficheiro Shockwave Flash</comment>
    <comment xml:lang="pt_BR">Arquivo Shockwave Flash</comment>
    <comment xml:lang="ro">Fișier Shockwave Flash</comment>
    <comment xml:lang="ru">файл Shockwave Flash</comment>
    <comment xml:lang="sk">Súbor Shockwave Flash</comment>
    <comment xml:lang="sl">Datoteka Shockwave Flash</comment>
    <comment xml:lang="sq">File Flash Shockwave</comment>
    <comment xml:lang="sr">Шоквејв Флеш датотека</comment>
    <comment xml:lang="sv">Shockwave Flash-fil</comment>
    <comment xml:lang="uk">файл Shockwave Flash</comment>
    <comment xml:lang="vi">Tập tin Flash Shockwave</comment>
    <comment xml:lang="zh_CN">Shockwave Flash 文件</comment>
    <comment xml:lang="zh_TW">Shockwave Flash 檔</comment>
    <alias type="application/x-shockwave-flash"/>
    <alias type="application/futuresplash"/>
    <generic-icon name="video-x-generic"/>
    <magic priority="50">
      <match value="FWS" type="string" offset="0"/>
      <match value="CWS" type="string" offset="0"/>
    </magic>
    <glob pattern="*.swf"/>
    <glob pattern="*.spl"/>
  </mime-type>
And everything still works, if you still feel odd since there is an alias for that, just swap them? I tested trying that and everything is fully functional.

fargred

Re: SWF files cannot be opened

Unread post by fargred » 2015-01-09, 10:18

kmikazuki wrote:And everything still works, if you still feel odd since there is an alias for that, just swap them? I tested trying that and everything is fully functional.
I’ve just replaced

Code: Select all

application/vnd.adobe.flash.movie
with

Code: Select all

application/x-shockwave-flash
in /usr/share/mime/packages/freedesktop.org.xml, saved the file, restarted the browser and nothing has changed. Pale moon still suggests to open with plugin Adobe flash or save the file, and when OK button is pressed, it opens flash plugin preferences window.