Can't make a SWF file

Epic428

  • Posts: 1118
After a quick scan of the log files I wasn't able to locate an error message related to this. The error that you were looking at is harmless. I see it all the time on a fully functioning game. For better clarification any line in the log denoted by [ERR] is not always an error, as I have been told.

Anyway, another had a similar issue and it turned out that Java was eating soo much memory it was the reason he could not export the game.

I'd like you to test something that he tested and worked for him.

Open Command prompt, and cd to the stencylworks directory.
inside the stencylworks directory type:  java -Xms64m -Xmx1024 -jar sw.jar

this will increase the maximum heap size for java for this particular instance of sw, it would have to be executed every time you wish to open SW with a max heap size of 1gb. Be sure to have sw closed when you type the command as it will open the program.
James Moore - Official Support & Documentation.
We cannot and will not respond to PM's asking questions. Please make a new thread in the forums if you have any questions, Thank you.
For better support and faster response times, please post your logs regarding any Stencyl related issues. Debug > Logs > Generate Logs

Netgeneraal

  • *
  • Posts: 15
I want to help you because i had this problem also

question 1 : do you have downloaded any source pack or music or what ever from the stencylForge
question 2 : do you make the game on a administrator account and do you run it always as a administrator?
question 3 : do you use windows 7
question 4 : can you post a picture of the error and the whole game
center of your game?

if you answer those question maybe i can help you.
And pls keep your stories short i am a very bad reader

spooneyte

  • Posts: 8
@epic428

Hey, that actually worked! (Once I inserted an 'm' after 1024, as it gave me an error message...I don't know much about programming, but at least I understand parallel constructions :) ) And what's weirder—contrary to your warning—it now seems to export fine, even after closing everything and restarting SW without going into the Terminal first and running this command. Huh. Maybe on a Mac these sorts of memory allocation things are "stickier"? Anyway, not going to look this gift horse in the mouth until something else goes screwy, I guess. Thanks for the help!

P.S. Here's the game as it stands: http://www.stencyl.com/game/play/4553

@Netgeneraal

1) I had downloaded a Dice behavior from SF, but then deleted it. Everything else was mine, I think.

2) I...guess? I'm on a Mac, and have only one user account, so I would assume it's an admin.

3) No, Snow Leopard 10.6.8

4) Sorry...thanks to Epic428, I now can't even recreate the error if I wanted to! :)

Master

  • Posts: 3
I'm not really sure how to do this.

Can someone please tell me step by step how to do this on window 7 or xp

thanks in advance.

Netgeneraal

  • *
  • Posts: 15
If you have the problem not anymore i won't have to help you spooneyte,
good luck with your game

Mimicwing

  • Posts: 7
So I had the same error, I tried the java -Xms64m -Xmx1024(m) -jar sw.jar thing. Still didnt work. The only way I could get it to export properly was to remove all the music from my game.

I did notice, that inside the command prompt it says at the end: "[LOG] Unable to transcode ../game/resources/131.mp3"

So I guess something's going wrong there with the music file. Any ideas? I'd rather like to have music in my game :/

coleislazy

  • *
  • Posts: 2607
I know the sample rate must be 44.1kHz or it will fail to compile.

Mimicwing

  • Posts: 7
Actually, just a little note on this. Have checked that both my original MP3 and the MP3 that is copied into the resource folder are both 44.1kHz.

However, I've noticed (when running that command prompt) that it states that the sampling rate is unsupported, at 32000Hz. So that's changing... somewhere. :/

No idea what's going on here. Any ideas?

Joe

  • *
  • Posts: 2480
How are you exporting the MP3?

I recommend using Audacity to change the sampling rate to 44.1kHz and then re-export it as an MP3. Be sure you're setting the project sampling rate (in the bottom left-hand corner).


Mimicwing

  • Posts: 7
This is the problem I'm having. I just got Audacity, and checked myself: both the original file, and the copy made in the resource file are 44.1kH (Opened them both, bottom left hand corner, already says 44100 - i'd already checked them with VLC as well, and the friend who made the music for me says he definitely did them as 44100 MP3s. Which they are.)

However, when I try to export, it's saying that it's 32000Hz (as seen in the screenshot I posted) - and then subsequently doesnt export the flash file.

I'm going to try with a different file, and see if the same problem occurs.

Update: Made a blank game file, and tried each of the 4 pieces of music my friend sent me. They are all showing as 44100 MP3s. However one of them doesnt work. The other three are fine. Now we've pinpointed that, he's looking into if he did anything differently, and one we have some answers I'll post them here and hopefully others can avoid the same problem!

Upadate 2: Ok. So. Basically. Changed the filename. Now it works. I don't even... well I guess my issue is solved anyway. Thanks for the help peeps.

« Last Edit: September 21, 2011, 08:40:25 am by Mimicwing »

Joe

  • *
  • Posts: 2480
What was the original file name? Did it have any weird characters in it?

hcwdikk

  • Posts: 33
I have the same problem. I had it before, but then I just had to delete one mp3 file (wrong rate) and it worked. However now I don't see a problem like that in my logs ;/


nvm, I got it to work ;D
There was a problem with one of my behaviours

« Last Edit: October 18, 2011, 04:34:48 am by hcwdikk »

xsonicx262

  • Posts: 3
Hey guys I'm having a problem to publish my flash game as a SWF file. I think it was the sound at first but then I deleted all sounds and ran it on with no sound and it still doesn't work. I don't know how to read logs either :S. So I attached my logs. I got an error saying " Unable to export SWF to the requested location (Sound is usually the culprit ...)". I don't know what the problem is can someone help me?


I Also use Stencyl V 2.1
On Windows 7

Joe

  • *
  • Posts: 2480
Hey guys I'm having a problem to publish my flash game as a SWF file. I think it was the sound at first but then I deleted all sounds and ran it on with no sound and it still doesn't work. I don't know how to read logs either :S. So I attached my logs. I got an error saying " Unable to export SWF to the requested location (Sound is usually the culprit ...)". I don't know what the problem is can someone help me?


I Also use Stencyl V 2.1
On Windows 7

You're getting out of memory errors. Try restarting Stencyl or grabbing an EXE with a larger heap space via the forums.