Your empty_mc.addChild(firstImage) is right... what you're missing is
that this line:

addChild(firstImage);

should be:

addChild(empty_mc);

HTH,
  Ian

On Fri, Dec 12, 2008 at 5:10 PM, William Adams <[email protected]> wrote:
> I'm trying to create a new project in ActionScript 3 in Flash CS3. I have
> the code:
>
> var firstImage:Loader = new Loader();
> var empty_mc:MovieClip=new MovieClip();
> var url:URLRequest = new URLRequest();
>
> addChild(firstImage);
> url = new URLRequest("test.jpg");
> firstImage.load(url);
> firstImage.x = 10;
> firstImage.y = 10;
> //empty_mc.addChild(firstImage);
> //empty_mc.x = 150;
> //empty_mc.alpha = 50;
>
> stop();
>
> and it works until I uncomment the empty_mc stuff --- what I want to do is
> put firstImage into a movieclip so that I can control its yscale, alpha &c.
> for animation purposes, but I'm just not getting how one does this.
>
> I've tried lots of variations:
>
> empty_mc.addChild(new MovieClip(firstImage));
>
> empty_mc.addChild(firstImage) as MovieClip;
>
> and other variations I should probably be embarrassed to show --- how does
> one load an image (eventually from a server) into a movie clip?
>
> William
>
> --
> William Adams
> senior graphic designer
> Fry Communications
>
>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to