PDA

View Full Version : Error #1034 - why I'm getting this


maciej.m
11-19-2009, 12:22 PM
Hello,

I'm creating my second project with FPP and now I get errors which I didn't get before

1118: Implicit coercion of a value with static type flash.display : DisplayObject to a possibly unrelated type flash.display:MovieClip.

Code which is causing problem:

panorama=panoLoader.content;

So I have to do:

panorama=panoLoader.content as MovieClip

Ok, I can fix it like that for that now, but why?
What's wrong. In my first project I didn't get this error. What may be causing it?

--
Regards
MM

allSaints
11-19-2009, 01:04 PM
MM,

the content attribute does contain a DisplayObject, which you cannot declare yourself as it is an abstract class. I usually cast the things I get from content with just Object.


Tommy