0
votes

i have saved my background as a swf file.

    [Embed(source="Back.swf")]
    private var SomeClass:Class;

Now inside the main class i added

addChild(SomeClass);

But i get this red problem :- Description Resource Path Location Type 1067: Implicit coercion of a value of type Class to an unrelated type flash.display:DisplayObject. Test.as /Test/src

1

1 Answers

0
votes

When you are using the addChild method, you need to parse there a DisplayObject type. in this case your SomeClass is Class type.

try:

addChild ( new SomeClass () );

or

addChild ( new SomeClass () as MovieClip );