Saturday, November 8, 2014

Test Object for static method AS3

var obj:Object = new DecalMetaDatumLE();
            var str:String = getQualifiedClassName( obj );
             var def:Class  = getDefinitionByName(str) as Class;
            if (def["toJSONText"] != null)
                trace("call it!");

Still not sure how to list off all the static methods of a class.
But this is all I need for now. The ability to check for an object having a static method.
Making an advanced JSONEncoder where all complex data types can specify a
"toJSONText" and "fromJSONText" public static method that my JSONEncoder and JSONDecoder
will look for to better serialize complex objects.

Thursday, September 25, 2014

Adobe Flash Player 10.0 r2 has stopped working

I had to painstakingly trace through all my code until I found where the crash was happening.
The offending line?


I've been noticing that I get weird hard to find bugs every time I target a different version of flash.
Which now makes me know why I have testers who are reporting weird crashes that I cannot replicate.

(-John Mark)

Thursday, July 17, 2014

VerifyError: Error #1014: Class flash.ui::GameInput could not be found.

Yeah.. I expect we're gonna get this a lot from now on.
We added flash gamepad support, which requires flash player version 11.8+. So there are two things you can do:
  1. Increase the flash player version accordingly: <set name="SWF_VERSION" value="11.8" />
  2. Disable gamepads on flash: <haxedef name="FLX_NO_GAMEPAD" if="flash"

    Hopefully I don't run into this problem because I will be converting my old as3 code base to haxe.

OpenFL is not a recognized internal or external command:

 Hmm... The lime thing worked for me. But didn't have as many sample projects as I was hoping for.
Think my next step is to download HaxeFlixel and run those sample projects and get them running on different targets.

Making blog posts of trouble shooting as I go on my journey to get Haxe and OpenFL
rolling. :)

Instead of "openfl create DisplayingABitmap", try "lime create openfl.DisplayingABitmap", and so on. We'll try and get the documentation updated.  <<stalk this guy.

I got this issue solved by running haxelib run openfl-tools setup
I dont remember if it is istalled by default (check by running haxelib list), if not - run haxelib install openfl-tools

Flash is dying, should I use unity?

Flash is dying.
Should I go to Unity?

Adobe is killing flash, and look what happened with XNA.

Sure, Unity will be good for 5 or 10 years. But I am in this for longer term that that.

I don't want to be a slave to proprietary platforms, being forced to spend all my time
converting code every time technology changes.

I've been thinking about this for over six months.

This resource is pretty good:

Also, a year ago I compiled some Haxe and it worked. I can't say that for every
platform I have tried. Only reason I didn't go with it then was I wasn't sure it
had been around long enough to be safe.

Now I am sure it is.

(-John Mark)

Trouble shooting notes for:

Need to install the other packages with these commands:
haxelib install openfl setup
haxelib run openfl setup
haxelib install openfl-compatibility
haxelib install openfl-html5
haxelib install openfl-native
haxelib install openfl-samples
haxelib install openfl-tools
haxelib list

New problem:
Debugging and running flash target.
This file does not have a program associated with it for performing this action.
Please install a program or, if one is already installed, create an association
in the Default Programs control panel.

Thursday, April 3, 2014

Flash Develop: Could Not Open [...] lib\i386\jvm.cfg'

I recently MANUALLY installed JAVA by cutting and pasting my java installations from my C:\DEV\JAVA folder of a machine I recently fried via emptying mountain dew into the keyboard.

I have installed FlashDevelop and Java more times than I can count.
As usual, I ran into some trouble.

Before I tell you, it is important to note the layout of my files:
With flash develop, you MUST use the 32 bit version of Java.

Here is what I did:

To get flash develop to know where java is, add this to your PATH variable:
Aka: Whatever bin folder contains BOTH "java.exe" and "javac.exe".


TO GET RID OF "Could Not Open [...] lib\i386\jvm.cfg" ERROR:

Also: Tips on the internet say check system32 for copies of Java that were not deleted during a previous un-install.

I recommend making a shortcut to environment variables if you are a developer.
You will be using them often. Especially when setting up new development environments.

For my Windows 7, the shortcut should point to:
%windir%\System32\rundll32.exe sysdm.cpl,EditEnvironmentVariables