Hey Everyone,
I’m a new user and I’m building an app targeted for the toddler crowd that let’s them decorate a Christmas tree.
I’m getting stuck on spawning new objects.
I use the following function to spawn a red ball
createRedXmasBall = function ()
local red\_Ball = display.newImage ( "red\_Ball.png", 20, 440)
red\_Ball:addEventListener("touch", startDrag)
end
createRedXmasBall ()
then, at the end of my drag event handler I can use
createRedXmasBall ()
to spawn the another ball and it works great.
My big problem is that I also have blue and yellow balls.
How can I pragmatically determine the color of the ball that has been dragged and spawn another of the same type?
Thank you!
[import]uid: 10763 topic_id: 3864 reply_id: 303864[/import]