Stencyl Extension

Hello there, i wanted to ask whether anybody can help me with implementing the Extension.

I installed it and also made an application.

I made a first scene, where i put the “initializing” blocks of the api, but as soon as i do that, the game wont even load.

Hi, I don’t know much about Stencyl. Does it give an error?

[LOG] - Copying template file: C:\Program Files (x86)\Stencyl3.0.X\plaf\haxe\lib/hxtools/1,1,6/templates/haxe/DefaultAssetLibrary.hx -> Export/flash/haxe/DefaultAssetLibrary.hx
[LOG] - Copying template file: C:\Program Files (x86)\Stencyl3.0.X\plaf\haxe\lib/openfl/1,1,1/templates/haxe/NMEPreloader.hx -> Export/flash/haxe/NMEPreloader.hx
[LOG] - Copying template file: C:\Program Files (x86)\Stencyl3.0.X\plaf\haxe\lib/openfl/1,1,1/templates/flash/hxml/debug.hxml -> Export/flash/haxe/debug.hxml
[LOG] - Copying template file: C:\Program Files (x86)\Stencyl3.0.X\plaf\haxe\lib/openfl/1,1,1/templates/flash/hxml/release.hxml -> Export/flash/haxe/release.hxml
[LOG] - Copying template file: C:\Program Files (x86)\Stencyl3.0.X\plaf\haxe\lib/openfl/1,1,1/templates/flash/haxe/ApplicationMain.hx -> Export/flash/haxe/ApplicationMain.hx
[LOG] Running command: BUILD
[LOG] - Running command: haxe Export/flash/haxe/debug.hxml
[LOG] C:\Users\lolzor\AppData\Roaming\Stencyl\stencylworks\engine-extensions/IDNetExtension/idnet/common/events/PostStatusEvent.hx:2: characters 7-26 : Class not found : openfl.events.Event
[ERR] java.lang.StringIndexOutOfBoundsException: String index out of range: -2
[ERR] java.lang.StringIndexOutOfBoundsException: String index out of range: -2
[LOG] Unexpected problem on thread Thread-80: String index out of range: -2
[LOG] Finished building for Flash (or errored out): 1

I think that are the important lines of the log.

Hello
Error in “Class not found : openfl.events.Event”.
Not enough library openfl.Events. This standard library of openfl. Stencyl working on openfl. So I think wrong install Stencyl or additional libraries.

You can try write in console (cmd.exe): “haxelib install openfl” or “haxelib upgrade openfl”. Or try reinstall Stencyl.

1 Like

Ok, i will try this out. Thank you.

http://www.openfl.org/documentation/getting-started/installing-openfl/ i will try this one. its essentially what you mean, right?

Well, i did as you said and now stencyl isnt working at all. White screen as soon as i try to test something. I re-installed stencyl and it still isnt working.

Edit: ok, i removed openfl, now stencyl is at least working again.

Ok, after removing openfl stencyl is working again.

I installed the extension, but nothing seems to happen.

i inserted the blocks “ID.Net.initialize app id and app secret”

and “show ID net login popup” but nothing seems to happen. the game starts normally , but nothing pops up.

PS: openfl seems still to be installed (also manually upgraded it again although i have latest version 3.3.0)

stencyl is still working, but still no pop up of api or something like that.

  1. Which version of Stencyl is installed?
  2. In initialize() setup correct appId and appSecret?
  3. Now, the same error?
  4. In a block inserted initialize()?

Can You please send screenshot of code?
Can You try reinstall Stencyl (without install/deinstall openfl)?

  1. 3.1.0 (b7305) is installed
  2. i guess so, i used the strings from the application page on id.net
  3. no, now no error at all.
  4. i already installed stencyl again. or do you mean i should install it again.

which code do you mean? i only use the blocks from the extension

  1. I tested extension on 3.3.1
  2. Blocks: Created (correct block) , Driwing, Updated

Yes, i used created block too. So i should try 3.3.1 then i guess?

Edit: I only see 3.3.2 or older versions.

I think 3.3.2 and 3.3.1 not have different in this case.
Maybe You will send Your project. And I will see?
Because if not visible error, then not clear what is the reason

Yeah, im trying around first.

With 3.3.2 the game doesnt work at all. I will try some other versions.

But you say with 3.3.1 it works without problems.

Yes. I and other developer use this extension on Stencyl 3.3.1 without problem.
If exist error, You can write it. Or You can send project to me and I will try solve the problem

The problem is that i dont know where to get 3.3.1 it isnt on the stencyl site .
i will try 3.3.0 now i guess.

OK. You can use 3.3.0. And what is error is showing?

With 3.3.0 some behaviours of the game are broken and it is basically not startable.
i will make a new project now and see if it works. one moment.

Well, it doesnt work.

jar:file:/C:/Program%20Files%20(x86)/Stencyl3.3.0/sw.jar!/res/logview4j/images/error.gif
false
ERROR
1439501138049015686
stencyl.sw.app.filewatcher.ExternalAppLauncher
[Flash] com.stencyl.Engine#uncaughtErrorHandler(614): Error #2142: Verletzung der Sicherheits-Sandbox: Lokale SWF-Dateien können die Eigenschaft LoaderContext.securityDomain nicht verwenden. file:///C|/Users/lolzor/AppData/Roaming/Stencyl/stencylworks/games%2Dgenerated/330%20testgame/Export/flash/bin/330%20testgame.swf hat versucht, https://www.id.net/swf/idnet-client.swc?=2015-08-13 23:25:37 zu laden.

It translates to : violation of security sandbox- local swf data can not use the property loadercontext.security.domain … swf tried to load www.id.net/swf/idnet-client.swc

but even if it would work. some behaviours of the game dont work in this upgraded version.

You build this game for flash?
Flash Player in mode sandbox can not load swf from remote sources. Swf-file of this game (with html) need launch on another destination, example on hosting, or where there is no sandbox mode.

Oh you can add a folder to your Flash player trusted folder. If your on windows, your path to the folder might look like this.

C:\Users\USERNAME\AppData\Roaming\Macromedia\Flash Player#Security\FlashPlayerTrust

Then create .cfg file with a text editor and inside put a path to the folder where you game is loading.

Y8 Games