In this course, I will explain how a Lucky Draw program was created using Flash. This program can be used in events to conduct lucky draws and display the names of the winners on the screen. I have used this program successfully in my organisation on two occasions and have received feedback that this was a useful and nifty program for conducting Lucky Draws instead or picking pieces of paper from a bowl which is the usual practice.
Some features of the program are:
This program is easily customisable to suit your requirements. You will to know some basic ActionScript and have the Adobe Flash software to be able to modify this program.
Download the resources required for this course.
The background image of the Flash Lucky Draw was created using Photoshop. It was placed on a layer in Flash entitled "bg". You can customise this image as you wish.
We create dynamic text boxes to display the names of the winners of the Lucky Draw. Make sure that you give an instance name to each of these text boxes.
Similarly, three buttons are created on the Stage with instance names given to each of them.
Also, note that the name list for this Lucky Draw program is extracted from an external text file.
The name list for this Lucky Draw program is extracted from an external text file and stored in an Array in Flash.
The array is then randomised and stored into another array entitled randomarray.
Sound files in the form of MP3 or WAV files can be imported into the Flash library.
Be sure that you adjust the properties of the sound files so that ActionScript will be able to access them.
Visibility of the buttons can be modified using the _visible property of each button.
Here we demonstrate how the visibility of the buttons can be controlled as required.
We look at how to random the array using ActionScript code. This is done by randomly splicing elements from one array and storing them into another array.
Refer to this website for more techniques on how to randomly shuffle an array using ActionScript.
We look at the concept of setting and clearing intervals in Flash. Note that the timings are in milliseconds.
We look at the various publishing formats available in Flash. The Win and Mac projector formats are especially useful in the context of this Lucky Draw program.
Here, we conclude this course. Also I demonstrate a customised version of the program where 3 or 4 names can be done with each click on the button.
I am a classically trained pianist who loves to play the old hymns. Hope you like my playing and explanations. I attend True Life Bible Presbyterian Church and also the Far Eastern Bible College in Singapore. I work as an IT Manager and enjoy creating media related to e-learning. I hope that you like my courses on Udemy. Thanks.