- Forums
- »
- General Discussion
- »
- Does NME (or haxe?) support importing resources from an SWC file?
|
Viewing 1 to 15 (15 Total) Does NME (or haxe?) support importing resources from an SWC file? |
|
|---|---|
mlopesTotal Posts: 42
Joined: November 20, 2011
|
From what I read about haxe it doesn't support it, but it supports SWF, although it won't compile for platforms other than flash. Does NME implement any way to import resources from an SWC or SWF file, and if so, does it keep compatibility between different targets?
Tags:
Posted on December 21, 2011 at 11:25 AM
|
singmajestyTotal Posts: 2140
Joined: August 25, 2011
|
Re: Does NME (or haxe?) support importing resources from an SWC file?You can add a -swf-lib flag to embed assets from an external SWF file. An SWC is actually a ZIP which contains a SWF inside. You can only use this for the Flash target, so the best way to include cross-platform assets is through images and sprite sheets. One of the things we are brainstorming are ways to improve the workflow, so it would be great if you had any suggestions or ideas
Posted on December 21, 2011 at 12:04 PM
|
mlopesTotal Posts: 42
Joined: November 20, 2011
|
Re: Does NME (or haxe?) support importing resources from an SWC file?Hi,
Posted on December 21, 2011 at 4:21 PM
|
singmajestyTotal Posts: 2140
Joined: August 25, 2011
|
Re: Does NME (or haxe?) support importing resources from an SWC file?These are two other ways you may be able to handle it:
Posted on December 21, 2011 at 4:52 PM
|
mlopesTotal Posts: 42
Joined: November 20, 2011
|
Re: Does NME (or haxe?) support importing resources from an SWC file?The first solution, mixed with the already existing if and unless seem good. To me it seems cleaner and more elegant that the second one and prevents those issues from slipping into the code of our application and causing us to be writing code not for what we want to do but to solve platform problems.
Posted on December 21, 2011 at 5:14 PM
|
HugeTotal Posts: 547
Joined: October 07, 2011
|
Re: Does NME (or haxe?) support importing resources from an SWC file?Hi,
Posted on December 21, 2011 at 7:25 PM
|
mlopesTotal Posts: 42
Joined: November 20, 2011
|
Re: Does NME (or haxe?) support importing resources from an SWC file?Didn't knew about gm2d library, but the question here is, how ready/stable and how fast is it? Games usually need a quite large number of images, won't that take to long to convert and won't it force the resulting png's to be all in memory at the same time?
Posted on December 22, 2011 at 1:15 AM
|
ahollaTotal Posts: 31
Joined: November 03, 2011
|
Re: Does NME (or haxe?) support importing resources from an SWC file?Can you use "-swf-lib" with NME, if so how? In FlashDevelop would it be in "Pre-Build Command Line or though Additional Compiler Options?
Posted on December 22, 2011 at 4:14 AM
|
postiteTotal Posts: 39
Joined: October 02, 2011
|
Re: Does NME (or haxe?) support importing resources from an SWC file?there is something on the way from philippe priou apparently
Posted on December 22, 2011 at 6:11 AM
|
singmajestyTotal Posts: 2140
Joined: August 25, 2011
|
Re: Does NME (or haxe?) support importing resources from an SWC file?aholla:
Posted on December 22, 2011 at 10:05 AM
|
ahollaTotal Posts: 31
Joined: November 03, 2011
|
Re: Does NME (or haxe?) support importing resources from an SWC file?@singmajesty Thanks for the info, you've actually just solved another of my problems! Also I have implemented your version of Box2D, thanks for the port, I am currently testing a few different engines, so far I prefer Box2D over Physaxe (documentation is better and the speed is quite similar) and I am currently testing Nape, so far it's faster in my tests but I can't get it to do anything in javascript.
Posted on December 22, 2011 at 11:00 AM
|
crayfellowTotal Posts: 204
Joined: November 28, 2011
|
Re: Does NME (or haxe?) support importing resources from an SWC file?Should SWF/SWC assets work with the html5 (leash) target as well? I have seen from the old haXe list (http://haxe.1354130.n2.nabble.com/NME-Using-SWF-td6871223.html) that this is to work with flash and cpp targets, but I have not seen html5 discussed. I had played with gm2d and I know its swf support has been integrated into NME, but gm2d did not generally have provisions for html5.
Posted on January 03, 2012 at 7:18 PM
|
singmajestyTotal Posts: 2140
Joined: August 25, 2011
|
Re: Does NME (or haxe?) support importing resources from an SWC file?I didn't mention HTML5, because I'm not sure how byte manipulation works in Javascript. Can you read or write binary formats directly?
Posted on January 03, 2012 at 7:28 PM
|
crayfellowTotal Posts: 204
Joined: November 28, 2011
|
Re: Does NME (or haxe?) support importing resources from an SWC file?Ah OK, makes sense.
Posted on January 03, 2012 at 7:37 PM
|
grumpytoadTotal Posts: 63
Joined: November 21, 2011
|
Re: Does NME (or haxe?) support importing resources from an SWC file?jeash handles Binary data using normal arrays, implements the IEEE754 RFC to emulate doubles, and works around 31-bit Integer operations.
Posted on January 07, 2012 at 2:28 PM
|
