Hey guys, can anyone help me? I am really stuck on the drag me example app. I am trying to replace the blocks with pictures, but for the life of me I can't figure out how. I have searched the tutorials, and I understand what's going on, I am just not sure where or what script to use to spawn 3 or more images of different sizes instead of the 3 blocks with rounded edges that are spawned. I have tried display.newImageRect, but with no luck! Big headache. Please help!
Thanks.
SM
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
need help adding images to "drag me" example
Just quickly this works:
1 2 3 4 5 6 7 8 9 10 | -- Iterate through arguments array and create rounded rects (vector objects) for each item for _,item in ipairs( arguments ) do local button = display.newImageRect( "icon.png",114,114, item.x, item.y, item.w, item.h, item.r ) --button:setFillColor( item.red, item.green, item.blue ) button.strokeWidth = 6 --button:setStrokeColor( 200,200,200,255 ) -- Make the button instance respond to touch events button:addEventListener( "touch", onTouch ) end |
views:1300 update:2011/10/19 8:59:29
热门文章
GameCenter LeaderBoards and Achievements Enabled Through OpenFeint
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
send message and call to a person
Forum: Report Spam + PM
[INSTALL_PARSE_FAILED_NO_CERTIFICATES]
[SOLVED] Director ERROR: Failed to execute new( params ) function on 'screen1'
Too many (200) local variables
Corona SVG Level Builder released. Drag and drop physics level editor with Inkscape and SVG.
Small bug in Collectible Items example
Pivot Joints and apparent elasticity
Can't make removeSelf() delayed
相关文章
Android Hardware Buttons
Sex Invaders completed! For Android 2.2 or higher, w/ Facebook highscores!
Importing modules. How you do this?
My wish list (keyboard jumping, move to other view, etc)
Looking for a Good .lua programmer
How do you close a WebPopup without the Back Button
Changing an objects image during runtime
Fog not working
Corona in the high school classroom
minimum iOS version of 4.3 to work?
Sex Invaders completed! For Android 2.2 or higher, w/ Facebook highscores!
Importing modules. How you do this?
My wish list (keyboard jumping, move to other view, etc)
Looking for a Good .lua programmer
How do you close a WebPopup without the Back Button
Changing an objects image during runtime
Fog not working
Corona in the high school classroom
minimum iOS version of 4.3 to work?
corona forums © 2003-2011