Explanation

Dear all,

I need to apologize because I am far from the forum. I’m working on 3 different jobs on the same day. I don’t have time to answer your questions in the forum or by e-mail, I’m really sorry about that. As soon as I can, I will be pleased to answer everything again as I used to.

We have great developers here and I’m seeing a lot of good answers on my subscription to this forum by e-mail. I think most of you can handle your issues following this steps:

1 - Are your display objects inserted into the localGroup? If not then the objects will stay on the screen. To work properly you have to insert all display objects into the localGroup.

2 - Are you using big images? Try to export them with “Save for web & devices” at Photoshop.

3 - Is there too many images loading at the same time? Please take care to load images lazy, otherwise the app will crash on the device.

4 - Is there any button at the same position of other button in the next scene? With that there can be an issue on faster touchs just because the buttons are in the same place.

5 - Have you made a search for the issue at the forum? Most of your doubts may have been previously resolved, please search for it before creating another topic.

6 - There are great examples made by Beebe Games and other developers at the Code Exchange page. You can find there great ways to build your games.

7 - If you want to make a book, please keep in mind that your images probably will be big and the app will not load them in a second.

8 - Director cleans display objects and the listeners added to them. It can’t clean timers and Runtime listeners, that’s why the clean() function exists. You have to put there the Runtime:removeEventListener()s, timer.cancel()s and stop the transitions.

9 - The sample from v1.2 is not so different of the v1.1, it is just more organized.

10 - The initVars() function was created to start the VALUES of your variables, so you can use it to start the level or replay it. [import]uid: 8556 topic_id: 7305 reply_id: 307305[/import]

Thanks for the update. You are a true gent! [import]uid: 7863 topic_id: 7305 reply_id: 25740[/import]

I have these run time,

Runtime:removeEventListener (“enterFrame”, onFrame);
Runtime:removeEventListener(“collision”, globalCollision)
Runtime:removeEventListener( “enterFrame”, move )
timer.cancel(mytimer)
Runtime:removeEventListener (“accelerometer”, onAccelerate)

when I write them inside the Clean function , still have the same problem that,

when I replay my screen sometime got freeze ,

how can I solve this problem ? [import]uid: 13061 topic_id: 7305 reply_id: 29435[/import]

another question ,

now I have deathscore, that I wrote inside :
local function globalCollision(event)
obj1 = event.object1
obj2 = event.object2

– if player hits fish
if(obj2.is==“fish” and obj1.is==“player”) then
– call our remove function
removefish(obj2)
end

if(obj2.is==“enemy” and obj1.is==“player”) then
– call our remove function
removeEnemy(obj2)
end

--------when death score = 0 remove objects --------------
if (deathscore==0) then
deathscore = 5
Runtime:removeEventListener (“enterFrame”, onFrame);
–Runtime:removeEventListener(“collision”, globalCollision)
Runtime:removeEventListener( “enterFrame”, move )
timer.cancel(mytimer)
–Runtime:removeEventListener (“accelerometer”, onAccelerate)

director:changeScene(“screen1”,“crossfade”)
ScoreV = saveValue( “score1.data”, score )

end

end

is this true ?? that I delete Runtime , and clean time, inside both, Clean function and this function ?

actually, I have been working to fix this more than 4 weeks, and still same problem ,

would you please help me out for this problem, my game is done, except this problem ,
[import]uid: 13061 topic_id: 7305 reply_id: 29436[/import]