SpriteLoq and Director Class

Hi everyone,
I’m building an app using SpriteLoq (porting from flash) and using Director Class for the scene management. The problem is in the loq_util module, who forces the use of [declare](http://www.loqheart.com/spriteloq/apidocs/group loq util.html) function to manage globals variables. So, when the spriteloq library is required, all global variables are not available.

¿Any suggestion?

Thanks.

Javier Perez. [import]uid: 27825 topic_id: 10676 reply_id: 310676[/import]

Hi Javier,

You can disable that by editing loq_util.lua. Comment out the setmetatable call at the end of the file and comment out the contents of the declare function. I haven’t tested this, but I believe you’ll be able to call globals then.

-Don [import]uid: 27183 topic_id: 10676 reply_id: 38964[/import]

Hi Javier,

I’ve updated loq_util and the other modules so forced declaration of globals is no longer a requirement but an option, (set loq_DeclareGlobals = true before including any part of the library).

You can download the Spriteloq API, http://www.loqheart.com/spriteloq/downloads/extras/spriteloq_libs.zip, and drop it into your project. I haven’t updated the sample apps yet, but I’ll upload new ones soon.
[import]uid: 27183 topic_id: 10676 reply_id: 38971[/import]

Thank you so much, Don.

I’ve already commented the error trigger in the loq_util file, now I’ll try the new version of the API.

Javier. [import]uid: 27825 topic_id: 10676 reply_id: 38983[/import]

No problem. Btw, the sample apps have been updated as well.

If you have a question and need to get to me ASAP just email support@loqheart.com, and I should get back to you sooner.

Thanks for checking out Spriteloq! [import]uid: 27183 topic_id: 10676 reply_id: 38985[/import]