This one is probably an easy one. I've been using director 1.1 but the screen1.lua file for director 1.2 is quite different. Where in the screen1.lua file for director 1.2 would I call my function that removes all of my listeners? I am using the director class for a game and all other examples I can find such as martian control and ghosts vs monsters use director 1.1. Thanks for your help.
Label: corona android iphone ipad building error inmobi problem display screen View image tableView failed object physics touch button game lua config event listener |
Remove listeners in Director 1.2
Anyone? Lets say I have a function called unloadMe() which removes my listeners. Where would I call it if I wanted to remove the listeners after the level is over?
unloadMe() -> clean()
Thanks for repsonding yuewah. So I can remove the listeners directly in the clean function like this?
1 2 3 4 5 | function clean ( event ) listener1:removeEventListener(....) listener2:removeEventListener(....) ... end |
btw, if u look at the sourcecode, it is easy to find out.
views:1672 update:2011/10/13 9:25:17
热门文章
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
相关文章
Add Objective C to a Corona App?
How is everyone doing with Inneractive Ads?
Url schemes
Apple revenue payouts
Play a remote MP3?
Will there be a Corona christmas special offer?
SpacePenguin - 48 hour Rapture Sale!
¿Alguien se anima a traducir la documentación oficial?
Class Question
Need Help with example calling a website to read the DB to return the data
How is everyone doing with Inneractive Ads?
Url schemes
Apple revenue payouts
Play a remote MP3?
Will there be a Corona christmas special offer?
SpacePenguin - 48 hour Rapture Sale!
¿Alguien se anima a traducir la documentación oficial?
Class Question
Need Help with example calling a website to read the DB to return the data
corona forums © 2003-2011