Hello all, I am totally new to MAC and corona and have been slowly working ( cough cough playing ) my way through the examples and code. I have the little green running man from one example and a crate image from another example. I would like to know if someone can help supply me with an example on how to make the green man JUMP and land on the crate. In my example I was trying to use a button click and just try to make the man jump. but nothing ever happens when the jump() function is executed.
The text message is displaybed - but the jump never seems to happen.
am i approaching this right or wrong?
local buttonRight = ui.newButton{
default = “buttonArrow.png”,
over = “buttonArrowOver.png”,
onPress = buttonRightPress,
onRelease = buttonRightRelease,
–text = “Button 1 Label”,
emboss = true
}
local buttonRightPress = function( event )
t:setText( “Button R pressed” )
jump()
end
function jump( )
sheet2:applyLinearImpulse( 0, -0.2, sheet2.x, sheet2.y-5 )
end
– A sprite sheet with a green dude
local sheet2 = sprite.newSpriteSheet( “greenman.png”, 128, 128 )
[import]uid: 11860 topic_id: 4362 reply_id: 304362[/import]