Try

_myBG = new instead of myBG = new


Cor wrote:
Hi list,

I have a library.swf with a movie clip Background_mc in the library
I am trying to embed from this swf into another through a class.
In this  document class I do:
[Embed(source='library.swf'  symbol='Backgroud_mc')]
Private var Background_mc:Class;
Private var _myBG:MovieClip

Function init():void{
        myBG = new  Background_mc();
        addChild(myBG)
}

This throws an error:
TypeError: Error #1007: Instantiation attempted on a non-constructor.

What am I doing wrong?

No virus found in this outgoing message.
Checked by AVG. Version: 7.5.519 / Virus Database: 269.21.8/1340 - Release Date: 23-3-2008
18:50
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



--

Glen Pike
01736 759321
www.glenpike.co.uk <http://www.glenpike.co.uk>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to