Building Flash

Monkey Targets Forums/Flash/Building Flash

boomboom(Posted 2011) [#1]
Hi, Might have missed this, but what do I need to build Flash?

Do I require a certain version of flash, or some flex sdk?

Thanks


Perturbatio(Posted 2011) [#2]
In Monkey, click "Docs", then "getting started" and then finaly "The Flash target" it will tell you what you need to know.


wmaass(Posted 2011) [#3]
Flex SDK

http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4

get 4.1.0.16076


loz666(Posted 2011) [#4]
Hi,

think I need some help here (possibly just being stupid).
I have downloaded Flex SDK 4.1 (build 16076).

Placed it on my d: drive at the root.
Monkey is also on the d: drive

Now looking in config.winnt I see;

FLEX_PATH="${SYSTEMDRIVE}\flex_sdk_4.1.0.16076"
FLEX_PATH="${SYSTEMDRIVE}\flex_sdk_4.1"
FLEX_PATH="${SYSTEMDRIVE}\flex_sdk_4.0.0.14159"
FLEX_PATH="${SYSTEMDRIVE}\flex_sdk_4.0"
FLEX_PATH="${SYSTEMDRIVE}\flex_sdk_4"
FLEX_PATH="${SYSTEMDRIVE}\flex_sdk"

I only have a directory for the 2nd line (which I assume I change to d:\flex_sdk_4.1). Where am I going wrong?


wmaass(Posted 2011) [#5]
Maybe make sure you dont have something like d:\flex_sdk_4.1\flex_sdk_4.1 going on.

I have flex installed at c:\flex_sdk_4.1.0.16076, but left the config.winnt alone.


loz666(Posted 2011) [#6]
Hi wmass,

made a new copy of flex onto c:

Now I can see Flash as an option in the dropdown on build.

I think by attempting to be a bit clever I have been stupid.

Cheers!


loz666(Posted 2011) [#7]
Looks like it is failing on the build now;

Translating loz1
D:/Development/MonkeyPro29/bin/trans_winnt -target=flash D:/Development/MonkeyPro29/bananas/loz1/loz1.monkey

TRANS monkey compiler V1.01
Parsing...
Semanting...
Translating...
Building...
java.io.FileNotFoundException: mxjar (The system cannot find the file specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:114)
at java.util.jar.JarFile.<init>(JarFile.java:135)
at java.util.jar.JarFile.<init>(JarFile.java:72)
TRANS Failed to execute 'mxmlc -static-link-runtime-shared-libraries=true MonkeyGame.as', return code=1
Exception in thread "main"
Process complete

Any ideas?


skid(Posted 2011) [#8]
.


wmaass(Posted 2011) [#9]
Hmm, did you get the Java bit?

Java SE development kit 6: http://java.sun.com/javase/downloads/widget/jdk6.jsp


JD0(Posted 2011) [#10]
Did you install the JDK?


loz666(Posted 2011) [#11]
Yep, JDK installed.

I tried installing on another machine (XP), and it works fine. Just cannot get it to work on my Win7 laptop. Tried reinstalling JDK. Same issue. Moved Monkey onto C: drive, still the same.


okee(Posted 2011) [#12]
First check that your java folder matches
the one in config.winnt.txt, the latest looks like
jdk1.6.0_23 if it doesn't match then change
the jdk1.6.0_23 part of the path to match the
folder name in c:\program files\java\

JDK_PATH="${PROGRAMFILES}\Java\putfoldernamehere"

If that doesn't work go to c:\program files\java\
and copy the folder jdk1.6.0_23
and place it on the c:\ drive
Then change

JDK_PATH="${PROGRAMFILES}\Java\jdk1.6.0_23"

to

JDK_PATH="${SYSTEMDRIVE}\jdk1.6.0_23"

in \bin\config.winnt.txt files

bob should now be your uncle
The only problem with this is with each new update of
monkey you'll need to change the path.


charlie(Posted 2011) [#13]
Can you build Flash on mac yet?

Cheers
Charlie


Brucey(Posted 2011) [#14]
Can you build Flash on mac yet?

I expect so. Haven't you tried it? :-p


charlie(Posted 2011) [#15]
Ah, so it does! I hadn't set the path properly. D'oh!

Sound doesn't work though, and trying to play a music track seems to hang Flash player. Oh well!

Cheers
Charlie


loz666(Posted 2011) [#16]
Hi Okee,

tried everyhthing you said. Still not working. Current Flash build output is(on v33 build);

Translating untitled1
C:/MonkeyPro33/bin/trans_winnt -target=flash -run C:/MonkeyPro33/tmp/untitled1.monkey

TRANS monkey compiler V1.04
Parsing...
Semanting...
Translating...
Building...
FOPEN 'wb' for CopyFile(C:/MonkeyPro33/modules/mojo/data/mojo_font.png,C:/MonkeyPro33/tmp/untitled1.build/flash/data/mojo_font.png) failed
FindFirstFileW for LoadDir(C:/MonkeyPro33/tmp/untitled1.build/flash/data/) failed
FindFirstFileW for LoadDir(data/) failed
TRANS Failed to execute 'mxmlc -static-link-runtime-shared-libraries=true MonkeyGame.as', return code=1
java.io.FileNotFoundException: mxjar (The system cannot find the file specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
Exception in thread "main"
Process Complete


Snader(Posted 2011) [#17]
Uninstall all the java 'things' on your computer. Restart. And then download and install http://java.sun.com/javase/downloads/widget/jdk6.jsp

Then open config.winnt.txt and make sure these are correct (i added the ' to the ones that aren't correct on my machine)

'JDK_PATH="${PROGRAMFILES}\Java\jdk1.6.0_23"
JDK_PATH="${PROGRAMFILES}\Java\jdk1.6.0_21"
'JDK_PATH="${PROGRAMFILES}\Java\jdk1.6.0_19"

And these

FLEX_PATH="d:\flex_sdk_4.1.0.16076"
'FLEX_PATH="${SYSTEMDRIVE}\flex_sdk_4.1"
'FLEX_PATH="${SYSTEMDRIVE}\flex_sdk_4.0.0.14159"
'FLEX_PATH="${SYSTEMDRIVE}\flex_sdk_4.0"
'FLEX_PATH="${SYSTEMDRIVE}\flex_sdk_4"
'FLEX_PATH="${SYSTEMDRIVE}\flex_sdk"

That solved my problems.