After, when i export to html5 is nothing on the screen. But, when i export to flash it works fine…
Alse, if delete the type=“swf” from project.xml i can see first frame from swf but it doesn’t play in html5…
The SWF library supports two formats, “swf” (which is parsed at runtime) and “swflite”, which is processed at compile-time, and is a unique format.
The “swf” format is not compatible with HTML5 right now, and might never be. Unzipping a SWF in memory is not an efficient way to start an HTML5 project.
The SWFLite format should work for HTML5 (this is what happens when you remove type=“swf”, it allows it to choose “swflite” instead) but currently, SWFLite does not support more than one frame. This functionality could fairly easily be ported from the SWF runtime support in the library and adapted for SWFLite, but I am currently focusing on the consistency and the performance of SWFLite before going into frame animation, but welcome contributions here
**p.s.**Flash developers now is moving to new platforms and looking for good of them, wich have same features… so, i think the swf assets including movieclips give’s for openfl much more interest and fame.
So, what is alternative way to load and play png-seguence in openfl project?
You can modify a bitmap’s bitmapData property directly. This will change the image displayed by the bitmap without changing its location, rotation, scale, etc. Just load the images as bitmap data, create a single bitmap object, and change the bitmapData property to advance the frame.
This is very similar to what the spritesheet library does, only loading the images from a different source. You can refer to the source code for implementation details.
I’ve seen Shumway perform on the desktop, but I’ve never gotten any samples to work well on mobile. Do you think they’ve made more progress in this area? Unfortunately, I haven’t seen Shumway pass from “cool technical demo” to “productive for real projects” yet, though it seems to have so much potential
I agree, it’s not there yet. I have noticed a pretty large uptick in compatibility, which would be the first hurdle they’ll need to jump. The next will be performance. They are still working on compatibility for sure.
I am curious if an uncompressed (which can be gzipped by Apache, etc.) SWF is a viable format for shipping assets for HTML5, or if it would be better to use something else (SVGs, or something).
Since the “SWFLite” format is decomposed at compile-time, and not runtime, we have full control over the final format. At the moment, it saves images to separate PNGs, and saves a meta-data file which understands the MovieClip structure, and how (and if) that relates to the asset PNGs. It only exports the images referenced from symbols that have been “exported for ActionScript”, so it will not export unused objects from the library.
If using a single binary format would be better than using separate images, we could totally do that, though I figured that using separate images would work better for caching or the built in image loading behavior of the browser.
The “SWFLite” format in the SWF library does not export/support multiple MovieClip frames right now. The “SWF” format path does, and this code is largely the same as what SWFLite would need, and could be ported. The emphasis on the SWFLite library has been quality of reproducing single-frame layouts, first, and not strictly animation.
If anyone is interested in helping, I would be glad to make pointers, but I do not have the bandwidth (personally) to port SWFLite animation
Seeing that this thread was last updated in February, I just wanted to ask if anything has changed since then? Is there a way to export SWF with nested multiframe movieclips in the library (or other swfs there, embedded as MovieClips) into html5?
Hey, follow-up on this, SWF 2.x supports SWFLite with multiple frames, auto-play is disabled by default (because animating is not optimized to pool/re-use objects) but that functionality could be written or ported. It’s a step in the right direction
I’d definitely be interested in helping out with the SWFLite Library development, seeing as the HTML5 export functionality is very interesting. The multi-frame functionality does not seem to be working for me after grabbing an update on the whole OpenFL stack (SWF lib is at 2.0.2 right now), so I guess I will have to get over that first :S
You wouldn’t happen to have any working samples would you?
Hey Joshua, I haven’t looked at the OpenFL code yet, but I have some game dev experience and I would be interested in taking a look at the whole animated MovieClip + HTML5. Could you elaborate a bit about what is missing and how one would tackle that?