Target flash-object problem

I compile some old haxe code to Flash target and have some problems with Object type:

   var obj:Object={};
    obj.myVal=1

I get error that myVal doesn’t exist?
I use haxe4 and openfl 8.9.6

var obj:Dynamic = {};
obj.myVal = 1;

can solve this problem.

Once you get it working, try to create a Type of some sort instead of Dynamic to aid your coding and compilation.

2 Likes

I think this is because Haxe 4 crippled implements Dynamic

1 Like