Hello Joraanpe,
For 3.3 the only thing you need to do is to edit the ScoreBoard.hx and replace the 'nme' import text to 'openfl'
example: import nme.net.URLRequest; would become: import openfl.net.URLRequest;
Since 3.3 is not the official available version yet so I didn't change it in the source files but left it to nme so it compiles under > 3.0
There are two things to remember with 'freezing' when you connect to a server/resource on the internet.
1. Sometimes referred to as Blocking I/O or non-blocking I/O : this is in the core of the library calls that Stencyl uses. Haxe uses blocking I/O for HTTPS calls which means whatever you do it always waits for data before the client can continue.
Non-Blocking I/O is used for HTTP requests which means that the client can continue to do things and have a callback when data has arrived.
2. Apart from the blocking mechanism the Extension that I wrote uses wrapper blocks. Wrapper blocks are blocks that look like :
+=== Do something === and then do:
|
| Code inside this block gets called from the 'wrapper' function
|
+===========================
I use wrapper blocks to ensure that the data has been loaded before Stencyl goes further and you use the blocks to get data for example.
My guess is that the latter is causing you 'the freeze'.
The connection to the free server that I provide is poor, not guaranteed and could be unstable : hence FREE service
When you use the wrapper block to get data my guess is that it takes quite a bit of time to retrieve the data.
My suggestion would be to use a kind of loading actor that displays during the time it takes to request the data and to display the data.
Something like this
1. setGameAttribute WAIT to true
2. wrapper block: request score
3. inside wrapper block: setGameAttribute WAIT to false
4. Make a draw event on the 'loading' actor
5. Inside draw event: if getGameAttribute WAIT draw text 'loading'
Hope this helps!
Best regards from
M.E.
Hi M.E thanks again for your reply and time!
1) about the freezing issue and the suggestion, yes, thats exactly how i have it, ive setted a bool that turns on and off the loading hud... whats weird is that while testing on flash it does the job no problems, but when testing on mobile is when it might show the freezes (when i touch the scoreboard actor it freezes the whole game 1-2 secs, then shows my loading hud and then shows the scores)
I might add that this freeze issue seems to only happen when i freshly opened the game and try to open scores the first time.... but the second, third, and coming times it opens it just fine.
2) I have some doubts about the new block for requesting the player's position.... I've settled it inside a request score from player wrapper, right at the end of the codes for requesting the scores in general we talked before. Then i save this new block for position inside an attribute and try to show it inside a drawing event, even though it shows "0" all the time.... any idea why could it be?
Thanks again