I am trying to create a dynamic class from a symbol in an embedded swf, basically I need to be able to add arbitrarily named properties for some exciting math, but it appears the only way is to create a dynamic class.
[Bindable]
[Embed(source='ExternalAssets/Assets.swf', symbol="assetName")]
private var AssetNameObject:Class;
var obj:Object = new AssetNameObject();
obj.someDifferentProperty = someValue;
This is throwing an error of “cannot add property ‘someDifferentProperty’ to object”
Is this even possible?
What you are trying to achieve is not possible. You have already found the only way of doing it which is to add a movieclip as its parent and attaching the dynamic properties to the movieclip.
If you could explain in more detail what exactly you are trying to achieve.. maybe someone can suggest an alternate way of doing it without the dynamism.
The best perhaps you can do is to check whether the object is dynamic which can be achieved as given by this post here.