Why casting failed when used swf loader
Any class common between flash swf file, loaded in swfloader turns our to throw error
开发者_Python百科TypeError: Error #1034: Type Coercion failed: cannot convert
media::PlayerContentView@12babac1 to media.PlayerContentView.
My main swf has same class, since its been used by appplication all over, but when swfloader creates object of same name class, it adds 12babac1 to class name. and doesn't work for simple access of array values
public function get Current():media.PlayerContentView
{
return contentItems[VZPlay.CurrentIndex] as PlayerContentView;
}
where as this same code works very fine if Its just the child swf played on it own.
Found it myself, I just saw loadForCompatibility property for swfloader. scribd.com/doc/12990361/Developing-and-loading-subapplications URL may not work, the owner made it private, but setting this property to false make it work all fine. e.g.
精彩评论