Thom Any | 5 Oct 2010 16:59
Picon
Favicon

include Bytearray

Does anybody know, when I include binary data, why the first two bytes dissapear?
Maybe there is something I'm doing wrong?
 
Im including a file as follows: (swfmill simple)
 <binary id="Game" import="game.mgx"/>
 
Then, I define the class: (haXe)
class Game extends flash.utils.ByteArray { public function new() { super(); } }
 
I create a new instance of this Class, and convert it to a ByteArray:
var _data:ByteArray = cast(new Game(), ByteArray);
 
When I read this _data, the first two bytes are not there.
 
Greetings,
Thomas

_______________________________________________
swfmill mailing list
swfmill@...
http://osflash.org/mailman/listinfo/swfmill_osflash.org
Robin Palotai | 5 Oct 2010 17:06
Picon
Gravatar

Re: include Bytearray

Which Haxe version? Could you send a small example swf-lib + compiled swf (separate the lib, and the compiled haxe-swf, to see where do the bytes get missed)?
Robin

2010.10.05. 16:59 keltezéssel, Thom Any írta:
Does anybody know, when I include binary data, why the first two bytes dissapear?
Maybe there is something I'm doing wrong?
 
Im including a file as follows: (swfmill simple)
 <binary id="Game" import="game.mgx"/>
 
Then, I define the class: (haXe)
class Game extends flash.utils.ByteArray { public function new() { super(); } }
 
I create a new instance of this Class, and convert it to a ByteArray:
var _data:ByteArray = cast(new Game(), ByteArray);
 
When I read this _data, the first two bytes are not there.
 
Greetings,
Thomas

_______________________________________________ swfmill mailing list swfmill-AOfRjkeVuXpAfugRpC6u6w@public.gmane.org http://osflash.org/mailman/listinfo/swfmill_osflash.org

_______________________________________________
swfmill mailing list
swfmill@...
http://osflash.org/mailman/listinfo/swfmill_osflash.org
Jan Flanders | 5 Oct 2010 17:23
Picon

Re: include Bytearray



2010.10.05. 16:59 keltezéssel, Thom Any írta:
Does anybody know, when I include binary data, why the first two bytes dissapear?



_______________________________________________
swfmill mailing list
swfmill@...
http://osflash.org/mailman/listinfo/swfmill_osflash.org
Thom Any | 5 Oct 2010 17:52
Picon
Favicon

Re: include Bytearray

Thank you Robin and Jan, for taking the time to answer me.
I've downloaded the latest version from SVN, and indeed: the problem is now dissapeared.
So the issue seemed to be haXe related, and not swfmill.
Greetings,
Thom

 

From: Jan Flanders <adnez7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: swfmill-AOfRjkeVuXpAfugRpC6u6w@public.gmane.org
Sent: Tue, October 5, 2010 5:23:51 PM
Subject: Re: [swfmill] include Bytearray



2010.10.05. 16:59 keltezéssel, Thom Any írta:
Does anybody know, when I include binary data, why the first two bytes dissapear?




_______________________________________________
swfmill mailing list
swfmill@...
http://osflash.org/mailman/listinfo/swfmill_osflash.org

Gmane