Is it possible to create dynamic embed function in ActionScript3
for example like this
public function embedImage(path:String):Bitmap{
No, embed source is embedded at compile time. You can not embed anything at run time. That's what embed means, embedding during building the swf.