[Flashcoders] Help needed AS3 -- [Embed(source='library.swf' symbol='backgroud_mc')]

2008-03-24 Thread Cor
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

Re: [Flashcoders] Help needed AS3 -- [Embed(source='library.swf' symbol='backgroud_mc')]

2008-03-24 Thread Glen Pike
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

Re: [Flashcoders] Help needed AS3 -- [Embed(source='library.swf' symbol='backgroud_mc')]

2008-03-24 Thread Jon Bradley
On Mar 24, 2008, at 8:30 AM, Cor wrote: This throws an error: TypeError: Error #1007: Instantiation attempted on a non-constructor. What am I doing wrong? You can't call new Background_mc() when it's an instance of Class - there's no constructor for it that the compiler recognizes. My

Re: [Flashcoders] Help needed AS3 -- [Embed(source='library.swf' symbol='backgroud_mc')]

2008-03-24 Thread Glen Pike
Hi, When Embedding symbols in AS3, you do construct instances of your assets using new VariableName - http://www.bit-101.com/blog/?p=853 However, I don't think that the Flash IDE supports this as it does not support the [Embed] metadata type... The only way around this is to

Re: [Flashcoders] Help needed AS3 -- [Embed(source='library.swf' symbol='backgroud_mc')]

2008-03-24 Thread Jon Bradley
Oops... my last email was kinda based on the idea that you were running this in Flex. My bad - replying to two lists at once. http://www.digitalflipbook.com/archives/2007/03/associating_cus.php - jb On Mar 24, 2008, at 8:30 AM, Cor wrote: This throws an error: TypeError: Error #1007: