|This page has links to sites outside of the Scratch website and Wikipedia. Always remember to stay safe when using the Internet, since we can't guarantee the safety of other sites.|
Often more advanced users add a link in their project description leading directly to their project in phosphorus. This can be seen especially often in pen projects.
The Sulfurous Player is a modification of the Phosphorus Player, and was designed to perform better and deliver more features. Some long standing bugs of the Phosphorus Player were also fixed.
Users are known to use Phosphorus to view other users' unshared projects and give their feedback on the projects.
To view a project in phosphorus, simply paste the URL of your project on the Scratch webpage in the input box. Your project should be loaded and will run automatically. Pasting the ID of your project will also suffice. Dragging a local .sb2 file into the page is also supported, allowing users to test their projects locally before potentially uploading or sharing them on the Scratch website.
If you want to include a link to your project in the player, simply include the phosphorus URL appended with a hashtag and your project ID in your project notes, or wherever you want it. Such a URL could look like this: https://phosphorus.github.io/#000000000
phosphorus was created by Nathan Dinsmore in collaboration with Truman Kilen. The phosphorus page credits state:
|“||phosphorus was created by Nathan. Its CPS-style compilation and overall design was inspired by Rhys's sb2.js. It would have more bugs if not for Truman and Tim. It uses the JSZip library, created by Stuart Knightley, David Duponchel, Franz Buchinger, and António Afonso, to read .sb2 files and compressed projects, and the canvg library, created by Gabe Lerner, to render SVGs in <canvas> elements.||”|
– phosphorus Credits
Differences to the default flash player
- There's an option to pause all of the scripts and then rerun it.
- Projects usually run much faster in phosphorus, especially Pen projects or those using heavy processing.
- Projects will run on any device using a browser with HTML5 canvas support; this includes most mobile devices which don't have flash support. However, keyboard commands cannot be used on most mobile devices.
- Unshared projects can be viewed if the project code is known to the user, even if it is in the user's trash. This issue (or feature) is known to the Scratch Team, but it is not likely to be fixed soon.
- phosphorus does not have the Flash Player's clone limit of 301 clones, thus it is possible to have infinite clones and cause some more lag.
- Some small bugs where phosphorus behaves differently to the Scratch Flash Player.
Since phosphorus and the Flash Player differ slightly, a project can detect which player is running it.
The Flash Player supports boolean values and stores them as their own type. The number 1 is not equal to the string true, but it is equal to the boolean true. In phosphorus, 1 and the boolean true are not equal.
when gf clicked if < = < = >> then say [You are in the Flash Player] else say [You are in phosphorus] end
This leads to a quirk in Scratch that shows that the equals operator isn't always transitive
<< = > = [true]> // true << = > = > // true <[true] = > // false
thus, in the Flash Player, the equality operator is not always transitive
Another difference between Flash and phosphorus is that phosphorus will set it's costume number to (1) if an invalid costume name or number is entered in the "switch to costume" block, whereas Flash does not do anything. The following script can be used to detect phosphorus using this technique:
when flag clicked switch costume to [costume 2 v] switch costume to (join [hello][world]) if <(costume #) = > then say [phosphorus] else say [Flash] end
Since only phosphorus will switch the costume to (1), the script can detect what player you are using.