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 ... 5
1
Ask a Question / Fullscreen on HTML5
« on: January 02, 2019, 07:59:49 am »
Do somebody know how to use fullscreen on html5 ?

2
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 https://ubuntuforums.org/showthread.php?t=2394714

you have to install this package
https://bugzilla.mozilla.org/attachment.cgi?id=8974077
close and reopen firefox and tada ! You can enter your password at last !

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

When you  you use

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

SOLUTION

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]
Engine.stage.addChild(inputField);
inputField.type = openfl.text.TextFieldType.INPUT;
Engine.stage.focus = inputField;

In a when any key pressed event

Explanation:
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;

4
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 http://www.haxeui.org/builder or http://www.haxeui.org/demos/explorer/ 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;">
    <style>
        #scroll1 .scrollview-contents {
            width: 100%;
        }

        #scroll2 .scrollview-contents {
            height: 100%;
        }
    </style>
    <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%" />
            </scrollview>
            <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>
                <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" />
                </vbox>
            </tabview>
        </vbox>
        <listview id="scroll2" width="30%" height="100%" native="true" >
            <data>
                <item value="3A"/>
                <item value="4F"/>
                <item value="CCSp3"/>
<item value="3Lz+3t"/>
            </data>
        </listview>
       
    </hbox>
</vbox>







Blocks

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



Example
( 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)

Example
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 = http://haxeui.org/api/haxe/ui/components/Button.html

Dependencies
- hscript  https://github.com/HaxeFoundation/hscript
- haxeui-core  https://github.com/haxeui/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

TODO
[ ] 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 ?

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

5
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.

6
Extensions / Minifier Extension [0.1]
« on: October 13, 2018, 06:51:11 am »
This is a simple extension;   to use dce  (dead code elimination) https://haxe.org/manual/cr-dce.html
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

Flash
Without dce :  807.5 k
With dce       :  506.4k

Linux
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
@:keep

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.

7
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


8
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()" />

9
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 openflSound:openfl.media.Sound =  new openfl.media.Sound();
        var req:openfl.net.URLRequest = new openfl.net.URLRequest(file);
        openflSound.load(req);

        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;

Script.playSound(stencylSound);

It works perfectly in Stencyl 3.4 but not in 3.5 for someweird reason  https://github.com/Stencyl/stencyl-engine/blob/208daa0ceeb9f197296a75a689e9194630341e68/com/stencyl/models/Sound.hx#L101

Code: [Select]
src.play(position, 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

10
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

11
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]
::if (ANDROID_PERMISSIONS != null)::::foreach ANDROID_PERMISSIONS::
<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

12
Extensions / Unifill Extension v1.0- use text from other languages
« on: March 10, 2017, 04:34:35 am »
Unifill Extension  V1.0

This is the Stencyl adaptation of mandel59 code  ( Ryusei Yamaguchi)
License : MIT
Original github : https://github.com/mandel59/unifill

Use : when you using other languages like French, Russian, Arabic, Japanese, the normal blocks won't work


Beware : you cannot type characters directly from Stencyl interface, you must the unicode block



You won't be able to draw the characters on the screen, you must use convertToPseudoUnicode(). This extension won't help for this.




13
Ask a Question / What is forwardMessage(msg:String) ?
« on: January 28, 2017, 06:33:24 am »
When you click on the code preview. I see this fonction, but I don't understand what purpose it has or how it could be used :)

14
Ask a Question / [Solved]feature or bug ? Extensions question
« on: November 06, 2016, 07:58:27 am »
Solved: in fact I had ( accidentely, must have copied it withou noticing it ) two copies of the blocs.xml . So that's why however much I modified the blocks, the changes didn't appear





Now when I modify a block in an extension which was already used.  (b9279)

For example  if i change
<block tag="learntPhonemes_until_now"
      spec="learnt phonemes until now %0"
      code="Literacy_LevelDependentFunctions.learntPhonemes(~)"
      help="learnt phonemes / vowels / consonnants / semivowels"
      type="normal"
      color="charcoal"
      returns="list">
   <fields>
Code: [Select]
<fields>
<dropdown order="0">
<choices>
<c text="vowel"      code="&quot;v&quot;"></c>
<c text="consonnant" code="&quot;c&quot;"></c>
<c text="semivowel"  code="&quot;s&quot;"></c>
<c text="all"        code="&quot;all&quot;"></c>
</choices>
</dropdown>


To
Code: [Select]
<block tag="learntPhonemes_until_now"
spec="learnt phonemes until now %0 %1"
code="Literacy_LevelDependentFunctions.learntPhonemes(~,~)"
help="learnt phonemes / vowels / consonnants / semivowels"
type="normal"
color="charcoal"
returns="list">
<fields>
<fields>
<dropdown order="0">
<choices>
<c text="vowel"      code="&quot;v&quot;"></c>
<c text="consonnant" code="&quot;c&quot;"></c>
<c text="semivowel"  code="&quot;s&quot;"></c>
<c text="all"        code="&quot;all&quot;"></c>
</choices>
</dropdown>
<dropdown order="1">
<choices>
<c text="excluded"      code="false"></c>
<c text="included"      code="true"></c>
</choices>
</dropdown>
</fields>

only the old version of the block appears ... is there an easy to change the first block to the second without having to create a new blocks and changing the old block by the new ?

15
(bonus:  and landscape on tablets  bonus2: autorotations on tablets and phones) .

All my scenes are dynamically created from the scenes width and height , so it should be a doable.
All my scenes are 320*480, but I want them to be 480*320 when on desktop.  Any idea how to do this ?

Pages: 1 2 3 ... 5