Pd: uso adobe flash cs3
aca dejo el codigo por si alguien me puede ayudar a pasarlo a As2 .. aunque es muy largoo lo dejo porque necesito este efecto con urgencia y no se hacerlo por mi propia cuenta, espero me puedan recomendar alguna solucion practica apra pasar el codigo a AS2 gracias de antemano
// register root as environment
Object.environment = this;
Object.environment.fl=700;
Object.environment.maxDots = 12;
// create field onto which all dots will be attached
this.createEmptyMovieClip("field",1);
// center the field in the stage
this.field._x=600;
this.field._y=516;
// track the position of the mouse for eternity
this.onEnterFrame = function() {
// create a new dot if not yet at maximum
if (Object.environment.dotCount<Object.environment.maxDots) {
Object.environment.dotCount++;
makedot();
}
// user mouse transforms
angle += (this._xmouse-300)/400;
y = (this._ymouse569);
};
this.onMouseDown = function() {
// increase the maximum number of particles allowed
Object.environment.maxDots++;
};
stop()
-----------------------------
// create a single instance of the dot movieclip
function makedot() {
nombre="dot"+String(depth++);
neo = field.attachMovie("dot", nombre, depth);
neo.x=.250 * (random(Object.environment.fl*2)-Object.environment.fl);
neo.z=.25 * (random(Object.environment.fl*2)-Object.environment.fl);
}
-----------------------------
// start off invisible
this._alpha=0;
// set initial position
this.y = Object.environment.y;
this.yoffset = random(100);
this.angle = Object.environment.angle;
// get movin'
this.onEnterFrame = function() {
// calculate radian value
var rad = this.angle*Math.PI/180;
// calculate radial position
this.xpos = Math.sin(rad)*x+Math.cos(rad)*this.z;
this.zpos = Math.sin(rad)*z-Math.cos(rad)*this.x;
// calculate size
var scale = Object.environment.fl/(Object.environment.fl+this.zpos);
// set scren position
this._x = this.xpos*scale;
this._y = this.ypos*scale;
// set screen size
this._xscale = scale*100;
this._yscale = scale*100;
// one chance in 1000
if (!random(1000)) {
// time to float away
this.timeToExit=true;
}
if (this.timeToExit) {
// slowly levitate towards destruction
this.angle += (Object.environment.angle-this.angle)/25;
// acceleration
this.vy -= .2;
// adjust position by velocity
this.ypos += this.vy;
// fade out
this._alpha--;
// if all the way faded, decrement count and self-destruct
if (this._alpha<0) {
Object.environment.dotCount--;
this.removeMovieClip();
}
} else {
// slowly move towards global perspective
this.angle += (Object.environment.angle-this.angle)/25;
this.vy = (Object.environment.y-this.ypos+this.yoffset)/20;
this.ypos += this.vy;
// slowly fade in
if (this._alpha<100) {
this._alpha+=4;
}
}
};
