Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Help Coding a Flash Game for an Online Community

Community Beginner ,
Nov 23, 2014 Nov 23, 2014

So this is a little out of my league in terms of what I know how to do with Flash CS5 and what I don't.

Someone recently contacted me asking me to help them with a Flash Dress Up Game for an online community they want to launch in February next year. Dress Up games, okay. i can do dress up games. They're pretty easy. BUT this is intended for a community. So the game needs to be able to accomplish the following:

  • Call to dress up items in an online database to populate the game. Which, I was given this tutorial to help: kirupa.com - Learn How to Use Flash with PHP and mySQL I don't know PHP and I don't know mySQL, but a tutorial helps for me to set up the flash component. The person who contacted me knows how to code PHP and other web design elements. The dress up items will be on the website's server and instead of me importing everything into the game, they need to call to stuff existing out of the game.
  • Make in-game purchases? I think. It needs to be able to communicate with PHP to deduct any in-game purchases from the user's account outside of the game.
  • Be able to save the desired avatar to the online database. The game needs to be able to have a save function that'll save the code or whatever to the online community database for a specific user so when they see their avatar on their profile, it's the one they saved in the game.

I want to know if it even can be done in Flash or would we need to use something else like PHP or Javascript? And if it's possible in Flash AS3, please provide me with the know-how and resources to get this done. XD

I'm going to share what the person who's reached out to me has written. Sorry in advace if it sounds confusing. Even she feels it might be explained in a confusing way. So here it goes in her words:

The finished product has to be able to save the clothed avatar in a database(Which i can create) that will then display said finished avatar on the website.

January/February is when I want to release a stable version of the community.

We just need to iron out the database, the PHP, the actionscript, and the flash. Really the first step is completing the interface so it works the way it needs to. So everything below is just a "Keep it in mind, because this is the HOPEFUL finished product"

So I have my database, the game, the avatar, and a shirt.

Database setup is like so (with unimportant info omitted): Username, Gender, Top, Bottom, Foot, Hand, Wrist, Head, Face.

Everytime someone changes their shirt (top1.jpg to top2.jpg for example) in the flash game, once that person hits save, the information(meaning the filename of the item's picture stored on the website) that our user wants to wear top2.jpg now has to be sent to the database (by saving the filepath in the correct spot, in this case under "Top" would have icon-universe.com/MaleTop/Top2.jpg instead of icon-universe.com/MaleTop/Top1.jpg). This is how we keep everything together, you see? So everytime someone saves, basically the flash portion calls a script of code (most likely actionscript) to send all the new information of the changes the user made to the database and replace what was in it before. It's probably like... 10 lines of code between sending it to a PHP file on the website, and having that PHP code make a call to SQL.

Now since were calling upon everything from a database, I'd like to call the pictures of clothing and items to the flash game from filepaths on the website as well. Example:

We have top1.jpg in the folder labeled "MaleTop". The game will use the picture saved in the folder on the website named top1.jpg to be shown in the users inventory instead of having all these images of clothing and items saved in the flash file (like... viewing an image. the image viewer doesnt hold the picture, it merely displays it.)

So you'll use ActionScript, quite simply, to say "When you hit this button, talk to this script on the website"

So an example would be:

Person Buys a pair of shoes; highlight shoes > add to cart > buy shoes. AS3 will be here to simply say "reduce this persons wallet by 10p" which would most likely really say, in longer terms, "Take the variable -10p and throw it over to wallet.php where wallet.php takes that variable and tells the database to remove 10p".

AS3 is fine, I'll make a PHP script that does everything as long as you use AS3 to call the information from the script on the website.

So, example:

- I make a PHP script that can check coins and points of a particular user in the database

- YOU make an AS3 script that simply displays that information in the game

Example 2:

- Someone has 300 points and buys an item worth 50 points;

- YOU make a script that throws -50 into my php script

- I make a PHP script that deducts 50 points from the users database file

- YOU use that first AS3 script to display his new points amount from my first PHP script.

Hopefully this 1. makes sense, and 2. someone out there knows the resources I need to set this up XD

Any and all advice would be appreciated! Thank you for your time!

TOPICS
ActionScript
1.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Nov 24, 2014 Nov 24, 2014

I doubt anyone is going to read your design specification and offer solutions to guide you thru it - I stopped as soon as you started presenting "in her words:".  Your best bet for getting help with coding is to show specific code you are having a specific problem with and ask for help resolving it.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Dec 01, 2014 Dec 01, 2014
LATEST

This is the only "question" I could extract out of your confusing post:

"I want to know if it even can be done in Flash or would we need to use something else like PHP or Javascript?"

It can`t be done in Flash alone you need php.

With the experience level you already admitted to, I strongly advise to stay away from such a project, you will save you and our customer a lot of headaches, no offense.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines