ly one MC visible on the stage, whichi anasily place where i want.
> but
> > > > where is the other??
> > > >
> > > >
> > > > On 16/01/2008, Jim Robson <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Pedro,
>
t; > > where is the other??
> > >
> > >
> > > On 16/01/2008, Jim Robson <[EMAIL PROTECTED]> wrote:
> > > >
> > > > Pedro,
> > > >
> > > > Your loop goes from 0 to 1, and you are constructing the names of your
>
t; On 16/01/2008, Jim Robson <[EMAIL PROTECTED] > wrote:
> > > >
> > > > Pedro,
> > > >
> > > > Your loop goes from 0 to 1, and you are constructing the names of
> > your
> > > > movie
> > > > clips as &q
t; > > "code1".
> > > There is no such clip as "code2".
> > >
> > > -Jim
> > >
> > > -Original Message-
> > > From: [EMAIL PROTECTED]
> > > [mailto:[EMAIL PROTECTED] On Behalf Of Pedro
> > > Ko
t; > -Jim
> >
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of Pedro
> > Kostelec
> > Sent: Wednesday, January 16, 2008 7:21 PM
> > To: Flash Coders List
> > Subject: Re: [Flashcoders] plac
ilto:[EMAIL PROTECTED] On Behalf Of Pedro
> Kostelec
> Sent: Wednesday, January 16, 2008 7:21 PM
> To: Flash Coders List
> Subject: Re: [Flashcoders] placing mc on the stage
>
> Thanks for the reply. but it still doesn't work for me. I can only see
&g
lto:[EMAIL PROTECTED] On Behalf Of Pedro
Kostelec
Sent: Wednesday, January 16, 2008 7:21 PM
To: Flash Coders List
Subject: Re: [Flashcoders] placing mc on the stage
Thanks for the reply. but it still doesn't work for me. I can only see code1
moving randomly overthe stage, but thereis no sign o
Thanks for the reply. but it still doesn't work for me. I can only see code1
moving randomly overthe stage, but thereis no sign of code2 movie clip.
Here is a bigger peace of the code:
this.createEmptyMovieClip("canvas",this.getNextHighestDepth());//creates an
empty MC in which i attach 2 textMCs
Hi Pedro,
A couple of things:
Are you trying to place the MovieClips once in random places, or make
them move to random places? Your code suggests one-time placement. What
you say below suggests movement on the stage.
Also, have you checked your random calculations? If you divide (/)
Math.rand
sorry. I forgot to copy this.
random100=Math.random()/100;
random500=Math.random()/500;
- how do i do to define the x and y position of each mc separately?
I don't get it.. what do you want to do here?
what i want is to make one ofthose mcs moveup and downand the other
right-left. Theproblem is
You could also use random(500), but is deprecated -
http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary630.html
- how do i do to define the x and y position of each mc separately?
I don't get it.. what do you want to do here?
Leandro Ferreira
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: [EMAI
Hi Pedro,
Try this instead:
Math.random()*500;
Here's a simplistic but clear tutorial on the subject:
http://animation.about.com/od/flashanimationtutorials/ss/mathrandom.htm
hth,
Bob
Pedro Kostelec wrote:
Hello
i got this code:
this.createEmptyMovieClip("canvas",this.getNextHighestDepth());
13 matches
Mail list logo