Embed a coin flip
Set up to six coins, then paste the frame on a website or in PowerPoint.
How to embed a coin flip
This page builds a coin flip frame you can paste. Set the coins here, then copy a script for a website or a link for PowerPoint.
The frame is only the coins. It does not include this page, the site header, or the footer.
Build the table
- Add up to six coins. Mix gold, silver, and copper, or switch the faces to words such as Yes and No.
- Remove a coin, or use Reset to default for one gold coin with Heads and Tails.
Frame background
Choose Transparent, Brand, or a single color. That choice is stored in the script and in the PowerPoint link, so the pasted frame uses the same background.
What the frame shows
Turn Flip button, Result, or Settings off when you do not want them in the frame. The preview above updates as you switch them. Clicking a coin still flips.
On a website
- Set the coins, the background, and which parts to show.
- Under Embed code, choose Script or iframe, then copy.
- Paste it where your page accepts HTML.
- Width and height start at 640 by 560 pixels. Change them before you copy. The frame shrinks to the box around it.
In PowerPoint
- Copy Code for PowerPoint.
- Choose Insert, then Get Add-ins, and add Web Viewer.
- Paste the link and choose Preview. The coins fill that viewer. The script width and height do not apply. The background and the hidden parts are already in the link.
After you paste
If you change the coins, the background, or what the frame shows, copy again and replace the old snippet. The pasted link keeps the setup from the moment you copied it.
For a developer
The Script block includes a function named winLog. It runs on your page after each flip. Edit that function to use the result. An iframe tag does not call it.
More than six coins, flip history, and session stats stay on the online coin flip.