Having reliability problems with new .swf asset loading

sometimes

var _testmovieclip = new test_mc();

with

<library path="assets/library.swf" generate="true" preload="true" />

works, sometimes it does not.

Sometimes everything goes as it should(?) and movieclip loads from library.swf, when however I do changes to naming of the movieclip, or update .swf other way, I get this error:

--macro:1: character 0 : Package "test_mc" was not found in any of class paths
Build halted with errors.

After 4.5 update using .swf assets have been unreliable. 30 minutes ago “test” movieclip was able to load, and only thing I did was add “_mc” at the end of the “test” in .fla and updated the .swf file.

Am I doing something wrong? If I am why does what I am doing work sometimes and sometimes it does not?

Help please?

Haxe class names must be capitalized. Perhaps it is being changed to “Test_mc”, or there is a minor bug regarding name translation (it is not made valid in all places)

I recommend trying a name that’s valid in Haxe, like “Test_mc” or “Test_MC” or whatever you prefer, and seeing if that behaves well

1 Like

Now it works again! Thank you! :smiley:

… Capitalization… didnt even cross my mind heh :slight_smile: all the things I tried… Oh well, thanks again!

1 Like

Hello, been having a bit of a break from Haxe to do some Python and other stuff now coming back to Haxe having more problems with .swf loading :frowning:

My project.xml:

<assets path="assets/library.swf" generate="true" preload="true" />

and here’s how I try to use Player_mc movieclip in library.swf:

private var _player = new Player_mc();

with this, I get following error message:

src/comm/Player.hx:50: characters 27-36 : Type not found : Player_mc
Build halted with errors.

I’ve tried quite few thing, no luck. Quite frustrating since this worked just fine before… My IDE (haxedevelop) even highlights the movieclip as if it is really finding it, but it still wont work.

Any ideas?

Im so dumb…

Okay, got it working again with changing project.xml like so:

<library path="assets/library.swf" generate="true" preload="true" />

sorry for resurrecting this old-ish thread so quickly :smiley: my bad…

Ah hah!

Perhaps (since it’s built in now) we should treat standard SWF assets as libraries…