addChild(empty_mc);
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of William
Adams
Sent: vrijdag 12 december 2008 18:10
To: Flash Coders List
Subject: [Flashcoders] AS3 - load an external graphic into a movieclip?
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
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.176 / Virus Database: 270.9.17/1845 - Release Date: 12-12-2008
9:02
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders