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:1302 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
相关文章
Runtime Listener Question
Background work before using In-Apps Purchase
Evo 4G Performance
Another newbie question
Does Lua supports raising custom events?
Chicken or egg?
Rose Bike Bell (iPhone / iPod Touch)
Audio and Device Volume Settings
Bubble Ball Hits #1 Free App on App Store. Just passed the 5 millionth download !!
Side of a rect
Background work before using In-Apps Purchase
Evo 4G Performance
Another newbie question
Does Lua supports raising custom events?
Chicken or egg?
Rose Bike Bell (iPhone / iPod Touch)
Audio and Device Volume Settings
Bubble Ball Hits #1 Free App on App Store. Just passed the 5 millionth download !!
Side of a rect
corona forums © 2003-2011