Got some questions about this:
-
While using a swf bigger than 12MB I get a warning and it stops loading. It is hitting on the project.xml declaration of the the file. Either I chose to preload or not.
-
If the file is under 12MB and preload is false I don’t get the symbols available so I can’t manipulate the playhead on the swf. So I’m guessing I’m missing some load instruction inside the .hx maybe to load it on cue before manipulation… maybe some .onComplete.
-
With a big file , in Flash, you can still get:
[Fault] exception, information=TypeError: Error #1009: Cannot access a property or method of a null object reference.
on the immediate
layout.resize (stage.stageWidth, stage.stageHeight);
after doing:
layout.addItem (new LayoutItem (clip.getChildByName (“ornamentos_class”), CENTER, CENTER, false, false));
Reflect.hx comes up. Maybe this is happening because the file isn’t available yet. Is this async ? -
Even with Preload set to true it doesn’t allow a normal first play of the .swf on the windows target. Flash target works ok. But windows just does a botched strobe jumpy first play. Playing after that appears to work ok both flash and windows.
-
Controlling play of the .swf. If I wanna play it just once and stop do I have to rely on some onenterframe event to check for a label or a specific frame number going by ?
.currentFrame or .currentFrameLabel I am guessing… -
Also layout.resize isn’t doing an actual resize at least on my machine. In Windows it interacts in a weird way with high dpi zoom percentage adjusted setups. Windows target doesn’t really resize anything when the size of the window changes. Though it doesn’t throw any error like flash is doing. Sysinternals Process Explorer tells me the binary isn’t dpi aware, though it is showing leftwards and top align when suppose to be centered when DPI zoom is set. Maybe I’m also having problems because of the 4K monitor on some edge case…
-
layout.resize in flash, both ctrl+f or window maximize or drag, is throwing:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at Reflect$/hasField()[C:\HaxeToolkit\haxe\std\flash_std\Reflect.hx:25]
at layout::LayoutGroup/refreshSize()[C:\HaxeToolkit\haxe\lib\layout\1,2,1\layout\LayoutGroup.hx:313]
at layout::Layout/resize()[C:\HaxeToolkit\haxe\lib\layout\1,2,1\layout\Layout.hx:73]
at Main/stage_onResize()[D:\WORK\HXPROJECTS\SimpleSWFLayout\Source\Main.hx:57]
This doesn’t happen when using the SimpleSWFLayout example .swf. Probably connected to the first issue, maybe. Again Reflect.hx comes up, line:25. return o.hasOwnProperty( field );
The used mem sky rockets for this code in the windows target, close to 2 GB with just one .swf. Maybe that could be a problem going further, probably should be using the flash target for this.
Any thoughts appreciated.
Thanks
EDIT: HTML5 resizes like a champ.