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 - svintaj

Pages: 1 2 3 4 5
I have a new mobile with Android 7.1 (Nougat) and on that device I can't share images to any app or service other than  to Google Drive? So if I for example try to share an image to Gmail I get the message "Permission denied for attachment" and no image.

Does the extension work with Nougat, is it tested? Can I do something about this? Trying to use  "API 25 - 7.1(Nougat)" in Stencyl 3.4 is unfortunately not an option:,51933.0.html

I cant share images with mobile MMS,  my phone says that the image is to big to attach to the message and then that the image can't be scaled down and then it fails. The text is sent though. The image is 353kb and is 526 x 320 pixels large, not so very big i think? But I then manage to  share an image that only was 220kb with MMS. So if we had the option to save it as a JPG then the file could get small enough, since now the image always saves as an PNG, is there any flag I can set to share/save as an JPG?

Thanks for a great extension!

Ask a Question / Re: Best way to save a separate file?
« on: May 27, 2017, 05:32:22 am »
Yes I know about that extension but I got to be able to dele files as well. However I got my own code working now.  8) Just need to test on iOS as well. Thanks for your help Yoplalala!

Ask a Question / Re: Best way to save a separate file?
« on: May 25, 2017, 04:18:31 pm »
I just understod that I have to save and load using the dir: "/data/data/com.your.packagename/" on Android.
So I got it working a bit on Android now, no crash. Yay.   :)
Code: [Select]"/data/data/com.your.packagename/test.txt", false);I have read that the dir should be "/Documents/" on iOS, and I'll try that later but does anyone know if it's right?

Extensions / SP_ValueMixer
« on: May 24, 2017, 08:41:46 am »
Hi, this is my first extension!  8) A small but useful one -> SP_ValueMixer:

Use SP_ValueMixer as an easy way to mix between any two values, value A mixes with value B, use a number between 0.0 and 1.0 to say how much of A shall mix with B.

These are the blocks I have created so far:

So as you can see,  you can also mix colors.

The green block Returns Number
And the blue block Returns Color

 SP_ValueMixer should work on all platforms, and I have only tested on Flash, Android and Windows.

Here is an example, where the MouseY position is used tofade between different values like, Position, Volume, Color:
<a href="" target="_blank" class="new_win"></a>
You can also find this Stencyl example project attached, named: FaderTest.stencyl.

How to install extensions:,30432.0.html

Please show what you make with it! :D


Ask a Question / Re: Best way to save a separate file?
« on: May 21, 2017, 03:38:51 pm »
Thanks!  :) 

So I'm trying to learn this and I manage to save and load a text file on Windows, by modifying the code to this:
Code: [Select]
// Saving
var ="test.txt", false);
fo.writeString("Just a Test...");

// Loading
var ="test.txt", false);
_TestString = fi.readLine();
(the file where created in the same folder as the exe file.)

While this code works nice on Windows,  the same code crashes on Android?
I also have added the  'WRITE_EXTERNAL_STORAGE permission' to the Androidmanifest, still crashing on Android...

Does anyone have any idea why?

Extensions / Re: Attribute Saving [Extension]
« on: May 20, 2017, 12:27:29 pm »
Thanks Yoplalala, since we are getting a bit of topic here I decided to move over to a new thread, please see:,51520.0.html

Ask a Question / Re: Best way to save a separate file?
« on: May 20, 2017, 12:21:53 pm »
Ok, so Yoplalala was trying to help me from another thread, writing this:
Today at 06:08:53 am
Hi svintaj ! Sorry I didn't test how to do it. I'm trying Stencyl 3.5 and for now windows and android compiling doesn't work ... so quite difficult to test. Maybe I'll try on some old version.

Maybe this could help.
(image is an attribute of type image ;) )
// Saving the BitmapData
var b:ByteArray = image.encode("png", 1);
var fo:FileOutput ="test.png", true);

Thanks Yoplalala, I'm new to this but I tried to put that in a Code Block, but when trying to compile I get those two errors:
'Type not found : ByteArray' and 'Type not found : FileOutput'?

Extensions / Re: Attribute Saving [Extension]
« on: May 20, 2017, 04:41:07 am »
Ok, so then I have a feature request to this Attribute Saving Extension :   8)

-> Could we have a 'Dropdown Menu' in all Save Blocks with the two options to save the file as a 'OneSharedObject' or an 'IndependentSingleFile*?  (For Android and iOS) That would be very usefull, and should totally solve my current issue previously described in this topic.

Also, -> when trying to save a big or many files, the app can crash, so it seems like we also need ~something to check for disk space to prevent such a crash?

Use 'ScaleToFit(Fullscreen)' and then just make your background actor a bit larger than the screen.
Also good to know: Apple rejected one of my apps when I used Letterbox, so I had to change it...

Ask a Question / Re: Firing in opposite direction of mouse (speed)
« on: May 19, 2017, 12:50:18 am »
Great! 8)

Ask a Question / Re: Slow ship wobble scene
« on: May 18, 2017, 12:25:20 pm »
Use the math function 'sin' to get a soft wave motion. Just feed an increasing value to 'sin'  and 'sin' will output a smooth wave between -1 and 1. Then just multiply the result to get the scale you need, like this: 'sin(IncreaseMe)*scale'

Ask a Question / Re: Firing in opposite direction of mouse (speed)
« on: May 18, 2017, 11:58:23 am »
This is how I did to get the distance between two coordinates 'MouseXY' and 'LastXY':

Ask a Question / Best way to save a separate file?
« on: May 18, 2017, 02:26:39 am »
Hello! :)

I need to be able save several images from within a painting app that I'm working on. I will also need to be able to load those images and delete them from within the app. I need this to work solid on both iOS and Android. ( I also would like to be able to first check if there is enough disk space on the device to save an image, before trying to save it, to prevent crashing. )

What is the best way to do this from Stencyl?

-> I have tried the "Attribute Saving"-extension, it works ok, but it does not seem to keep the files separated, so for each image I save it takes much longer time to save the next one. So all images seems to shear the same data. And I need to have it separated in some way. ( Also I'm clueless about how to see if there is enough disk space on the device, before saving an file. )

Please help with some ideas, thanks in advance!

Pages: 1 2 3 4 5