Things You'll Need:
- Adobe Flash 8 or higher
-
Step 1
Open Flash and create a new flash document
-
Step 2
We do not need our application to be that big so we are going to reduce the window size by selecting Modify>Document. A new window should have popped up.
-
Step 3
in that new window change the dimension size to the following
300 px (width) by 150 px (height) -
Step 4
Once you have done this and with the window still open, go ahead and change the background color by clicking on the square. Pick any color you want. I chose blue.
-
Step 5
At this point we are going to create the simple ball graphic we need.
First we will make the ball by selecting Insert>New Symbol
Rename the symbol "ball" and make sure to select next to Type: Movie Clip. And then click ok. -
Step 6
Make sure your tool pallet is up. If you do not see it select Window>Tools
select the oval shape from the tools pallet or by pressing its shortcut key letter o. -
Step 7
On the tool pallet ,under color, next to bucket fill icon, change the fill color to one of the gradients in the shape of a ball. I chose the grey one since it resembles the ones from the lottery broadcast on TV
-
Step 8
In the middle of the stage you will notice a crosshair. Put your mouse, which should also look like a crosshair in the middle of the crosshair on stage.
-
Step 9
Hold down the alt button and drag your mouse out and let go when the desired size image is made. By holding down alt it enabled you to make a perfectly round ball.
-
Step 10
Now the default gradient we used is not quite what we are looking for. Using your bucket tool by using shortcut key K click once on the top right part of the ball image. It should now look a little bit lighter
-
Step 11
We are now done with our image. To navigate back to our animation click on scene 1 next to timeline.
-
Step 12
Double click layer 1 and rename it ball_1. From your library drag your ball image to the stage. Place it on the stage remembering you will need room to eventually have 3 of these pick 3 balls on stage horizontally.
-
Step 13
Once on the stage make sure the ball is selected. On your properties bar select the filters tab.
-
Step 14
With the filters tab selected click on the plus sign (+). Add a drop shadow and a blur filter to it.
-
Step 15
Select blur from the list and put in the following information
Blur X: 6 and Blur Y: 6 -
Step 16
In your timeline move to frame 7. Insert a keyframe by selecting Insert>Timeline>Keyframe
-
Step 17
Move to frame 1 in your timeline. Click on the ball and move it up so that it will look like the ball is dropping when we animate it.I placed it at the following location X: 24.5 Y: .5
-
Step 18
Move to Frame 8 and insert a keyframe. Move the ball up a little bit.
X: 24.5 Y: 30.5 -
Step 19
With the ball still selected click the filters tab on properties bar and change the blur to 11 for X and Y values
-
Step 20
Move in your timeline to frame 9 and insert a keyframe. Move the ball back down a tad to X: 24.5 Y: 53.5
-
Step 21
Change the blur filter to 4 for the X and Y values
-
Step 22
In your timeline on frame 10 insert a keyframe. Its location should be
X: 24.5 and Y: 43.5 -
Step 23
Select ball layer. Keyframes in timeline on this layer should be highlighted black. On your properties bar next to tween select motion from the dropdown.
-
Step 24
Create a new layer and rename it ball2. Repeat on this layer steps 15-26 and change the location of image as necessary
-
Step 25
Create a new layer and rename it ball3. Repeat on this layer steps 15-26 and change the location of image as necessary
-
Step 26
We now need to create dynamic text boxes so that numbers will show up on the ball images. So first create a new layer and place it above your ball1 animation layer renaming it number1.
-
Step 27
Move in your timeline to frame 10 and insert a blank keyframe.
-
Step 28
Making sure you are on frame 10 and on number1 layer, select text from the tools palette and create a textbox within the boundaries of your ball1 image that is on the stage
-
Step 29
Select the textbox you just created and on your properties bar change it to dynamic text from the dropdown list.
-
Step 30
n the properties bar next to var: type in numb1
-
Step 31
Repeat steps 29-33 for ball2 and ball 3 images. Change names and numbers appropriately.
-
Step 32
Now we need to create a button. Insert>New Symbol. A window should pop up. Rename it "Button" and next to type make sure button is selected.
-
Step 33
Make your button any shape and color you want. I made mine oval with a red gradient for up and down states and green gradient for over state.
-
Step 34
At this point we need text placed on the button. Using the text tool type "Pick3". Under properties make sure the text box is static text. If it is not select it from the dropdown list.
-
Step 35
Your button is now made so navigate back to scene1
-
Step 36
Create a new layer and rename it button
-
Step 37
From your library drag out the button you just made on to the stage.
-
Step 38
Now for the action scripting. Create a new layer and name it actions. Move the layer to the top of your layer list.
-
Step 39
At frame 10 of the actions layer insert a blank keyframe. Right click on the keyframe and select actions.
-
Step 40
With your actions window up type in the following random number script
numb1 = random(10);
numb2 = random(10);
numb3 = random(10);
value of ten is inserted because possible number choices are 0-9 for the pick3 and 0 is considered a number. -
Step 41
Close out of the actions window
-
Step 42
On the stage select your button. Right click and select actions. Actions window should pop up.
-
Step 43
In the actions window make sure Script Assist is selected. Chose the following from the left hand panel. Global Functions>Timeline Control>goto.
-
Step 44
Select go to and play and change it to frame1. Close out the window
-
Step 45
Save your file
-
Step 46
49. To test your animation select: File>Publish Preview>Flash
When you click on the button it should give you new lucky numbers. Hopefully winning ones.












