 			
 			atf.position 	= 6;
 			
-			_atfFormat 		= atf.readUnsignedByte() & 3;
+			var formatByte 	: uint = atf.readUnsignedByte();
+			
+			_atfFormat 		= formatByte & 7;
 			_width 			= 1 << atf.readUnsignedByte();
 			_height 		= 1 << atf.readUnsignedByte();
 			_mipmap 		= atf.readUnsignedByte() > 1;

	 */
	public class TextureResource implements ITextureResource
	{
		private static const MAX_SIZE			: uint		= 2048;
		private static const TMP_MATRIX			: Matrix	= new Matrix();
		private static const FORMAT_BGRA		: String	= Context3DTextureFormat.BGRA
		private static const FORMAT_COMPRESSED	: String	= Context3DTextureFormat.COMPRESSED;
		
		private var _texture	: Texture		= null;
		private var _mipmap		: Boolean		= false;

			}
			else if (_atf)
			{
				_texture.uploadCompressedTextureFromByteArray(_atf, 0);
			}
		}
		
