[Tools][Expand/Collapse All]Note that automatic extraction of ActionScript 3 is still pretty much unsupported by swfchan. AS1/AS2 works okay most of the time.Combined Code (1.58 KiB) ●
frame 1 {
distx = 0;
disty = 0;
ax = 0;
ay = 0;
collide = 0;
distxb = 0;
distyb = 0;
axb = 0;
ayb = 0;
collideb = 0;
randPos = Math.floor(Math.random() * 491) + 10;
Mouse.hide();
startDrag(atom, true);
onEnterFrame = function () {
distx = atomgood._x - atom._x;
disty = atomgood._y - atom._y;
txt_mass.text = atom._width;
if (atom.hitTest(atomgood)) {
atom._width += atomgood._width / 2;
atom._height += atomgood._width / 2;
atomgood._x = randPos - 500;
atomgood._y = randPos - 500;
}
if (distx >= 100 or disty >= 100 or distx <= -100 or disty <= -100) {
ax = distx / (1500 / atom._width);
ay = disty / (1500 / atom._width);
atomgood._x -= ax;
atomgood._y -= ay;
} else {
ax = distx / (500 / atom._width);
ay = disty / (500 / atom._width);
atomgood._x -= ax;
atomgood._y -= ay;
}
distxb = atombad._x - atom._x;
distyb = atombad._y - atom._y;
if (atom.hitTest(atombad)) {
atom._width /= 2;
atom._height /= 2;
atombad._x = randPos - 600;
atombad._y = randPos + 1200;
}
if (distxb >= 100 or distyb >= 100 or distxb <= -100 or distyb <= -100) {
axb = distxb / (1500 / atom._width);
ayb = distyb / (1500 / atom._width);
atombad._x -= axb;
atombad._y -= ayb;
} else {
axb = distxb / (500 / atom._width);
ayb = distyb / (500 / atom._width);
atombad._x -= axb;
atombad._y -= ayb;
}
};
}
movieClip 2 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 4 {
}
movieClip 6 {
}
// unknown tag 88 length 63