Tag: actionscript 3

AS3: TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::SimpleButton

If you get an error like this in an actionscript 3 Flash file: TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::SimpleButton@61422481 to [symbolname]. at flash.display::Sprite/constructChildren() at flash.display::Sprite() at flash.display::MovieClip() at classname()[/path_to/as/classname.as:34] Check the symbol

Continue reading

Virtual Cardiac Arrest Cart Treasure Hunt game: Adapting the game to your needs

A while back I wrote [LINK] about a treasure-hunt-style game we developed in-house for training purposes. The purpose of the game is to help healthcare professionals memorize the location of items stored within a cardiac arrest cart, to make things go smoothly when every second counts.

A cardiac arrest cart (or “crash cart”) is a red metal tool cabinet, filled with items like airway tubes, IV needles, masks and other supplies used in advanced cardiac life support. The goal of this game is to learn where all the items are by retrieving the requested item from the cart by opening drawers, then dragging the item to a target for checking.



VIEW DEMO of the Virtual Cardiac Arrest Cart

DOWNLOAD SOURCE files for the cart game.

Game play

  1. When the game loads, a cardiac arrest cart stands off to the left. A specific item is chosen at random and requested in a message toward the bottom of the screen.
Continue reading

useButtonMode = true not working in AS3

In Actionscript 3, you may find yourself wondering why when you use “useHandCursor” on a MovieClip, the cursor remains an arrow on mouse_down.

In AS3, useHandCursor is a property of the SimpleButton class. if an object has “buttonMode” set to true, by default “useHandCursor” will also be true. If is is not set to buttonMode, setting “useHandCursor” to true will do nothing.

On objects that are set to buttonMode, setting “useHandCursor to false will prevent the cursor from changing to a hand on MOUSE_DOWN.

Continue reading