Skip to content

Commit

Permalink
Added #2389 Support for SPL file extension (Flash version 1 - Future …
Browse files Browse the repository at this point in the history
…Splash Animator)
  • Loading branch information
jindrapetrik committed Jan 5, 2025
1 parent 85c155b commit 30e87d6
Show file tree
Hide file tree
Showing 24 changed files with 95 additions and 27 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All notable changes to this project will be documented in this file.
- FLA export - accessibility for AS3 files
- [#2375] Sound sync event/start/stop handling (for playback in FFDec)
- [#2374] Quick filter by folder type (Ctrl+F on Resources view tag tree)
- [#2389] Support for SPL file extension (Flash version 1 - Future Splash Animator)

### Fixed
- [#2375] Added limit of simultaneously played sounds
Expand Down Expand Up @@ -3682,6 +3683,7 @@ Major version of SWF to XML export changed to 2.
[alpha 7]: https://github.com/jindrapetrik/jpexs-decompiler/releases/tag/alpha7
[#2375]: https://www.free-decompiler.com/flash/issues/2375
[#2374]: https://www.free-decompiler.com/flash/issues/2374
[#2389]: https://www.free-decompiler.com/flash/issues/2389
[#2381]: https://www.free-decompiler.com/flash/issues/2381
[#2384]: https://www.free-decompiler.com/flash/issues/2384
[#2366]: https://www.free-decompiler.com/flash/issues/2366
Expand Down
8 changes: 8 additions & 0 deletions installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -680,12 +680,16 @@ Section "$(STRING_ADD_CONTEXT_MENU)" SecContextMenu
SetRegView 64
Push "swf"
Call AddToExtContextMenu
Push "spl"
Call AddToExtContextMenu
Push "gfx"
Call AddToExtContextMenu

SetRegView 32
Push "swf"
Call AddToExtContextMenu
Push "spl"
Call AddToExtContextMenu
Push "gfx"
Call AddToExtContextMenu

Expand Down Expand Up @@ -751,12 +755,16 @@ Section "Uninstall"
SetRegView 64
Push "swf"
Call un.RemoveExtContextMenu
Push "spl"
Call un.RemoveExtContextMenu
Push "gfx"
Call un.RemoveExtContextMenu

SetRegView 32
Push "swf"
Call un.RemoveExtContextMenu
Push "spl"
Call un.RemoveExtContextMenu
Push "gfx"
Call un.RemoveExtContextMenu

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,16 @@ public boolean isBundle() {
return false;
}
String extension = Path.getExtension(fileObj);
return (detectBundle) && (extension == null || !(extension.equals(".swf") || extension.equals(".gfx") || extension.equals(".abc")));
return detectBundle
&& (
extension == null
|| !(
extension.equals(".swf")
|| extension.equals(".spl")
|| extension.equals(".gfx")
|| extension.equals(".abc")
)
);
}
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ protected void initBundle(InputStream is, File filename) throws IOException {

while ((entry = zip.getNextEntry()) != null) {
if (entry.getName().toLowerCase().endsWith(".swf")
|| entry.getName().toLowerCase().endsWith(".spl")
|| entry.getName().toLowerCase().endsWith(".gfx")
|| entry.getName().toLowerCase().endsWith(".abc")) {
keySet.add(entry.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public static boolean addToContextMenu(boolean add, boolean fromCommandLine) {
}

private static boolean addToContextMenu(boolean add, boolean fromCommandLine, String exeName) {
final String[] extensions = new String[]{"swf", "gfx"};
final String[] extensions = new String[]{"swf", "spl", "gfx"};

final WinReg.HKEY REG_CLASSES_HKEY = WinReg.HKEY_LOCAL_MACHINE;
final String REG_CLASSES_PATH = "Software\\Classes\\";
Expand Down
25 changes: 16 additions & 9 deletions src/com/jpexs/decompiler/flash/gui/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ public void run() {
JFileChooser fc = new JFileChooser();
fc.setCurrentDirectory(new File(Configuration.lastOpenDir.get()));
FileFilter allSupportedFilter = new FileFilter() {
private final String[] supportedExtensions = new String[]{".swf", ".gfx"};
private final String[] supportedExtensions = new String[]{".swf", ".spl", ".gfx"};

@Override
public boolean accept(File f) {
Expand All @@ -1343,12 +1343,14 @@ public String getDescription() {
FileFilter swfFilter = new FileFilter() {
@Override
public boolean accept(File f) {
return (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".swf")) || (f.isDirectory());
return (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".swf"))
|| (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".spl"))
|| (f.isDirectory());
}

@Override
public String getDescription() {
return AppStrings.translate("filter.swf");
return AppStrings.translate("filter.swf_spl");
}
};
fc.addChoosableFileFilter(swfFilter);
Expand Down Expand Up @@ -2149,12 +2151,14 @@ public static boolean saveFileDialog(Openable openable, final SaveFileMode mode)
FileFilter swfFilter = new FileFilter() {
@Override
public boolean accept(File f) {
return (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".swf")) || (f.isDirectory());
return (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".swf"))
|| (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".spl"))
|| (f.isDirectory());
}

@Override
public String getDescription() {
return AppStrings.translate("filter.swf");
return AppStrings.translate("filter.swf_spl");
}
};

Expand Down Expand Up @@ -2273,7 +2277,8 @@ public String getDescription() {
try {
String fileName = file.getAbsolutePath();
if (selFilter == swfFilter) {
if (!fileName.toLowerCase(Locale.ENGLISH).endsWith(extension)) {
if (!fileName.toLowerCase(Locale.ENGLISH).endsWith(extension)
&& !fileName.toLowerCase(Locale.ENGLISH).endsWith(".spl")) {
fileName += extension;
}
((SWF) openable).gfx = false;
Expand Down Expand Up @@ -2368,7 +2373,7 @@ public static boolean openFileDialog() {
}
fc.setCurrentDirectory(new File(Configuration.lastOpenDir.get()));
FileFilter allSupportedFilter = new FileFilter() {
private final String[] supportedExtensions = new String[]{".swf", ".gfx", ".swc", ".zip", ".iggy", ".abc"};
private final String[] supportedExtensions = new String[]{".swf", ".spl", ".gfx", ".swc", ".zip", ".iggy", ".abc"};

@Override
public boolean accept(File f) {
Expand All @@ -2391,12 +2396,14 @@ public String getDescription() {
FileFilter swfFilter = new FileFilter() {
@Override
public boolean accept(File f) {
return (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".swf")) || (f.isDirectory());
return (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".swf"))
|| (f.getName().toLowerCase(Locale.ENGLISH).endsWith(".spl"))
|| (f.isDirectory());
}

@Override
public String getDescription() {
return AppStrings.translate("filter.swf");
return AppStrings.translate("filter.swf_spl");
}
};
fc.addChoosableFileFilter(swfFilter);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1017,4 +1017,7 @@ menu.tools.solEditor = Sol cookie editor
node.cookies = cookies

menu.help.wiki = Visit FFDec Wiki
message.wiki = Visit FFDec Wiki at: \r\n%url%
message.wiki = Visit FFDec Wiki at: \r\n%url%

#after 22.0.1
filter.swf_spl = SWF files (*.swf, *.spl)
Original file line number Diff line number Diff line change
Expand Up @@ -609,3 +609,6 @@ filter.iggy = Fitxers Iggy (*.iggy)
#...
message.confirm.remove.nodep = Segur que vols eliminar %item%?
message.confirm.removemultiple.nodep = Segur que vols eliminar %count% elements?

#...
filter.swf_spl = Fitxers SWF (*.swf, *.spl)
Original file line number Diff line number Diff line change
Expand Up @@ -999,4 +999,7 @@ menu.tools.solEditor = Editor sol cookies
node.cookies = cookies

menu.help.wiki = Nav\u0161t\u00edvit FFDec Wiki
message.wiki = Nav\u0161tivte FFDec Wiki na: \r\n%url%
message.wiki = Nav\u0161tivte FFDec Wiki na: \r\n%url%

#after 22.0.1
filter.swf_spl = SWF soubory (*.swf, *.spl)
Original file line number Diff line number Diff line change
Expand Up @@ -492,4 +492,7 @@ error.image.alpha.invalid = Ung\u00fcltige Alphakanaldaten.
#...
message.confirm.remove.nodep = Wolen Sie wirklich %item% entfernen?
message.confirm.removemultiple.nodep = Wollen sie wirklich %count% Elemente entfernen?
contextmenu.exportFla = Exportiere als *.FLA
contextmenu.exportFla = Exportiere als *.FLA

#...
filter.swf_spl = SWF Dateien (*.swf, *.spl)
Original file line number Diff line number Diff line change
Expand Up @@ -564,4 +564,6 @@ button.remove = Remover
#...
message.confirm.remove.nodep = Est\u00e1 seguro que desea remover %item%?
message.confirm.removemultiple.nodep = Est\u00e1 seguro que desea eliminar %count% art\u00edculos?
contextmenu.exportFla = Exportar a FLA
contextmenu.exportFla = Exportar a FLA
#...
filter.swf_spl = Archivos SWF (*.swf, *.spl)
Original file line number Diff line number Diff line change
Expand Up @@ -580,4 +580,6 @@ contextmenu.showInResources = Afficher dans les resources
#...
message.confirm.remove.nodep = \u00cates-vous s\u00fbr de vouloir retirer les objets %item% ?
message.confirm.removemultiple.nodep = \u00cates-vous s\u00fbr de vouloir retirer %count% objets ?
contextmenu.exportFla = Exporter en FLA
contextmenu.exportFla = Exporter en FLA
#...
filter.swf_spl = Fichiers SWF (*.swf, *.spl)
Original file line number Diff line number Diff line change
Expand Up @@ -561,4 +561,6 @@ export.script.singleFileParallelModeWarning = Az egy f\u00e1jlba t\u00f6rt\u00e9
#...
message.confirm.remove.nodep = Biztos benne, hogy t\u00f6r\u00f6lni k\u00edv\u00e1nja a %item%-t ?
message.confirm.removemultiple.nodep = Biztos benne, hogy t\u00f6r\u00f6lni k\u00edv\u00e1nja a %count% elemet ?
contextmenu.exportFla = Export\u00e1l\u00e1s FLA-ba
contextmenu.exportFla = Export\u00e1l\u00e1s FLA-ba
#...
filter.swf_spl = SWF f\u00e1ljok (*.swf, *.spl)
Original file line number Diff line number Diff line change
Expand Up @@ -564,4 +564,6 @@ button.remove = Rimuovi
#...
message.confirm.remove.nodep = Sicuro di voler remuovere %item%?
message.confirm.removemultiple.nodep = Confermare la rimozione di %count% elementi?
contextmenu.exportFla = Esporta come FLA
contextmenu.exportFla = Esporta come FLA
#...
filter.swf_spl = File SWF (*.swf, *.spl)
Original file line number Diff line number Diff line change
Expand Up @@ -643,4 +643,7 @@ notavailable.activex.disable = \u8a73\u7d30\u8a2d\u5b9a \uff0f \u305d\u306e\u4ed
\u306e\u30c1\u30a7\u30c3\u30af\u3092\u5916\u3059\u3053\u3068\u3067\u3001\u5185\u90e8\u30d3\u30e5\u30fc\u30a2\u3092\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\n \
\u3057\u304b\u3057\u3001\u6b8b\u5ff5\u306a\u304c\u3089\u3001\u3053\u308c\u306f\u52d5\u753b\u30bf\u30b0\u3067\u306f\u6a5f\u80fd\u3057\u307e\u305b\u3093\u3002
button.showin.flashprojector = flash projector \u3067\u8868\u793a
contextmenu.exportFla = FLA \u3067\u30a8\u30af\u30b9\u30dd\u30fc\u30c8
contextmenu.exportFla = FLA \u3067\u30a8\u30af\u30b9\u30dd\u30fc\u30c8

#...
filter.swf_spl = SWF \u30d5\u30a1\u30a4\u30eb (*.swf, *.spl)
Original file line number Diff line number Diff line change
Expand Up @@ -956,4 +956,6 @@ contextmenu.copyTagToReplaceByExportName = Tag kopi\u00ebren naar (vervangen doo
button.breakpointList = Toon breekpuntlijst
node.scenes = sc\u00e8nes
contextmenu.showInFramesFolder = Weergeven in framesmap
contextmenu.exportFla = Naar FLA exporteren
contextmenu.exportFla = Naar FLA exporteren
#...
filter.swf_spl = SWF-bestanden (*.swf, *.spl)
Original file line number Diff line number Diff line change
Expand Up @@ -408,4 +408,6 @@ font.name.intag = Nazwa czcionki w etykiecie:
#...
message.confirm.remove.nodep = Czy na pewno chcesz usun\u0105\u0107 %item%?
message.confirm.removemultiple.nodep = Czy na pewno chcesz usun\u0105\u0107 %count% obiekt\u00f3w(y)?
contextmenu.exportFla = Eskportuj do pliku FLA
contextmenu.exportFla = Eskportuj do pliku FLA
#...
filter.swf_spl = Pliki SWF (*.swf, *.spl)
Original file line number Diff line number Diff line change
Expand Up @@ -281,4 +281,6 @@ ColorChooser.swatchesRecentText = Recente:
ColorChooser.sampleText = Amostra de Texto Amostra de Texto
#...
message.confirm.remove.nodep = Tem a certeza que pretende remover %item%?
contextmenu.exportFla = Exportar para FLA
contextmenu.exportFla = Exportar para FLA
#...
filter.swf_spl = Ficheiros SWF (*.swf, *.spl)
Original file line number Diff line number Diff line change
Expand Up @@ -923,4 +923,6 @@ shaperecords.edge.style.newstyles = Novos estilos - %numfillstyles%x fillstyle +
shaperecords.edge.style.fillstyle0=FillStyle0 = %value%
shaperecords.edge.style.fillstyle1=FillStyle1 = %value%
shaperecords.edge.end = Fim da forma
contextmenu.exportFla = Exportar para FLA
contextmenu.exportFla = Exportar para FLA
#...
filter.swf_spl = Arquivos SWF (*.swf, *.spl)
Original file line number Diff line number Diff line change
Expand Up @@ -452,4 +452,6 @@ menu.file.import.symbolClass = \u041a\u043b\u0430\u0441\u0441 \u0441\u0438\u043c
#...
message.confirm.remove.nodep = \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442 %item%?
message.confirm.removemultiple.nodep = \u0412\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u044b, \u0447\u0442\u043e \u0436\u0435\u043b\u0430\u0435\u0442\u0435 \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0432 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435: %count%?
contextmenu.exportFla = \u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 FLA
contextmenu.exportFla = \u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 FLA
#...
filter.swf_spl = SWF \u0444\u0430\u0439\u043b\u044b (*.swf, *.spl)
Original file line number Diff line number Diff line change
Expand Up @@ -642,4 +642,6 @@ notavailable.activex.disable = Du kan aktivera med intern visning genom att avma
Avancerade Inst\u00e4llningar / Annat / (F\u00f6r\u00e5ldrad) Anv\u00e4nd Adobe Flash player f\u00f6r att f\u00f6rhandsgranska objekt\n \
Men tyv\u00e4rr fungerar det inte f\u00f6r filmtaggar.
button.showin.flashprojector = Visa i flash projector
contextmenu.exportFla = Exporterar FLA
contextmenu.exportFla = Exporterar FLA
#...
filter.swf_spl = SWF filer (*.swf, *.spl)
Original file line number Diff line number Diff line change
Expand Up @@ -870,4 +870,6 @@ contextmenu.addScript.clipactionrecord = \u00d6rnek etkinlik komut dosyas\u0131
contextmenu.addScript.doinitaction = Hareketli ba\u015flang\u0131\u00e7 \u200b\u200bkomut dosyas\u0131 ekle - DoInitAction
#after 18.4.1
warning.cannotencrypt = UYARI: %file% dosyas\u0131 HARMAN Air \u015fifrelemesi kullan\u0131larak \u015fifrelendi.\r\nY\u00fcklenmek \u00fczere \u015fifresi ba\u015far\u0131yla \u00e7\u00f6z\u00fcld\u00fc, ancak de\u011fi\u015ftirilen dosyay\u0131 daha sonra kaydetmek isterseniz,\r\n\u015fifreleme kald\u0131r\u0131lacak ( = \u015fifrelenmemi\u015f).
contextmenu.exportFla = FLA'ya d\u0131\u015fa aktar
contextmenu.exportFla = FLA'ya d\u0131\u015fa aktar
#...
filter.swf_spl = SWF dosyalar\u0131 (*.swf, *.spl)
Original file line number Diff line number Diff line change
Expand Up @@ -335,4 +335,6 @@ menu.tools.search = \u041f\u043e\u0448\u0443\u043a \u0442\u0435\u043a\u0441\u044
#...
message.confirm.remove.nodep = \u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u0449\u043e \u0431\u0430\u0436\u0430\u0454\u0442\u0435 \u0432\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0435\u043b\u0435\u043c\u0435\u043d\u0442 %item%?
message.confirm.removemultiple.nodep = \u0412\u0438 \u0432\u043f\u0435\u0432\u043d\u0435\u043d\u0456, \u0449\u043e \u0445\u043e\u0447\u0435\u0442\u0435 \u0432\u0438\u0434\u0430\u043b\u0438\u0442\u0438 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0438 \u0443 \u043a\u0456\u043b\u044c\u043a\u043e\u0441\u0442\u0456: %count%?
contextmenu.exportFla = \u0415\u043a\u0441\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 \u0434\u043e FLA
contextmenu.exportFla = \u0415\u043a\u0441\u043f\u043e\u0440\u0442\u0443\u0432\u0430\u0442\u0438 \u0434\u043e FLA
#...
filter.swf_spl = SWF \u0444\u0430\u0439\u043b\u0438 (*.swf, *.spl)
Original file line number Diff line number Diff line change
Expand Up @@ -1007,3 +1007,5 @@ menu.tools.solEditor = \u5b58\u6863\u7f16\u8f91\u5668
node.cookies = cookies
menu.help.wiki = \u8bbf\u95eeFFDec\u7ef4\u57fa\u767e\u79d1
message.wiki = \u8bbf\u95eeFFDec\u7ef4\u57fa\u767e\u79d1: \r\n%url%
#...
filter.swf_spl = SWF\u6587\u4ef6(*.swf, *.spl)

0 comments on commit 30e87d6

Please sign in to comment.