I am just trying to figure out how the protection in Director 1.3 works. Does it work automatically, or do I have to add code to my scene to activate it? Thanks! [import]uid: 14967 topic_id: 12162 reply_id: 312162[/import]
im trying this also but it doesnt seem to be working its still detecting the buttons under the popup
i added a print statment to the director.lua file inside the fncProtection function and it shows that if you tap on the screen its going to the function twice
never mind just fixed it
in the director.lua file change line 218 to read
protection:addEventListener( “tap”, fncProtection ) [import]uid: 7911 topic_id: 12162 reply_id: 44725[/import]
ok, its working but its not, when I change it to tap, it doesnt hit the buttons when it transitions, but my background music that is on a loop, wont get cleaned [import]uid: 14967 topic_id: 12162 reply_id: 44812[/import]
if I understand bg music is playing and when the popup comes up the music keeps playing and u want it to stop and continue when the popup closes
or do you want it cleared form memory completely [import]uid: 7911 topic_id: 12162 reply_id: 44822[/import]
maybe I am misunderstanding what the protection is for. From what I was reading protection was put in place so when you change scenes, the time between the transition (lets say a crossfade) no buttons on the scene you are changing to will be hit accidentally, if one was to touch the screen. Is protection only for popups? [import]uid: 14967 topic_id: 12162 reply_id: 44827[/import]
look at the chageScene function in director.lua file and see if protection.isVisible = true is set I’m at work and can’t check it right now
if it isn’t you may be able to add it before the transition and then set back to false after transition [import]uid: 7911 topic_id: 12162 reply_id: 44829[/import]
it is set to true and in the fxEnded settings it is set to false [import]uid: 14967 topic_id: 12162 reply_id: 44830[/import]
sounds like it should work but I can’t test it yet
any way I always remove all listeners before I call director so I haven’t noticed this [import]uid: 7911 topic_id: 12162 reply_id: 44832[/import]