A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: urgent help required

  1. #1
    Flashkit Witch Azaraelle's Avatar
    Join Date
    Nov 2000
    Location
    South Africa
    Posts
    123

    urgent help - loading variables from a database

    I have been asked to create a flash game fairly similar to this: http://www.fetch.lycos.co.uk/
    The game needs to have floating ballons which explode to reveal a prize icon when clicked on. The combination of prizes for every game needs to be called from a database. The game also needs to register which icons have been revealed as "fetch" does.
    I have 5 icons to be used so I figured I would create 6 balloon movie clips (one empty balloon is required) and hopefully it is possible to get the database to specify which movieclips to load. further than that I am completely stuck!
    We need to a) Connect to a database, b) Call a stored procedure, and c) accept parameters
    Does anyone have any idea how to do this?

  2. #2
    Senior Member
    Join Date
    Sep 2000
    Posts
    175
    you have to use ASP or coldfusion to do your database queries. To call the stored procedure I would probable have used coldfusion that does the SQL query, then send the variables back to flash through load variables and then do whatever you like to do. Then on your icons you give them ID and on the click event you let them post the variables to a Coldfusion/ASp page that writes to your database and then you know how much each button has been clicked. Hope this helps

  3. #3
    Flashkit Witch Azaraelle's Avatar
    Join Date
    Nov 2000
    Location
    South Africa
    Posts
    123
    I have to admit I am in way over my head here. A programmer is doing all the database work and we are using ASP.

  4. #4
    Flashkit Witch Azaraelle's Avatar
    Join Date
    Nov 2000
    Location
    South Africa
    Posts
    123
    My main problem is when flash receives the variables it then has to load specific movieclips depending on the variables received. I also havent gotten the hang of just loading the variables yet!

  5. #5
    Senior Member
    Join Date
    Sep 2000
    Posts
    175

    variables

    search for asp integra\tion tutorials here and see how you load variables into flash. I work with coldfsuion and can't help you with asp, but there should be laods of tutorials araound helping you. if you want send the file to me I might be able to code the variables etc for you.

    [email protected]

  6. #6
    Senior Member
    Join Date
    Apr 2001
    Posts
    433
    Sadly, I can't help with the back-end issue, but I can help with the flash part (a bit).
    I'm not exactly sure how you (or the programmer) will end up naming the variables to be imported, but I'll write this assuming they're
    balloon0 through balloon9
    (or however many balloons you need in one 'round')
    These variables will be string variables that tell a "prize" clip which prize to display (I'll explain it more thoroughly a paragraph down).

    You'll need to create a balloon movieclip of a balloon happily floating, presumably with a button inside on which the person will click to pop the balloon.

    Here's a little short cut that will make things easier:
    Make one movieclip in which to store all the "prize" animations. Label the frames at the start of each new animation ("prize0" through "prize5", let's say). Put one instance of the prize clip in each balloon clip.

    Now, when a balloon is clicked, play your popping animation and use a gotoAndPlay(_root.balloon0) or balloon1, 2, etc, depending on which instance of the balloon you're dealing with..

    Hope this helps at least a bit..If you need more help, ask away!
    Arctic


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center