/** * FlasherFunction.java * * A Playable that can be used to flash a message * * @author Phil Burk and Nick Didkovsky */ /* * (C) 1997 Phil Burk and Nick Didkovsky, All Rights Reserved * JMSL is based upon HMSL (C) Phil Burk, Larry Polansky and David Rosenboom. */ package jmslexamples; import java.awt.*; import com.softsynth.jmsl.*; public class FlasherFunction implements Playable { public double play(double playTime, Composable thing) { TextJob J = (TextJob) thing; J.reverseState(); if (J.getState()) J.setColor(Color.red); else J.setColor(Color.blue); J.printMsg(); return playTime; } }