The only thing I can think of is that it is most likely
a problem concerning the ApplicationDomain. You probably load the swf into
its own application domain, which means it will use the AbstractPreloader
class of the swf instead of the one in your main application. The solution
here would be to load the swf like this:

var context:LoaderContext = LoaderContext(false,
ApplicationDomain.currentDomain = null, SecurityDomain.currentDomain);

loader.load("my.swf", context);


Greetz Erik


On 1/18/08, Steven Sacks <[EMAIL PROTECTED]> wrote:
>
> I am loading in a SWF with a document class of PreloadPage, which
> extends AbstractPreloader. When I try to cast _loader.content as the
> super class, I get a coercion error.
>
> TypeError: Error #1034: Type Coercion failed: cannot convert
> [EMAIL PROTECTED] to com.gaiaframework.pages.AbstractPreloader.
>
> var _preloader:AbstractPreloader;
> _preloader = AbstractPreloader(_loader.content);
>
> public class PreloadPage extends AbstractPreloader implements IPreloader
> {
>
> public class AbstractPreloader extends AbstractBase implements IPreloader
> {
>
> Can somebody please explain why I can't cast a subclass as its parent
> class in this case?  This doesn't make sense to me...
>
> --
> Steven Sacks
> Flash Maestro
> Los Angeles, CA
> -
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to