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.

Messages - adytt

Pages: 1 2 3 4
Ask a Question / Re: ALT key bug in Stencyl
« on: May 11, 2017, 04:21:47 am »
Is there a solution?

Ask a Question / Re: Problem with scaling.
« on: May 11, 2017, 12:29:20 am »
Solved here is the solution as provide by another user 1MrPaul1:

Inside the first scene of your game - click - Add event -> When created
Inside the When created -> right click your mouse -> Place a block -> Advanced ->Code -> here type the following code
Code: [Select]
flash.Lib.current.stage.scaleMode = flash.display.StageScaleMode.SHOW_ALL;

Ask a Question / Re: flash not fit the window
« on: May 11, 2017, 12:25:30 am »
Solved: thank you very much 1MrPaul1, you explained correctly, yet I misunderstood you.

In case others need this feature here is how you should do it step by step.
Inside the first scene of your game - click - Add event -> When created
Inside the When created -> right click your mouse -> Place a block -> Advanced ->Code -> here type the code bellow
Code: [Select]
flash.Lib.current.stage.scaleMode = flash.display.StageScaleMode.SHOW_ALL;

Ask a Question / ALT key bug in Stencyl
« on: May 11, 2017, 12:11:36 am »
Hello I have just managed to finish my fist platform game build in Stencyl, yet I encounter an odd problem,
I use the Platform movement resource with some slight modifications.
My default keys for moving the character are the RIGHT - move right,  Left-move left, Up - jump, Down - duck and X - fire.

If by accident you touch the ALT key while another key (arrow keys or the X) is pressed- the character will execute by itself the same command over and over and you are not able to control it anymore.

Ex you were pressing right to move right a touch the ALT key - the character will walk by itself and you can't stop it.
If you were pressing X to shoot and touch the ALT key - the character will shoot repeteadly and you can't stop it.

This is fore sure a bug as I have not defined any actions inside my game for the ALT key or any other keys beside the Arrows and the X

Ask a Question / Re: flash not fit the window
« on: May 10, 2017, 11:56:23 pm »
Thank you very much I have tried this, my first scene is called Preloader as I have a short introduction for my game. I have added a new code block with the code you provided, yet I get the following error when compiling: Unexpected flash
   from scripts.SceneEvents_24

Please let me know if I need to do it another way or use some sort of extensions or such

Ask a Question / Re: Problem with scaling.
« on: May 10, 2017, 11:47:09 pm »
There are games build in Stencyl that scale dynamically here is one example, a game called Slender Run and here is a video to prove my statement:

I'm also interested how can this be done, yet I did not find a solution until now.

Ask a Question / Re: flash not fit the window
« on: May 10, 2017, 11:40:43 pm »
Hello 1MrPaul1 where do you add this code, I would also like to have the autoscalling to fit the window

Hello guys, I would like to ask if possible for a bit of help regarding protecting a flash game from websites that blocks the outgoing links such as "more games" button inside a flash game.
As you probably know or heard more and more portals that publish flash games blocks the outgoing links inside Flash games, this way the users won't be able to visit the sponsor/developer page when clicking the "more games" button or credits section or even the advertising.

There are solutions in AS3 posted online, yet I don't know Haxe and can't rewrite the code.
Here is an example:
Code: [Select]
var checkNetwork:Object;

function Website(event:MouseEvent):void {
checkNetwork =;
navigateToURL(new URLRequest(""));
catch( $e:* ){
mcError.x = 0;
mcError.y = 0;

button1.addEventListener(MouseEvent.CLICK, Website);


Ask a Question / Re: How to decrease flash game size?
« on: May 03, 2017, 06:56:49 am »
Did you unchecked the 1.5x, 2x, 3x, 4x scales in Atlases >> Web section, if not that would save a lot of KB.

Also for your graphics you can use photoshop and use the Save for web and devices option in order to get a good quality/size graphics.

Hello Jeffrey and thank you very much for you kind reply.
Really appreciate your help.

So after trying to build the behaviour like in your second suggestion by using the sensor type collision for the obstacle (spike), I finally managed to get it done  and I attach it here so that maybe others can also get a benefit from it.
Still needs a bit of attention in order to synchronize the flickering timer with the invicibility time.

I would also like to learn how to build the behaviour  by using duplicate collision box/shape for the Player and change to the necessary collision shape once the damaged ocured.  I have looked under the ACTOR > PROPERTIES > COLLISION SHAPES, yet I don't find a block for switching to another collision shape. so if you have time can you please share a bit of PseudoCode or such to have a better understanding of this?

I have my main Actor Placed on the SCENE and not creating it by code when the scene Starts so I have to ask if this is a drawback while trying to use this manner.

Hello to all,
Still in the process of trying to finish my first platform game and I need a bit of help regarding adding an "invincibility" behaviour to main main character.

Currently I have my Player actor aka Hero set up like this in term of animations
- walk (left + right) ; jump (left+right); shoot (left _ right); Hurt(left+right); Die (left+right); Dead (left +right); duck (left + right);

Once my Player gets hurt by an obstacle (ex. spikes) he gets trown a bit back and up in the air.

Inside my hurt behavior I would like to add a part to handle invicibility like this:
-After the Player takes damage, start to Flicker and become invincible for 3 sec. While invincibility is ON I would like the player to be able to pass through enemies and obstacles.

My problem is that I don't know how to make the Player be able to pass through enemies and obstacles (not register collisions) while invincibility is on.

Currently my Hero Character aka Player can collide with : Tiles, Enemies, Obstacles, Enemy Fire and Collectibles

I've searched the forum and found an option of using multiple collision boxes for the Player, yet I don't know which code blocks to use in order to switch to a collision box that is inside a group that won't collide with the Obstacles/Enemies/Enemies Fire group for example when the invicibility is ON.

I attach my Hurt Behaviour here in case one that can help needs to have a look and also to ask if there is a more optimized/elegant way to code it.

I think I will go with the tile metadata option instead, just read about this now.

Hello to you all, here I am asking again for your support as I'm having difficulties building a specific behavior for my Hero Actor for a platform side scrolling type of game:

While trying to reduce the number of actors on screen I thought to use a trick similar to that of the climb Ladder behaviour, where the collision doesn't actually happen between the actor and the stair/ladder tile or image, but rather between the actor and the region that surrounds the stair/ladder tile or image.

Problem description:
I'm using a tileset that has a built in obstacle in the form of spikes tiles that can easily be placed over other tiles and such
So I place a few spikes  here and there at some points when designing the level and draw a region around each of them and name this region with the name SPIKES1, SPIKES2.. SPIKESn.
Now I would like to code a behaviour for the Hero character so that when it will enter a region that contains in it's name the text "SPIKES" , he will get hurt, change animation, remove life etc.

Looking at the Ladder behaviour available on StencylForge I see that it has some custom code blocks looking something like C++, while I can understand what the code does I really don't know the syntax and how to replicate this to use it for my need.

So if one has some time to help, I would really appreciate it.
Kind regards!

Here is a new video that I hope it will clarify what I'm trying to achieve.
The video shows the .swf file opened in SWF PLAYER and can be resized easily by using the mouse to drag it's margins.
There is browser involved and no embed code or such.
It's just a simple .swf file played locally on the hard drive.
I have tried all options for exporting my game to behave like this but did not succeed.
Second part of the video show my game behaviour when trying to resize.

I found a game that was built in Stencyl called "Slender Run" that allows this kind of dynamic resizing that I'm trying to use for my current project
I have uploaded a short  recorded youtube video displaying this kind of resizing the game window in flash player that can be watched here:

If anyone knows how this can be achieved please bring some light to me.

Pages: 1 2 3 4