This is an extension for the Poki.com SDK for HTML5 games that can be used by any developers approved by Poki. If not already involved with Poki, you can check this page for more information:
https://developers.poki.com/The extension has 5 blocks, and the initialization happens automatically due to the template files that are replaced by the extension (thanks to Justin for helping with that).

Use this block to tell Poki when gameplay has started and stopped.

Show a standard ad and then the blocks inside the wrapper will be triggered when the ad either finishes or fails to show. Ad rate throttling is done automatically on Poki's end.

Show a rewarded ad and then the blocks inside the wrapper will be triggered when the ad either finishes or fails to show. If the embedded reward boolean is true inside the wrapper, then the ad was shown correctly and the player should be rewarded.

Returns true if an ad blocker was detected by Poki when starting.

Use this block when a happy event happens in your game. Intensity is between 0 and 1.
For more info about when to use these blocks, refer to the instructions in this link, ignoring the code examples:
https://sdk.poki.com/html5/To enable debug mode for testing purposes, go to Settings > Advanced > Haxe Flags.
Then paste
-D pokiDebug into that box. When ready to publish your final build to Poki, remember to delete that line.
Poki games need to be sitelocked, but the sitelock code is not public and thus cannot be included in the extension. When given the sitelock code, open templates/haxe/ApplicationMain.hx inside of the extension folder. At or close to line 325 it says
// INSERT POKI SITELOCK CODE HERE and you can either replace that line or paste the sitelock code just under it. If you get a compilation error using a newer version of the sitelock code, try replacing the enclosing single quotes with double quotes. The sitelock can be tested on Poki's QA tool when the pokiDebug flag is disabled.
While not a part of this extension, Poki games need to be scalable on their site. To enable automatic scaling, go to Settings > Advanced > OpenFL Settings and paste
<window resizable="true" /> into that box. Your game resolution will also need to be in the 16:9 aspect ratio.
If using the public build b10568 or if encountering a console error about APP_FILE_SIZE, open up include.xml inside of the extension folder and uncomment the line that says
<set name="b10568" />If there are issues with any Stencyl builds let me know either here or on Discord.
Download Extension(must be signed in to the forums to download)
Update 2:Replaced the outdated public build template with one that works with the current public build (b10568) and fixes the APP_FILE_SIZE error.
Fixed wrapper blocks so they still work in cases where the Poki extension code is disabled.
Update 1:Restricted the sitelock code to non-debug mode since it caused a crash when testing locally.
Added a boolean block to check if an ad blocker was detected by Poki on startup.