Can anyone take a look at this and help me please.
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
fade an image in then out?
You seem to be missing your alpha=0 or alpha=1 from your transition.to/from?
Thanks, but it still doesn't work?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | local function flashWhite () flash.isVisible = true transition.to( flash, { time=200, alpha = 1, onComplete=listener1 } ) local listener1 = function( obj ) transition.from( flash, { time=200, alpha = 0, onComplete=listener2 } ) end local listener2 = function( obj ) flash:removeSelf() end end flashWhite() |
Weird, not sure. Try this, I tested locally and this works:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | local img = display.newImage("flash.png") function img:fade() self.alpha = 0 self.tween = transition.to(self, {time=500, alpha=1, onComplete=img.onFadeIn}) end function img:onFadeIn() transition.cancel(self.tween) self.tween = transition.to(self, {time=500, alpha=0, onComplete=img.onFadeOut}) end function img:onFadeOut() transition.cancel(self.tween) self:removeSelf() end img:fade() |
views:1656 update:2011/10/11 8:57:46
热门文章
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
相关文章
Proper Table Cleanup
SimplePool (Just one single collision each time)
New space-themed game: - Galaxy Hop - on the App Store. PROMO CODES!
Updating an app question
Get Pixel Color
Cannot find the Road Map
Game Template Wanted: Angry Bird Level Structure/Menu
Works on simulator but crashes on device
Good Book?
Working on getting started
SimplePool (Just one single collision each time)
New space-themed game: - Galaxy Hop - on the App Store. PROMO CODES!
Updating an app question
Get Pixel Color
Cannot find the Road Map
Game Template Wanted: Angry Bird Level Structure/Menu
Works on simulator but crashes on device
Good Book?
Working on getting started
corona forums © 2003-2011