Pedro,

Is this what you're going for?


function attachMovies() {
    for (var i = 0; i<2; i++) {
        var mc =
canvas.attachMovie("code","code"+i,this.getNextHighestDepth());
        mc._x = Math.random()*500;
        mc._y = Math.random()*100;
    }
}



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Pedro
Kostelec
Sent: Wednesday, January 16, 2008 2:53 PM
To: Flash Coders List
Subject: [Flashcoders] placing mc on the stage

Hello
i got this code:

this.createEmptyMovieClip("canvas",this.getNextHighestDepth()); //creates an
empty MC in which i attach 2 textMCs
canvas._x = random500;//should place the MCs to a random position when they
load but it doesn't work?!?-----------------------------What is wrong here?
canvas._y = random100;

attachMovieInterval = setInterval(attachMovies, 200);//set interval for
green mc reload

function attachMovies() {
    for (var i = 0; i<2; i++) {
        canvas.attachMovie("code","code"+i,this.getNextHighestDepth());
        canvas.code1._x = random500;
        canvas.code1._y = random100;
        canvas.code2._x = Stage.width/2;
        canvas.code2._x = Stage.height/2;//how do i do to define the x and y
position of each mc separately?
    }
}

sorry for writing it so briefly. My keyboard doesn't work well and i cannot
type a lot
---------------------------------------------------------

-- 
Pedro D.K.
_______________________________________________
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