|This article has links to websites or programs not trusted by Scratch or hosted by Wikipedia. Remember to stay safe while using the internet, as we cannot guarantee the safety of other websites.|
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
phosphorus is an open source program, and the code can be found on github. The phosphorus page also includes options for packaging and embedding projects on third party websites. The user can customize the appearance of the embedded project to some extent, such enabling or disabling controls.
Differences from the Scratch 2.0 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.
|The subject of this article or section has changed dramatically and requires updating. Please keep in mind that some of the information or images may not be accurate or relevant to the current version of Scratch, the Scratch website, or the article subject. (August 2020)|
Since Phosphorus and the Flash Player differ slightly, a project can detect which player is running it.
The Flash Player treats boolean values as a subcategory of integers; that is, the boolean
true value is equivalent to 1 in the Flash Player, and
false is equivalent to 0 (though note that the strings "1" and "true" are not equal). Conversely, Phosphorus has no such equivalence: 1 and
true (the boolean) are treated as two different objects.
The script below will cause its sprite to say which player is being run.
when gf clicked if < = < = >> then say [You are in the Flash Player] else say [You are in phosphorus] end
Another difference between Flash and Phosphorus is that Phosphorus will set its 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 costume 1, the script can detect what player you are using.