- alpha is a number from 0 to 1
- you can also apply the Xscale/,Yscale/ and alpha directyly on the
firstimage Loader
Latcho
William Adams 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
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders