StageObserver error when loading Sprite from new SWF
[Fault] exception, information=TypeError: Error #1034: Type Coercion failed: cannot convert MC{com.lalala.me::ClassName@73af301 com.lalala.me::ClassName/constructor()}@10d1edc1 to Class.
I get this error when I try to add my loaded swf as a child.
error is in Line 103 in StageObserver
const type:Class = view['constructor'];
here it gets that error.
does it matter that my constructor method is overriden in my
mail class of the SWF?
SWF root is Sprite, and not a MC
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Ondina D.F. on 21 Sep, 2013 12:56 PM
Hi Matej,
I have no idea what's causing the error just from looking at it.
Somewhere in your code there must be an implicit or explicit type conversion going wrong.
I don't think that overriding the constructor is a problem per se. What kind of a class is the base class?
Are you by any chance loading third-party assets or embedding some images with an incorrect type?
Taking a wild guess : in your code or in a third-party code, something that is added to the stage has been cast to the wrong data type.
Loading an asset like this:
will result in similar error as yours.
This would work:
Also, possibly not really related, but who knows, maybe it has to do with the ApplicationDomain..
See this:
http://www.senocular.com/flash/tutorials/contentdomains/?page=2
Look for Same-definition Collisions
That's all I can help you with, sorry.
Ondina
Ondina D.F. closed this discussion on 11 Oct, 2013 08:54 AM.