Solved

Creating a DB feed fruit machine

Posted on 2004-04-05
4
191 Views
Last Modified: 2010-04-03
I want to create a flash movie that will simulate a fruit machine with 6 reels, the reels need to spin around when a button on the movie is pressed and then one by one (from left to right) the reels need to stop.

One the reels I need to have a value that will be drawn from a record set ( IE 12,000 so in this case reel one would have

REEL Value

1-----0
2-----1
3-----2
4-----0
5-----0
6-----0

I already have the SQL query for this so it is just a matter of adding it to Flash and having it populate the reels with the dynamic data

Then once all the reels have stopped I want another value to appear in the bottom part of the movie.

Many thanks

Willa
0
Comment
Question by:willa666
  • 2
  • 2
4 Comments
 
LVL 19

Expert Comment

by:Montoya
ID: 10759148
Im not sure I get your reel concept. Is this like a slot machine?

0
 
LVL 1

Author Comment

by:willa666
ID: 10759945
Thats correct it is a slot machine / fruit machine, one armed banit.

0
 
LVL 19

Accepted Solution

by:
Montoya earned 500 total points
ID: 10762565
well, you threw me off w/ the whole SQL database thing.. we've done a simulation like that, but playing around.
Here's how we did it..

We had pics of the fruits.

We created an array with the different fruits

fruits=["cherry.jpg","bar.jpg","banana.jpg"];

we chose a random number in our code...

then we set intervals of 5 seconds for the beggining spin
and then every two seconds there after we would reveal each fruit, which was a slice of the fruits array. (array.slice(randomnum));

One thing we did was simulate the spin of the reels with a little photshop and some blurred, runny images... (yeah, we kinda cheated).

I thought I had the code with me... but I dont. We can reconstruct, if necessary. However, I have a feeling you're doing something entirely different.
0
 
LVL 1

Author Comment

by:willa666
ID: 10791411
Well the concept is similer!

I want to be able to feeed in two value to the page from a a sql database. the two values are value one which will be a number between 0- 999999 and the second value which will be a number between 0-9999.

i want the first value to appear on the reels and then the second value to appear in the prise bin.

What you have done sounds lke it is a step in the right dirrection! do you still have you code? that would be a great help! :)

Have you had exposure to pulling data it to flash from DB's?

Many thanks

Willa
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question