Which one has a better approach when embedding assets

Sample code number 1:

var bitmapData:BitmapData = Assets.getBitmapData("assets/img/player.png");
var player:Bitmap;
player =  new Bitmap (bitmapData);
addChild (player);

Sample code number 2;

@:bitmap("assets/img/player.png")
class Player extends BitmapData { }
 var player =  new Bitmap (new Player(0, 0));
 addChild (player);

The number 1 sample is good on the memory side, Although, when i build it, the assets doesn’t include on Executable file standalone-(windows target). I would like to hear it from you guys. Which one is better?

I use 1st variant for all the assets and 2nd variant only for preloader.
Including all the assets in your .exe file (2nd variant) will make it huge.

If you don’t want to have all the assets open, so anyone can see/change them, you can pack everything in .swf (what will save some space as well) and have all the assets in 1 file.

Thanks, i get the idea of these two variants and 2nd variant is what a like about it, is that you were able to hide your assets to everyone.But the down side is that it will blow-up the file size of .exe,(not really sure if that is a downside at all) The plan is, i am going to optimize my all my assets on my final release,There are some tools out there that can squeeze the file image. Hope to see some Sample code of how to preload the 2nd variant… Thanks in advance.

i also found this link http://m.blog.csdn.net/article/details?id=38048563, Which i think is pretty good to start with…