## Flash-O-Rama!

#### Electronic Flash Cards

### © 2003, Tomas J. Nally

#### Steelweaver52@aol.com

| What Is It? | Features | Browsing | Creating |

| Special Tech | Enhancements | More |

### What is Flash-O-Rama?

Flash-O-Rama is a program written in [Liberty BASIC] which allows you to produce and browse electronic flash cards.

Flash cards are index cards used as memory aids. Typically, a flash card will have a question on the front, and an answer on the back. A student preparing for a history test, for example, will often make a stack of flash cards to help her remember facts in preparation for the test. To study for the test, the student will read the question on the front of the card, then attempt to recite the answer contained on the back of the card. If the student cannot remember the answer, she flips to the back of the card and tries again to commit the answer to memory. The student may go through each card in her stack several times until she feels she has command of the topic.

Though simple in concept, flash cards have demonstrated their value over and over again.

With Flash-O-Rama, flash cards are created and browsed on your computer. For those who may need to put their flash card content on paper, Flash-O-Rama allows you to print our your flash cards as notes. The program is very easy to use. Give it a try!

| Top |

### Flash-O-Rama Features

- Flash-O-Rama comes with two pre-made flash card stacks. One stack is a quiz on Liberty BASIC programming. The second one contains trivia on the history of computing.
- Creating cards and browsing cards are done simultaneously. There are no separate modes for creating and browsing.
- The flash card author can delete cards or insert new cards anywhere in the flash card stack.
- Card content can be printed out on paper in the form of notes. You can print out the entire stack of cards, or just a range of cards.
- Bitmap files can be linked to cards so that questions or answers can refer to a picture.
- Flash-O-Rama comes with on-board help in the form of a *.chm file (from which most of this article is taken).
- Flash-O-Rama is open source. It can be distributed and modified freely as long as the original attributions remain in the source code of the program.

| Top |

### Browsing a Flash Card Stack

The Flash-O-Rama Window

Flash-O-Rama recommends that you browse a flash card stack before you make your first stack of flash cards. Open LBQuiz10.flc, a pre-built flash card stack that comes with Flash-O-Rama.

When you open LBQuiz10.flc, the first thing you may notice is that the stack's "Stack Name" and filename appear under the menu bar in the application. The stack name, also called the "Friendly Name", is just an alternate name by which you can refer to the stack. The friendly name is stored in the stack when you save the stack.

In the upper right-hand corner of the application, you see the number of the card currently displayed, as well as the total number of cards in this stack.

In the middle of the window are two large TextEditor controls. The left-hand TextEditor will hold the question, while the right-hand textEditor will hold the answer. Let's refer to these as the "Question pane" and the "Answer pane" respectively. As you navigate to a new card, the contents of the Answer pane will be hidden until you press the "Show Answer" button.

Navigate to a new card by pressing the "Next" button. When you do that, you will see the next question appear in the Question pane, while the Answer pane goes to blank.

Press the "Next" button several times to cycle forward through several cards. Press "Show Answer" as you wish. Now press the "Prev" button several times to cycle backwards through the stack.

When you press "Next" after having reached the last card in the stack, you will wrap around to the first card in the stack. Likewise, if you press "Prev" while at the first card, you will navigate to the last card in the stack.

Now, press the "Random" button. This control will take you to a random card in the stack. Press "Random" several times in succession to watch unordered cards appear at the top of the stack.

Next, enter a number in the TextBox to the left of the "Go To Card" button. Then, press the "Go To Card" button. Flash-O-Rama will take you to the card whose number was entered in the TextBox.

| Top |

### Creating a New Flash Card Stack and New Flash Cards

To create a new flash card stack, from the menu select File | New flash card stack. Before Flash-O-Rama creates the new stack, it will ask you for confirmation. This is because creating a new stack will erase the current stack from memory. If you want to save the current stack, you may stop the process of creating a new stack by selecting "No" in the confirmation box. Otherwise, select "Yes" to create a new flash card stack.

A newly created flash card stack will have five new cards. The new cards will not be entirely blank. On each card, the Question part of the card will say, "Type question #n here", where n is the number of the current card.

The Answer part of the new card is not shown. Press the "Show Answer" button to reveal the preliminary answer, "Type the answer to question #n here", where n is the number of the current card.

The mere act of typing in a new question in the Question pane does not yet make that question permanent or persistent. For instance, if you type in a new question, then navigate forward and back again, you will notice that the question that you typed will be lost.

To avoid this, the question must be "Set", by pressing the "S" button located at the lower left-hand corner of the Question pane. Setting the question will copy the contents of the Question pane into an array in memory, allowing the question to reappear the next time the user navigates to this card.

The same process applies to a new answer. A newly-typed in answer is not yet "Set" until you press the "S" button located near the lower right-hand corner of the Answer pane.

Users, be careful not to lose carefully typed-in questions and answers by forgetting to "Set" them.

| Top |

### Flash-O-Rama's Special Technology

Friends, it ain't got none. Special technology, that is.

Nothing really fancy or interesting takes place inside the code of Flash-O-Rama. And that speaks well for our favorite programming language, [Liberty BASIC], doesn't it? We can produce interesting output with code that is little more than plain vanilla.

This last claim re-states something that I've always thought. As we attempt to generate applications interesting enough for other people, we are limited more by our own ideas and by our own creativity than we are by the feature set of Liberty BASIC. Hat tip to Gundel the Founder.

But let me briefly identify how three ordinary operations of Flash-O-Rama are accomplished by use of ordinary Liberty BASIC commands.

Storing the Question and the Answer. A card's question and answer text are stored in arrays for retrieval later as the user browses a stack of cards. This text is captured by sending a !contents? command to the text box:

        print #main.textedQuestion, "!contents? Quest$"
        Question$(CurrentCard) = Quest$

Moving forward (or backward) through a stack of cards. Flash-O-Rama tracks the current card by use of a variable named, uh, CurrentCard. When the user presses the Next button, the CurrentCard variable is simply incremented by one, producing a "new" CurrentCard. Then the contents of the new CurrentCard are printed to the Question and Answer panes:

        NextCard = CurrentCard + 1
        If (NextCard = (TotalCards + 1) ) then NextCard = 1
        Print #main.textedQuestion, "!cls"
        Print #main.textedQuestion, Question$(NextCard)
        print #main.textedQuestion, "!origin 1 1"
        Print #main.textedAnswer, "!cls"
        CurrentCard = NextCard

Showing the Answer. By default, the Answer pane is shown as blank when the user navigates to a different card. Technically, this doesn't mean that the answer is being "hidden" underneath something. Rather, the Answer simply hasn't been printed to the Answer pane yet. (The Question pane and Answer pane, by the way, are LB TextEditor controls.) So, showing the answer simply involves printing `Answer$(CurrentCard)` to the appropriate TextEditor control.

        print #main.textedAnswer, "!cls"
        print #main.textedAnswer, Answer$(CurrentCard)
        print #main.textedAnswer, "!origin 1 1"

Indeed, Flash-O-Rama is little more than the efficient organization of these three operations.

| Top |

### Possible Enhancements to Flash-O-Rama

Flash-O-Rama is open source. User-programmers are free to modify it as long as the attributions remain in the source code.

Anyone inclined to tinker with Flash-O-Rama might consider the following enhancements:

- Making the question pane and the answer pane larger.
- Adding a "search" button to the program.
- The ability to use jpegs (instead of bitmaps) for the pictures linked to cards.
- The ability to provide "hints".
- The ability to play DVDs.

Well, okay, the last feature may be a little "over the top".

| Top |

### Read More about Flash-O-Rama

To read more about the features and operation of Flash-O-Rama, download and unzip the Flash-O-Rama zip archive, and double-click on the file, FlashHelp.chm. This is Flash-O-Rama's on-board HTML help system, which was written using [HelpBlocks] and [MS HTML Help Workshop]. In FlashHelp.chm, you can read the following topics which aren't discussed here:

- Inserting and Deleting Cards
- Printing Flash Cards
- Flash Cards and Bitmaps
- Known Issues and Limitations

| Top |