DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Cover image for Flipped out over Flipper?!
Dr Abstract
Dr Abstract

Posted on

Flipped out over Flipper?!

A Flipper is a handy component! You can try it out here: https://codepen.io/zimjs/pen/LYRxprK

Basically, it has a back and a front that can be any display object. You press it and it flips. The flip() method allows you to programmatically flip it or pass in true or false to flip on or off. A flipped property tells you if it is flipped. There is a "flip" event for when it starts to flip and a "flipped" event for when it is done flipping.

STYLE = {borderColor:dark, borderWidth:2};
var front = frame.makeIcon().sca(2.5);
var back = new Page(front.width, front.height, blue, green, 1);
new Label("ZIM Flipper").center(back);
var card = new Flipper(front, back).center();
Enter fullscreen mode Exit fullscreen mode

Here is a classic memory game done with a Flipper - it is inside the e-learning quiz app at https://zimjs.com/elearning/quiz.html

Alt Text


If you have not checked out the Canvas recently - you simply must! Here is the ZIMΒ DevΒ Site and some In-depthΒ Guides by DrΒ Abstract including Your Guide to Coding Creativity on the Canvas.

Top comments (0)

🌚 Browsing with dark mode makes you a better developer by a factor of exactly 40.

It's a scientific fact.