Dave,
Try:
portfolio.x = 0;
portfolio.y = 0;
var child:DisplayObject=portfolio.getChildByName("a1");
child.x=150;
HTH,
Ian
On Wed, Apr 15, 2009 at 1:14 PM, Dav <[email protected]> wrote:
> Hi guys!
>
> I'm having a problem accessing movieclips within an embedded SWF.
>
> Here is some code:
>
> ...
> [Embed(source = 'portfolio.swf')]
> public var Portfolio:Class;
>
> public function Main()
> {
> var portfolio:* = new Portfolio();
> addChild(portfolio);
> portfolio.x = 0;
> portfolio.y = 0;
> portfolio.a1.x = 150; // Fails
> }
> ...
>
> portfolio.a1.x fails, even though there is a movieclip inside portfolio.swf
> called a1.
>
> ReferenceError: Error #1069: Property a1 not found on Main_Portfolio and
> there is no default value. at Main()[D:\Flash\NewProject\Main.as:19]
>
> Any ideas?
>
> Thanks in advance!
> Dav
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders