Breaking Down Corona Cannon

hello,

   I am super newb - true story - and I’m working my way through the “Corona Cannon” code that was posted on GitHub. I think I’m managing… ok… But I’ve come across a “problem”. I’m trying to, instead of the black blocks with text, get just the text, to be seen. I can’t seem to “nil” the colour of the blocks so that the background shows through it. Any ideas?

Thanks!

Here’s a link to the code --> the letters I’m referring to are the title on menu scene.

GitHub.com/coronalabs-samples/CoronaCannon

I think I cheated… or made things harder… but I made an image that is just transparent, and used ImageRect to call that image. it worked! but surely there is a better way.

The easiest thing to do is simply hide the background block. You can do that like:

local rect = display.newRect(character, 0, 0, 64, 64) rect.isVisible = false

or

rect.alpha = 0

Or simply don’t include these four lines:

local rect = display.newRect(character, 0, 0, 64, 64) rect.strokeWidth = 2 rect:setFillColor(0.2) rect:setStrokeColor(0.8)

That… is much easier. Ahaha. Thank you for your infinate wisdom. I thought the newText had to be bound to “something” in the code, like the block. My bad.

I think I cheated… or made things harder… but I made an image that is just transparent, and used ImageRect to call that image. it worked! but surely there is a better way.

The easiest thing to do is simply hide the background block. You can do that like:

local rect = display.newRect(character, 0, 0, 64, 64) rect.isVisible = false

or

rect.alpha = 0

Or simply don’t include these four lines:

local rect = display.newRect(character, 0, 0, 64, 64) rect.strokeWidth = 2 rect:setFillColor(0.2) rect:setStrokeColor(0.8)

That… is much easier. Ahaha. Thank you for your infinate wisdom. I thought the newText had to be bound to “something” in the code, like the block. My bad.