Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Compiling Scratch 2 for Flash Player 9 – PS3 & PPC Mac
- Jonathan50
-
1000+ posts
Compiling Scratch 2 for Flash Player 9 – PS3 & PPC Mac
I got a PlayStation 3 some months back (I've never owned a console before). I was wondering what fun things I could do on it without jailbreaking, which made me think of compiling for Flash 9. Turns out you only needed the latest Apache Flex and the appropriate SWCs. So…how about making Scratch 2 run on new platforms? It requires at least Flash Player 10.2, but after a tiny bit of commenting-out it compiled for Flash 10.0. (I picked a somewhat old version, v441, at random just because I was lazy and wanted Ant instead of Gradle…though apparently the newest on GitHub is only v448.)
Much more commenting out and changing Vector -> Array, and it compiled for Flash 9, but the SWF didn't work…some mysterious error about illegal override of z. After much fiddling to no avail, it turned out just using framework.swc from the Flex 2.0.1 SDK (download the SDK from Adobe here! you need framework.swc and playerglobal.swc) instead of the libraries that came with Apache Flex produced a working SWF!
Links:
Source
Direct download for Flash 9 SWF
Direct download for Flash 10 SWF
The Flash 10.0 version needed very little changes and should be 100% functional compared to 10.2. By contrast I broke, for now, at least these things with Flash 9:
But it still works fine, and sure enough here's Scratch on the PlayStation 3 for probably the first time:

Sorry, I don't have an HDMI capture thing.
Also, I guess Flash on the PS3 is a native BSD version of Flash, maybe the only one. Though I'm sure it wouldn't be practical to get it to work on a different PPC system, even if it doesn't use the coprocessor thingy.
You can use it fine with the controller, with X instead of left-click. Mouse and keyboard do make it easier to use (although it's still a bit difficult since the mouse sensitivity is rather high). You need to double-X/double-click a field to type (even if you have a physical keyboard, you still need to do that and bring up the on-screen keyboard).
It will also work on Windows 98
although Scratch 2 on Win98 was almost certainly already possible with Flash on KernelEx. The Flash 10 version will work on PowerPC Macs (PPC is supported up to 10.1; Scratch requires 10.2). I happen to have Flash 9 on my eMac:

Another way to run Scratch 2 on PPC would be to emulate Windows XP or x86 Linux
Also, I would love to know if there are other interesting platforms that can run Flash 9-10.1 but not 10.2.
Much more commenting out and changing Vector -> Array, and it compiled for Flash 9, but the SWF didn't work…some mysterious error about illegal override of z. After much fiddling to no avail, it turned out just using framework.swc from the Flex 2.0.1 SDK (download the SDK from Adobe here! you need framework.swc and playerglobal.swc) instead of the libraries that came with Apache Flex produced a working SWF!
Links:
Source
Direct download for Flash 9 SWF
Direct download for Flash 10 SWF
The Flash 10.0 version needed very little changes and should be 100% functional compared to 10.2. By contrast I broke, for now, at least these things with Flash 9:
- Sound stuff
- Costume/PNG/vector stuff
- ZIP stuff (if not for JSON sb2s would work as long as they're uncompressed ZIPs…)
- Local files (no direct file I/O in Flash 9)
- JSON
- Got rid of video sensing
But it still works fine, and sure enough here's Scratch on the PlayStation 3 for probably the first time:

Sorry, I don't have an HDMI capture thing.
Also, I guess Flash on the PS3 is a native BSD version of Flash, maybe the only one. Though I'm sure it wouldn't be practical to get it to work on a different PPC system, even if it doesn't use the coprocessor thingy.
You can use it fine with the controller, with X instead of left-click. Mouse and keyboard do make it easier to use (although it's still a bit difficult since the mouse sensitivity is rather high). You need to double-X/double-click a field to type (even if you have a physical keyboard, you still need to do that and bring up the on-screen keyboard).
It will also work on Windows 98


Another way to run Scratch 2 on PPC would be to emulate Windows XP or x86 Linux
Also, I would love to know if there are other interesting platforms that can run Flash 9-10.1 but not 10.2.
Last edited by Jonathan50 (April 14, 2024 08:04:40)
- Mr_rudy
-
100+ posts
Compiling Scratch 2 for Flash Player 9 – PS3 & PPC Mac
i wonder if the Nintendo Wii would be possible
- MagicCrayon9342
-
1000+ posts
Compiling Scratch 2 for Flash Player 9 – PS3 & PPC Mac
I think the Wii browser is Opera 9 but modified. I guessed 9 since it released in 2007 like the Wii browser did. I haven't been able to figure out what flash version it supports but most likely 9/10 like what Scratch 2 is being ported to here. i wonder if the Nintendo Wii would be possible
Should be possible.
Last edited by MagicCrayon9342 (April 13, 2024 02:37:33)
- Jonathan50
-
1000+ posts
Compiling Scratch 2 for Flash Player 9 – PS3 & PPC Mac
Alright, links now in OP.
It would've been great if blooddy_crypto could be made to work on Flash 9 (Scratch depends on it for PNG, JSON, MD5, etc.) but unfortunately the really old version used doesn't seem to have source code, and a somewhat newer version won't compile because of >100 references to something in avm.intrinsics (might be in the AIR SDK or something, or it might be something really trivial). At least importing Scratch 1.4 projects, sans proper costumes, works. (Also sorry for the very messy commenting-out)
Flashvar project can be used for loading a project file. Happily the bitmap editor seems to work.
also how the heck were there like 688,000 Scratch projects made since yesterday
then start a web server (the easiest way to do this is to run python3 -m http.server in a terminal) in that folder, and go to your computer's IP address followed by “:8000” or whatever on the Wii.
Edit: Or maybe just going to this URL on your Wii would be easier. Then again, that method might not work due to needing modern HTTPS.
It would've been great if blooddy_crypto could be made to work on Flash 9 (Scratch depends on it for PNG, JSON, MD5, etc.) but unfortunately the really old version used doesn't seem to have source code, and a somewhat newer version won't compile because of >100 references to something in avm.intrinsics (might be in the AIR SDK or something, or it might be something really trivial). At least importing Scratch 1.4 projects, sans proper costumes, works. (Also sorry for the very messy commenting-out)
Flashvar project can be used for loading a project file. Happily the bitmap editor seems to work.
also how the heck were there like 688,000 Scratch projects made since yesterday
According to i wonder if the Nintendo Wii would be possible Wikipedia it has Flash 8 and “limited support” for Flash 9. So I don't know. If you have a Wii you can try, just download the SWF to your computer, make an HTML file something like
<embed type="application/x-shockwave-flash" src="s2-flash9.swf" width="800" height="600">
</embed>
Edit: Or maybe just going to this URL on your Wii would be easier. Then again, that method might not work due to needing modern HTTPS.
Last edited by Jonathan50 (April 14, 2024 10:06:14)
- Jonathan50
-
1000+ posts
Compiling Scratch 2 for Flash Player 9 – PS3 & PPC Mac
Canthiar's raytracer works (it's sloooooow)


- _nix
-
1000+ posts
Compiling Scratch 2 for Flash Player 9 – PS3 & PPC Mac
Oh my gosh, this is actually incredible. Congrats! I'm stunned lol
I guess since PPC Mac is supported by Flash up to 10.1, then if you had a Flash 10 player, you could get the far-less-modified version of Scratch running?
It's really fun to see Flash explored as a reasonably portable runtime for, well, Scratch. Kind of inspiring? We're sure we've seen Scratch 1.4 on a whole lot of systems, so seeing what systems can handle Flash (and only older versions at that) and thus Scratch (with a lot of code-commenting lol)—that's fun. Awesome work
I guess since PPC Mac is supported by Flash up to 10.1, then if you had a Flash 10 player, you could get the far-less-modified version of Scratch running?
It's really fun to see Flash explored as a reasonably portable runtime for, well, Scratch. Kind of inspiring? We're sure we've seen Scratch 1.4 on a whole lot of systems, so seeing what systems can handle Flash (and only older versions at that) and thus Scratch (with a lot of code-commenting lol)—that's fun. Awesome work

- dynamicsofscratch
-
1000+ posts
Compiling Scratch 2 for Flash Player 9 – PS3 & PPC Mac
You should try compiling SB2 for FP8 or something
- Mr_rudy
-
100+ posts
Compiling Scratch 2 for Flash Player 9 – PS3 & PPC Mac
i tried it, the internet channel kept crashing everytime i opened my ip address Alright, links now in OP.
It would've been great if blooddy_crypto could be made to work on Flash 9 (Scratch depends on it for PNG, JSON, MD5, etc.) but unfortunately the really old version used doesn't seem to have source code, and a somewhat newer version won't compile because of >100 references to something in avm.intrinsics (might be in the AIR SDK or something, or it might be something really trivial). At least importing Scratch 1.4 projects, sans proper costumes, works. (Also sorry for the very messy commenting-out)
Flashvar project can be used for loading a project file. Happily the bitmap editor seems to work.
also how the heck were there like 688,000 Scratch projects made since yesterdayAccording to i wonder if the Nintendo Wii would be possible Wikipedia it has Flash 8 and “limited support” for Flash 9. So I don't know. If you have a Wii you can try, just download the SWF to your computer, make an HTML file something likethen start a web server (the easiest way to do this is to run python3 -m http.server in a terminal) in that folder, and go to your computer's IP address followed by “:8000” or whatever on the Wii.<embed type="application/x-shockwave-flash" src="s2-flash9.swf" width="800" height="600">
</embed>
Edit: Or maybe just going to this URL on your Wii would be easier. Then again, that method might not work due to needing modern HTTPS.
Last edited by Mr_rudy (April 14, 2024 18:13:35)
- Jonathan50
-
1000+ posts
Compiling Scratch 2 for Flash Player 9 – PS3 & PPC Mac
Thanks ATer Oh my gosh, this is actually incredible. Congrats! I'm stunned lol

I guess since PPC Mac is supported by Flash up to 10.1, then if you had a Flash 10 player, you could get the far-less-modified version of Scratch running?Yes, that's what I meant. Just not what happens to be installed on my Mac :package:
What's FP8? You should try compiling SB2 for FP8 or something
OK, if it actually loaded the page – that would be the case if you called it index.html, or you went to /whatever.html or clicked the link – then the problem would be with Flash. Otherwise, that's pretty strange. i tried it, the internet channel kept crashing everytime i opened my ip address
- Jonathan50
-
1000+ posts
Compiling Scratch 2 for Flash Player 9 – PS3 & PPC Mac
Turns out I uploaded a sorta broken SWF, sorry. Fixed, same link as before.
Also, the GitHub pages link works on PS3 now. I guess Sony managed to keep HTTPS sorta up-to-date-ish.
Also, the GitHub pages link works on PS3 now. I guess Sony managed to keep HTTPS sorta up-to-date-ish.
- Redstone1080
-
1000+ posts
Compiling Scratch 2 for Flash Player 9 – PS3 & PPC Mac
Reminds me of how MattKC ported .NET to Windows 95 and enabled thousands of apps to run on there. This seems really cool! I wonder what other stuff we can get running on PS3 now that we have this. Old flash games maybe? Then again, you need access to the source code, which might be a problem.
Last edited by Redstone1080 (April 15, 2024 00:05:05)
- _nix
-
1000+ posts
Compiling Scratch 2 for Flash Player 9 – PS3 & PPC Mac
Thanks ATer Oh my gosh, this is actually incredible. Congrats! I'm stunned lol



I know JPEXS is pretty good for extracting Reminds me of how MattKC ported .NET to Windows 95 and enabled thousands of apps to run on there. This seems really cool! I wonder what other stuff we can get running on PS3 now that we have this. Old flash games maybe? Then again, you need access to the source code, which might be a problem.representations of the “source” code (really just ActionScript-ified bytecode), and for extracting assets too… I don't know if that's enough to recompile from scratch (ha) using Flex, but if it is, it would be really cool to build up sort of a knowledge base of porting Flash 10 stuff to Flash 9 (or even earlier).
I kind of wonder if there were any threads about that concept from way back in the day?? But there probably weren't nearly as good tools for extracting stuff out of a flash at that time, so we're better equipped now than back then!
- Jonathan50
-
1000+ posts
Compiling Scratch 2 for Flash Player 9 – PS3 & PPC Mac
Lol, I had no clue who MattKC was, till yesterday I saw that exact video Reminds me of how MattKC ported .NET to Windows 95 and enabled thousands of apps to run on there. This seems really cool! I wonder what other stuff we can get running on PS3 now that we have this. Old flash games maybe? Then again, you need access to the source code, which might be a problem.

- Jonathan50
-
1000+ posts
Compiling Scratch 2 for Flash Player 9 – PS3 & PPC Mac
this may be my most intelligent post of all timeWhat's FP8? You should try compiling SB2 for FP8 or something
Anyway, apparently I don't know what AS2 is like (very different) and Scratch is AS3 all along. So long story short no Scratch on Flash Player 8 without pretty much rewriting everything from scratch

also the best part of that .NET video is Greedo saying his new catchphrase (underrated)
- Heatherhat123
-
2 posts
Compiling Scratch 2 for Flash Player 9 – PS3 & PPC Mac
Wikipedia it has Flash 8 and “limited support” for Flash 9.Well, the Kirby TV Channel is almost entirely coded in Flash 9 Actionscript 3. However, when I tried injecting it, it threw an error about not being able to connect to the server, which is odd since it worked when I tried with a Flash 8 game (Super Mario 63). According to
- Jonathan50
-
1000+ posts
Compiling Scratch 2 for Flash Player 9 – PS3 & PPC Mac
I'm wondering what you were injecting into what? Because if you mean Well, the Kirby TV Channel is almost entirely coded in Flash 9 Actionscript 3. However, when I tried injecting it, it threw an error about not being able to connect to the server, which is odd since it worked when I tried with a Flash 8 game (Super Mario 63).Scratch threw an error about not being able to connect to the server then I'm stumped.
- Heatherhat123
-
2 posts
Compiling Scratch 2 for Flash Player 9 – PS3 & PPC Mac
I tried injecting Scratch 2 into the Kirby TV Channel, but the channel complained about not being able to connect to the server and trying with a WiiLink patched version threw emulation errors, even with Super Mario 63.I'm wondering what you were injecting into what? Because if you mean Well, the Kirby TV Channel is almost entirely coded in Flash 9 Actionscript 3. However, when I tried injecting it, it threw an error about not being able to connect to the server, which is odd since it worked when I tried with a Flash 8 game (Super Mario 63).Scratch threw an error about not being able to connect to the server then I'm stumped.
- Discussion Forums
- » Advanced Topics
-
» Compiling Scratch 2 for Flash Player 9 – PS3 & PPC Mac