Hello!
I am trying to load old SWF files to see if I can revive my game, but seems there are problems with them.
What I did:
git clone --depth=1 https://github.com/openfl/openfl-samples-es6
cd openfl-samples-es6/demos/NyanCat
[ replaced assets/library.swf with my SWF file ]
npm run build
which fails with error:
Module /home/node/app/openfl-samples-es6/demos/NyanCat/node_modules/openfl/bin/tools.js requires node.js version 4.0.0 or higher
[lime.graphics.Image] WARNING: Image.fromBytes not supported on this target
/home/node/app/openfl-samples-es6/demos/NyanCat/node_modules/openfl/bin/tools.js:13480
var values1 = new haxe_io_Bytes(new ArrayBuffer((image.width + 1) * image.height));
^
TypeError: Cannot read properties of null (reading 'width')
at format_swf_exporters_SWFLiteExporter.addBitmap (/home/node/app/openfl-samples-es6/demos/NyanCat/node_modules/openfl/bin/tools.js:13480:60)
at format_swf_exporters_SWFLiteExporter.processTag (/home/node/app/openfl-samples-es6/demos/NyanCat/node_modules/openfl/bin/tools.js:14111:17)
at format_swf_exporters_SWFLiteExporter.addShape (/home/node/app/openfl-samples-es6/demos/NyanCat/node_modules/openfl/bin/tools.js:13557:10)
at format_swf_exporters_SWFLiteExporter.processTag (/home/node/app/openfl-samples-es6/demos/NyanCat/node_modules/openfl/bin/tools.js:14119:17)
at format_swf_exporters_SWFLiteExporter.addSprite (/home/node/app/openfl-samples-es6/demos/NyanCat/node_modules/openfl/bin/tools.js:13634:11)
at format_swf_exporters_SWFLiteExporter.processTag (/home/node/app/openfl-samples-es6/demos/NyanCat/node_modules/openfl/bin/tools.js:14109:17)
at format_swf_exporters_SWFLiteExporter.processSymbol (/home/node/app/openfl-samples-es6/demos/NyanCat/node_modules/openfl/bin/tools.js:13870:20)
at new format_swf_exporters_SWFLiteExporter (/home/node/app/openfl-samples-es6/demos/NyanCat/node_modules/openfl/bin/tools.js:13304:10)
at Tools.processFile (/home/node/app/openfl-samples-es6/demos/NyanCat/node_modules/openfl/bin/tools.js:1287:17)
at Tools.main (/home/node/app/openfl-samples-es6/demos/NyanCat/node_modules/openfl/bin/tools.js:1265:10)
When I open page it fails with error GET http://localhost:8080/dist/1d5c97fb8576e6825f67c0dc9f77f9dd.bundle/library.json 404 (Not Found)
I guess due to bundles not being generated due to error.
What could be the problem with my SWF files? Is there a way to fix it?
My SWF file: library.swf - Google Drive
I run everything inside docker.
Dockerfile
:
FROM node:20.5
RUN apt-get -y update && \
apt-get -y install \
sudo
RUN adduser node sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER node
WORKDIR /home/node/app
docker-compose.yaml
:
version: "3.9"
services:
try_openfl_npm:
build:
context: .
tty: true
volumes:
- ./:/home/node/app
ports:
- 8080:8080
restart: always
command: tail -F /dev/null
So the command is:
docker compose up -d --build --force-recreate --renew-anon-volumes --remove-orphans
docker compose exec try_openfl_npm bash
Thanks in advance!