Hello all.
I may very well be pushing my luck here but…
I have, with the greatly apprectiated help of ieatcotton, created a scene with randomly moving movie clips using:
onClipEvent (load) {
//data you may want to change
xstart = 0;
ystart = 125;
width = 600;
height = 220;
speed = Math.round(Math.random()*2)+1;
//initial positions
x = 567.8;
y = 316.6;
x_new = (Math.random()*width)+xstart;
y_new = (Math.random()height)+ystart;
}
onClipEvent (enterFrame) {
//x movement
if (x_new>this._x) {
sign_x = 1;
} else {
sign_x = -1;
}
dx = Math.abs(x_new-this._x);
if ((dx>speed) || (dx<-speed)) {
this._x += sign_xspeed;
} else {
x_new = (Math.random()width)+xstart;
}
//y movement
if (y_new>this._y) {
sign_y = 1;
} else {
sign_y = -1;
}
dy = Math.abs(y_new-this._y);
if ((dy>speed) || (dy<-speed)) {
this._y += sign_yspeed;
} else {
y_new = (Math.random()*height)+ystart;
}
}
Inside these movie clips I have a button that I would like to make open a pop-up window. I have tried using the code from tutorial http://www.kirupa.com/developer/mx/centered_popup.htm
but am having no joy at all.
Can this be done? And if so, if anyone could help me out I would be so grateful. I am definitely out of my depth here!
Thank you!
aubtin