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:1655 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
相关文章
Listening to local events
App Shopper
Start Your Own Mobile Gaming Studio Talk - UC Berkeley
Camera Following Character and Oversized backgound
Corona User Group - New York
Distimo Monitor - How good?
Assign picture to number, Table of all pictures in folder
Hidden Audio Module in Corona SDK?
Lil Paper Dolls just released on iOS
Quickest way to add object to array
App Shopper
Start Your Own Mobile Gaming Studio Talk - UC Berkeley
Camera Following Character and Oversized backgound
Corona User Group - New York
Distimo Monitor - How good?
Assign picture to number, Table of all pictures in folder
Hidden Audio Module in Corona SDK?
Lil Paper Dolls just released on iOS
Quickest way to add object to array
corona forums © 2003-2011