Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - yoplalala

Pages: 1 2 3 ... 6
Extensions / Flite Extension Journal
« on: March 10, 2020, 02:56:50 am »
Flite Extension

( It is not yet finished nor uploaded)

( I kind of use it as a journal )

What is Flite ?

Flite is an open source small fast run-time text to speech engine.

You can test it here on android on google play  and hopefully soon on f-droid.

Could it be be useful for a normal Stencyl Game ?

Hum, I don't know.

It could be cool to have 4 or 5 voices and use them for different characters in a game for example.

But the problem is that most English voices are quite big > 20 Mo .  ( Even though I could I have  some at less )

So why a Stencyl extension ?

Part of bigger project

It's a part of a bigger project. I actually want to do Flite Api  in haxe . This for multiple reasons.

  • I could then do GUI for flite in plenty of platforms and make Flite more accessible.
  • When I write code for Flite ,  I could write in Haxe and not "pollute" the original Flite code
  • I'm actually maintaining an android app.  And it has C++ and I don't like it. In the future , I'll try to use this api for the android app.
Part of a much bigger project

Which why I'm not so much on this forum lately ....

Basically I want to make plenty of voices for some "forgotten languages".

Interesting technically

It's the first I'm doing a pure C extension  / not android/ not IOS.

For now, it works basically , on android and linux.

I plan it to make it work on HTML5 with emscripten too .

If I'm able to do it. I'll be able to do more extensions of other interesting programs. :)

Ask a Question / is there a way of using Haxe 3.6 instead of haxe 4 ?
« on: February 12, 2020, 03:42:16 am »
I want to see if I still have a bug.

Basically this one

Ask a Question / [Advanced] Screen rotation orientation IOS
« on: October 04, 2019, 04:47:27 pm »
General Problem
I'm trying to adapt
But as you can see the first image, the scene rotates but it goes at the upper left.
What can I do to move  it in the good place ?

My personnal problem  :
I have a sdk that forces me to use portrait in the plist.
Which means the landscape games appears as portrait. ( first image)
But when I try to rotate it back to landscape, as you can see in the second image, it rotates but appears small and not in the good place.

If someone has an idea ....c

Extensions / [Resolved] Problem making a tool extension
« on: July 26, 2019, 08:33:05 am »
When I compile on ubuntu 18.04  the sample game extension

I modify  to my values
I have this error

Code: [Select]
Buildfile: /home/c/stencylworks/extensions/toolset-extension-sample-master/build.xml


   [delete] Deleting directory /home/c/stencylworks/extensions/toolset-extension-sample-master/build
    [mkdir] Created dir: /home/c/stencylworks/extensions/toolset-extension-sample-master/build
     [echo] Compiling sources -> ./src
     [echo] Using classpath -> /home/consonne/Work/Stencyl/Stencyl-41/sw.jar
    [javac] /home/c/stencylworks/extensions/toolset-extension-sample-master/build-helper.xml:76: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 3 source files to /home/consonne/stencylworks/extensions/toolset-extension-sample-master/build
    [javac] /home/c/stencylworks/extensions/toolset-extension-sample-master/src/com/mysite/example/ error: SampleGameExtension is not abstract and does not override abstract method updateFromVersion(int,WorkerPriorityQueue) in GameExtension
    [javac] public class SampleGameExtension extends GameExtension
    [javac]        ^
    [javac] /home/c/stencylworks/extensions/toolset-extension-sample-master/src/com/mysite/example/ error: method does not override or implement a method from a supertype
    [javac] @Override
    [javac] ^
    [javac] 2 errors


Ask a Question / Fullscreen on HTML5
« on: January 02, 2019, 07:59:49 am »
Do somebody know how to use fullscreen on html5 ?

Chit-Chat / Ubuntu firefox stencyl website
« on: December 27, 2018, 02:00:23 am »
Dont know where to put this info, but if you're like me and couldn't access stencyl website because you couldn't type your password.
There's a solution

you have to install this package
close and reopen firefox and tada ! You can enter your password at last !

Guides & How-To's / How to enter accented characters
« on: November 05, 2018, 10:53:08 am »

When you  you use

and you type characters like "é" , the character code is empty


Sadly you cannot  find the character from the keyboard event. You are force to use a text field.
in the arbitrary code
Code: [Select]
var inputField= new openfl.text.TextField();
in the created Event
add a code bloc
Code: [Select]
inputField.type = openfl.text.TextFieldType.INPUT;
Engine.stage.focus = inputField;

In a when any key pressed event

Press key is my own block.
You have to use a do after 0 seconds, sounds stupid , but it is needed.
(Otherwise your textfield.text will be the last key pressed.   When any key pressed see the pressed key before the textfield does.

on focus event: when the game gains focus
Code: [Select]
Engine.stage.focus = inputField;
when click event
Code: [Select]
Engine.stage.focus = inputField;

Extensions / HaxeUI [0.0.1]
« on: October 30, 2018, 09:47:39 am »
HAXEUI Alpha Only For Stencyl 3.5

Haxeui is still in alpha so this extension is even more in alpha ^^. I still haven't made all the necessary blocks .
This extension have plenty of potential, some of which I haven't explorer at all ( creating new styles, etc ...)
I have tried plenty of things , but there are so many to tests . Don't hesitate to post how you use so we can learn from you.
and the bugs you find ( I won't be able most of them) but then we can have a list of components that work everywhere.

Integration With Stencyl

For now, you can only add components to the screen. ( Theoritically, you can add :them to actors,  but mouse events won't work so it's useless.  Hopefully I'll find some workaournd) which will be over everything

  • Components will automatically clean when the changes scenes
  • When you change screen size , components will automatically adapt
Using some xml
I totally recommend to use as much as possible xml for the layout. like this is the extension change, or haxe-ui changes , it will stay compatible ( remember haxe-ui  is still in alpha too)

Don't hesitate to use or to better understand. You will notice he 'll subdivise  in in a xml file for the layout, a css file for the style and hscript file for the code.

Some example or working xml, where everything is mixed
Code: [Select]
<vbox id="main" width="100%" height="100%" style="padding:10px;">
        #scroll1 .scrollview-contents {
            width: 100%;

        #scroll2 .scrollview-contents {
            height: 100%;
    <hbox width="100%" height="100%">
        <vbox width="70%" height="100%">
            <scrollview id="scroll1" width="100%" height="50%">
                <button text="Button 1" id="button1" width="100%" />
                <button text="Button 2" width="100%" onClick="trace('hello world')"/>
                <button text="Button 3" width="100%" />
                <button text="Button 4" width="100%" />
                <button text="Button 5" width="100%" />
                <button text="Button 6" width="100%" />
                <button text="Button 7" width="100%" />
                <button text="Button 8" width="100%" />
                <button text="Button 9" width="100%" />
                <button text="Button 10" width="100%" />
            <tabview  width="100%" height="50%">
                <vbox text="Positive Bullets" width="100%" height="100%">
                    <button text="very good height and distance" width="100%" toggle="true" />
                    <button text="good take off and landing" width="100%" toggle="true" />
                    <button text="effortless throughout (including rhythm in a combination or sequence)" width="100%" toggle="true"/>
                    <button text="steps into a jump, unexpected or creative entry" width="100%" toggle="true"/> 
                    <button text="very good body position from take -off to landing" width="100%" toggle="true"/> 
                    <button text="element matches the music" width="100%" toggle="true"/>                                   
                <vbox text="Negative Bullets" width="100%">
                    <button text="very good height and distance" width="100%" toggle="true" />
                    <button text="good take off and landing" width="100%" toggle="true" />
                    <label text="very good height and distance" width="100%" native="true" />
        <listview id="scroll2" width="30%" height="100%" native="true" >
                <item value="3A"/>
                <item value="4F"/>
                <item value="CCSp3"/>
<item value="3Lz+3t"/>


Creating Components

The attributes must be some dynamic attributes.

Make Component From Xml
Important you must type the whole string. You cannot put the string in an attribute. It is used as compile time.

Make Component From String

Making Components Dynamically

Showing Components

Adding to screen
You can add components/ containers to the screen.  It is better to add components to containers and containers to screen.

Adding to other components containers

( In fact containers are also components)

Find Child/Ancestor Component
Useful to find a child/Ancestor by id  ( don't forget to use place ids always useful)

You have imported an xml. And now you want to modify some attributes

Here, when you click on the button, it will trace the message.

Useful Links
haxeui api =

- hscript
- haxeui-core

Tips and tricks
- try to use xml, it is better for predicting the result and not to forget anything
- use width and heght in percentage, as otherwise it will be pixels and behave the same with everythy screen

[ ] having the choice between adding a component forever or just to the scene
[ ] being able to add components to actors
[ ] making some options between components that scale to the screen size and some that stay the same ?

- In Flash, works well but there's an error with permissions
- Vertical sliders dont work well ( the filling is inversed).

Ask a Question / ios audio extension
« on: October 27, 2018, 12:03:42 pm »
Sponsorised by Colin Lane.

Here is an extension I made for Colin. It stops Stencyl from blocking audio on ios.
There's a block to check if some outside music is playing, but I heard it didn't work.

You just need to activate the extension, you don't need to use blocks to make it work.

Extensions / Minifier Extension [0.1]
« on: October 13, 2018, 06:51:11 am »
This is a simple extension;   to use dce  (dead code elimination)
The problem was if you put the haxe flag dce --full,  all scenes and behaviors were removed.
This extension will keep all code in the package script by adding the @:keep metatag and you don't even need to put the haxe flag !

Blank Game

Without dce :  807.5 k
With dce       :  506.4k

Without dce :  26.8M
With dce       :  17.2M

My Game
Without dce :  43.1M
With dce       :  33   M

If it says it cannot compile the game because  of X class.

Just put after the imports

If something in Stencyl  classes don't work ( and not some random extension or your code), you can post here, and I 'll modify the extension.

Extensions / [Unity Ads] Need help testing new extension on IOS
« on: September 16, 2018, 02:41:06 am »
I'm rewriting the old unity app extensions.

I have a IOS simulator, but on there unityads and prints don't work, so I have no idea , it works or not.

Here is the extension :

What I need to know :
- do the video appear when you show the unity ads ?
- what happens when you sho the rewarded unity ads ?
When you click on the different buttons ?

And of course the error messages if there are any ;)

PS: if you don't have a unity account

you can put this ios app id:   1548948
and show the placement id :    video

Ask a Question / [SOLVED ]haxe flag question
« on: September 06, 2018, 05:02:59 am »
When I try to put a haxe flag like --macro Modify.stuff() in the Settings

it says in the log

 [haxelib.exe] Error: : unknown option '-macro'.

it seems that "--" is being modified to "-"  .

is it  my fault or is a a bug in Stencyl ?

SOLUTION : use openfl flags instead

<haxeflag name="--macro" value="Modify.stuff()" />

I had some code to read external wav . ( External as not in the extras folder)

Code: [Select]
var file:String = Sys.getCwd () + idString + "0.wav";
        var =  new;
        var = new;

        var stencylSound = new com.stencyl.models.Sound(-1, file, true, false, 0.0, 1.0, ".wav" #if (openfl>="6.0.0") ,0 #end);
stencylSound.streaming = false;
stencylSound.src = openflSound;


It works perfectly in Stencyl 3.4 but not in 3.5 for someweird reason

Code: [Select], com.stencyl.utils.Utils.INTEGER_MAX)
returns null

I would gladly love your help, I'll love  to be able to migrate to 3.5

Ask a Question / IOS simulators don't appear
« on: May 27, 2018, 01:42:28 am »
IOS simulators don't appear in Stencyl dropdown , even though I have 2 IOS Simulators installed. What could  be the problem ?
I'm on High Sierra

Android Manifest - removing or adding specific permissions

Modifying the AndroidManifest.xml

You can modify directly the file in Stencyl\plaf\haxe\lib\lime\lime\templates\android\template
But the problem is that if you have multiple games, you don't want to modify every time the file

So copy the file somewhere else (I put it in my own game folder) and modify it there.

__  removing All Permissions _____
Delete or comment these lines
Code: [Select]
<uses-permission android:name="::__current__::" />::end::::end::
__ adding Permissions ______
Add the permissions you want where were the lines
Code: [Select]
<uses-permission android:name="android.permission.VIBRATE" />

Modifying the Settings

Then in the game settings, put the openfl flag in Settings/Advanced

Code: [Select]
<template path="_PATH_/AndroidManifest.xml" rename="AndroidManifest.xml" if ="android" />Replace _PATH_ by the path where you put your modified  AndroidManifest  .

You can also use these variables
"[STENCYL_PATH]"  is the path where Stencyl is installed
"[EXTENSIONS_BASE]" is the path /plaf/haxe/extensions/ in Stencyl

Thanks to @danielle53

Pages: 1 2 3 ... 6