[FlashCodersNY] Coercion
Steven.Penza at l-3com.com
Steven.Penza at l-3com.com
Fri May 15 08:15:54 PDT 2009
I've had this issue (Error 1034) before with an event class being
dispatched from a loaded SWF. The event class instance was being created
from the definition in a child domain of the current domain. When the
loader SWF received the event, it tried to coerce the type to a
different definition in the current domain.
The solution was to declare a variable of the event type in the loader
SWF. Then, when the external SWF is loaded, it will not create a
separate definition in the child domain. Just having a typed parameter
for an event handler in the loader SWF is apparently not enough.
Might or might not be the same problem... Good luck.
________________________________
From: flashcodersny-bounces at flashcodersny.org
[mailto:flashcodersny-bounces at flashcodersny.org] On Behalf Of Mario
Gonzalez
Sent: Friday, May 15, 2009 11:11 AM
To: 'This is the general mailing list for FlashCodersNY.org'
Subject: Re: [FlashCodersNY] Coercion
Well, previously this musicManController was part of the MusicMan game
(it's for the pbskids show website, "The Electric Company").
However now we have different MusicMan assets (intro/outtro dancing
animations re different) for each iteration (this weeks special letter
is.... E, R, H, and so on)
So now, I placed him in his own set of FLA's. He's still the same class,
as noted by:
screens.elements::MusicManController at 1c9ec581 to
screens.elements.MusicManController.
All the assets are on the same domain btw, and i once loaded I'm saying:
trace(_content.getChildAt(0)) //Outputs MusicManController
_musicMan = _content.getChildAt(0) as MusicManController //(It doesn't
look very elegent, but thats because I've trying remove any variables
that could be breaking it from the equation)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.flashcodersny.org/pipermail/flashcodersny_flashcodersny.org/attachments/20090515/04696552/attachment.html>
More information about the FlashCodersNY
mailing list