Skip to main content
Inspiring
December 8, 2011
Question

simple shopping game help

  • December 8, 2011
  • 1 reply
  • 481 views

hey folks,

rather then post mid code I'm taking the time to plan early. I'll be looking to build a simple small shopping game. Really just some drag and drop items, once they place an item on another mc (or in the cart) it'll remove the items cost from a master total placed in the top left corner. Now since I"m pretty basic on as3 I'm only going on theory on how to do this. So any help to point me in the right direction would be great. Here's what I'm thinking:

Have the mcs on screen

have one mc representing a budget number

functions based upon hit detection, so when dragged mc hits cart the budget mc would adjust

the only thing I don't have a grasp on is how to attach a number value to an mc. I can make the above happen, just not able to get all the background number work. So how do I assign a dollar (number) value to an mc. Further then that, have an mc with a total value, and have mcs get subtracted from it. Am I asking the impossble?

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
December 8, 2011

You are not asking the impossible.  It is actually fairly basic.  Each movieclip can be assigned a value that you use to determine what it costs.  Each time you drop an object on the cart you add its value to a master value and then use that value to update the budget number. 

First try to think it thru and then try to make a simplfied example work.  If you have a problem, post your code and explain the setup.

Inspiring
December 8, 2011

thanks ned will get to it