Hi,
I have read the post:
http://www.aspose.com/community/forums/thread/199042/change-a-sprite-in-swf.aspx
It works fine in some situation.
But if the new sprite include another sprite 's reference, it will fail.
In the sample code in above link,it use the following code to insert the object to destination swf,
if (flashObject != null && flashObject.Type != BaseObjectType.DefineSprite)
{
....
flash2.Objects.Insert(targetIndex++, flashObject);
}
so,definesprite object would not be inserted.
I try to edit this line as : if (flashObject != null ) //&& flashObject.Type != BaseObjectType.DefineSprite), but got another kind of error
For example, I want to replace one of sprite in swf file A with file B's sprite. ( The attachment swf file is sample of B.)
if I using sprite 14 in B , it is ok, because the shape13 and bitmap 12 is inserted, but if using the sprite 18, a "keynotfoundexception" thrown,because sprite 17 is not included..
Would you pleae tell me how can I resolve the problem?
Thanks a lot.