Napalm
04-02-2003, 06:34 AM
I have a polygon with draggable corners. On release it loads another page. Now the problem is that when a corner is dragged over another and is released it doesnt load the required page.
Do I need to do a hittest or can I simple disable the other MC's from being clickable to that point, and have them active again when the button is released?
// Reset to Initial Locations.
ResetArrayx = [_root.dot1._x, _root.dot2._x, _root.dot3._x, _root.dot4._x, _root.dot5._x, _root.dot6._x, _root.dot7._x, _root.dot8._x];
ResetArrayy = [_root.dot1._y, _root.dot2._y, _root.dot3._y, _root.dot4._y, _root.dot5._y, _root.dot6._y, _root.dot7._y, _root.dot8._y];
Reset.onPress = function() {
_root.dot1._x = ResetArrayx[0];
_root.dot2._x = ResetArrayx[1];
_root.dot3._x = ResetArrayx[2];
_root.dot4._x = ResetArrayx[3];
_root.dot5._x = ResetArrayx[4];
_root.dot6._x = ResetArrayx[5];
_root.dot7._x = ResetArrayx[6];
_root.dot8._x = ResetArrayx[7];
_root.dot1._y = ResetArrayy[0];
_root.dot2._y = ResetArrayy[1];
_root.dot3._y = ResetArrayy[2];
_root.dot4._y = ResetArrayy[3];
_root.dot5._y = ResetArrayy[4];
_root.dot6._y = ResetArrayy[5];
_root.dot7._y = ResetArrayy[6];
_root.dot8._y = ResetArrayy[7];
};
// Loads Cookie Variables
loadVariablesNum("cookies.asp", 0);
// Polygon constructor
MovieClip.prototype.drawQuad = function(p1, p2, p3, p4) {
with (this) {
moveTo(p1.x, p1.y);
lineTo(p2.x, p2.y);
lineTo(p3.x, p3.y);
lineTo(p4.x, p4.y);
lineTo(p1.x, p1.y);
}
};
// Navigation
// on Press
_root.dot1.onPress = function() {
this.startDrag();
};
_root.dot2.onPress = function() {
this.startDrag();
};
_root.dot3.onPress = function() {
this.startDrag();
};
_root.dot4.onPress = function() {
this.startDrag();
};
_root.dot5.onPress = function() {
this.startDrag();
};
_root.dot6.onPress = function() {
this.startDrag();
};
_root.dot7.onPress = function() {
this.startDrag();
};
_root.dot8.onPress = function() {
this.startDrag();
};
// On Release
_root.dot1.onRelease = function() {
this.stopDrag();
changed = true;
// loadVariablesNum("cookies.asp?cookiename=" add _root.dot1._x add "&" add _root.dot1._y add "&" add _root.dot2._x add "&" add _root.dot2._y add "&" add _root.dot3._x add "&" add _root.dot3._y add "&" add _root.dot4._x add "&" add _root.dot4._y add "&" add _root.dot5._x add "&" add _root.dot5._y add "&" add _root.dot6._x add "&" add _root.dot6._y add "&" add _root.dot7._x add "&" add _root.dot7._y add "&" add _root.dot8._x add "&" add _root.dot8._y, 0, "POST");
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=Home", "ContentPane", "POST");
};
_root.dot2.onRelease = function() {
this.stopDrag();
changed = true;
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=People", "ContentPane", "POST");
};
_root.dot3.onRelease = function() {
this.stopDrag();
changed = true;
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=Projects", "ContentPane", "POST");
};
_root.dot4.onRelease = function() {
this.stopDrag();
changed = true;
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=Software", "ContentPane", "POST");
};
_root.dot5.onRelease = function() {
this.stopDrag();
changed = true;
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=Troubleshooting", "ContentPane", "POST");
};
_root.dot6.onRelease = function() {
this.stopDrag();
changed = true;
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=Magazines", "ContentPane", "POST");
};
_root.dot7.onRelease = function() {
this.stopDrag();
changed = true;
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=Search", "ContentPane", "POST");
};
_root.dot8.onRelease = function() {
this.stopDrag();
changed = true;
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=Policies", "ContentPane", "POST");
};
// On Mouseover
_root.dot1.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "Home";
};
_root.dot2.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "People";
};
_root.dot3.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "Projects";
};
_root.dot4.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "Software Centre";
};
_root.dot5.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "Troubleshooting";
};
_root.dot6.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "Magazines & Library";
};
_root.dot7.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "Search";
};
_root.dot8.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "Policies & Procedures";
};
// On Rollout
_root.dot1.onRollOut = function() {
this.test = "";
};
_root.dot2.onRollOut = function() {
this.test = "";
};
_root.dot3.onRollOut = function() {
this.test = "";
};
_root.dot4.onRollOut = function() {
this.test = "";
};
_root.dot5.onRollOut = function() {
this.test = "";
};
_root.dot6.onRollOut = function() {
this.test = "";
};
_root.dot7.onRollOut = function() {
this.test = "";
};
_root.dot8.onRollOut = function() {
this.test = "";
};
// Original Code to make all dragable.
//
// for (n=1; n<=4; n++) {
// _root["dot" + n].onPress = function() {
// this.startDrag();
// }
// _root["dot" + n].onRelease = function() {
// this.stopDrag();
// changed = true;
// }
// };
changed = true;
_root.onEnterFrame = function() {
if (changed == true) {
this.clear();
// this.beginFill (0x33DD00);
this.lineStyle(1, 0x666666);
// First Polygon
a = {x:dot1._x, y:dot1._y};
b = {x:dot2._x, y:dot2._y};
c = {x:dot3._x, y:dot3._y};
d = {x:dot4._x, y:dot4._y};
// Second Polygon
e = {x:dot5._x, y:dot5._y};
f = {x:dot6._x, y:dot6._y};
g = {x:dot7._x, y:dot7._y};
h = {x:dot8._x, y:dot8._y};
this.drawQuad(a, b, c, d);
this.drawQuad(e, f, g, h);
// this.endFill();
// changed = false; //if you want it to draw only after the drag uncomment this line
}
};
Do I need to do a hittest or can I simple disable the other MC's from being clickable to that point, and have them active again when the button is released?
// Reset to Initial Locations.
ResetArrayx = [_root.dot1._x, _root.dot2._x, _root.dot3._x, _root.dot4._x, _root.dot5._x, _root.dot6._x, _root.dot7._x, _root.dot8._x];
ResetArrayy = [_root.dot1._y, _root.dot2._y, _root.dot3._y, _root.dot4._y, _root.dot5._y, _root.dot6._y, _root.dot7._y, _root.dot8._y];
Reset.onPress = function() {
_root.dot1._x = ResetArrayx[0];
_root.dot2._x = ResetArrayx[1];
_root.dot3._x = ResetArrayx[2];
_root.dot4._x = ResetArrayx[3];
_root.dot5._x = ResetArrayx[4];
_root.dot6._x = ResetArrayx[5];
_root.dot7._x = ResetArrayx[6];
_root.dot8._x = ResetArrayx[7];
_root.dot1._y = ResetArrayy[0];
_root.dot2._y = ResetArrayy[1];
_root.dot3._y = ResetArrayy[2];
_root.dot4._y = ResetArrayy[3];
_root.dot5._y = ResetArrayy[4];
_root.dot6._y = ResetArrayy[5];
_root.dot7._y = ResetArrayy[6];
_root.dot8._y = ResetArrayy[7];
};
// Loads Cookie Variables
loadVariablesNum("cookies.asp", 0);
// Polygon constructor
MovieClip.prototype.drawQuad = function(p1, p2, p3, p4) {
with (this) {
moveTo(p1.x, p1.y);
lineTo(p2.x, p2.y);
lineTo(p3.x, p3.y);
lineTo(p4.x, p4.y);
lineTo(p1.x, p1.y);
}
};
// Navigation
// on Press
_root.dot1.onPress = function() {
this.startDrag();
};
_root.dot2.onPress = function() {
this.startDrag();
};
_root.dot3.onPress = function() {
this.startDrag();
};
_root.dot4.onPress = function() {
this.startDrag();
};
_root.dot5.onPress = function() {
this.startDrag();
};
_root.dot6.onPress = function() {
this.startDrag();
};
_root.dot7.onPress = function() {
this.startDrag();
};
_root.dot8.onPress = function() {
this.startDrag();
};
// On Release
_root.dot1.onRelease = function() {
this.stopDrag();
changed = true;
// loadVariablesNum("cookies.asp?cookiename=" add _root.dot1._x add "&" add _root.dot1._y add "&" add _root.dot2._x add "&" add _root.dot2._y add "&" add _root.dot3._x add "&" add _root.dot3._y add "&" add _root.dot4._x add "&" add _root.dot4._y add "&" add _root.dot5._x add "&" add _root.dot5._y add "&" add _root.dot6._x add "&" add _root.dot6._y add "&" add _root.dot7._x add "&" add _root.dot7._y add "&" add _root.dot8._x add "&" add _root.dot8._y, 0, "POST");
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=Home", "ContentPane", "POST");
};
_root.dot2.onRelease = function() {
this.stopDrag();
changed = true;
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=People", "ContentPane", "POST");
};
_root.dot3.onRelease = function() {
this.stopDrag();
changed = true;
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=Projects", "ContentPane", "POST");
};
_root.dot4.onRelease = function() {
this.stopDrag();
changed = true;
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=Software", "ContentPane", "POST");
};
_root.dot5.onRelease = function() {
this.stopDrag();
changed = true;
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=Troubleshooting", "ContentPane", "POST");
};
_root.dot6.onRelease = function() {
this.stopDrag();
changed = true;
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=Magazines", "ContentPane", "POST");
};
_root.dot7.onRelease = function() {
this.stopDrag();
changed = true;
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=Search", "ContentPane", "POST");
};
_root.dot8.onRelease = function() {
this.stopDrag();
changed = true;
getURL("cookies.asp?Dot1x="+_root.dot1._x+"&"+"Dot1y="+_root.dot1._y+"&"+"Dot2x="+_root.dot2._x+"&"+"Dot2y="+_root.dot2._y+"&"+"Dot3X="+_root.dot3._x+"&"+"Dot3y="+_root.dot3._y+"&"+"Dot4x="+_root.dot4._x+"&"+"Dot4y="+_root.dot4._y+"&"+"Dot5x="+_root.dot5._x+"&"+"Dot5y="+_root.dot5._y+"&"+"Dot6x="+_root.dot6._x+"&"+"Dot6y="+_root.dot6._y+"&"+"Dot7x="+_root.dot7._x+"&"+"Dot7y="+_root.dot7._y+"&"+"Dot8x="+_root.dot8._x+"&"+"Dot8y="+_root.dot8._y, "", "POST");
getURL("../Main.aspx?pagetype=Policies", "ContentPane", "POST");
};
// On Mouseover
_root.dot1.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "Home";
};
_root.dot2.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "People";
};
_root.dot3.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "Projects";
};
_root.dot4.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "Software Centre";
};
_root.dot5.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "Troubleshooting";
};
_root.dot6.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "Magazines & Library";
};
_root.dot7.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "Search";
};
_root.dot8.onRollOver = function() {
this.stopDrag();
changed = true;
this.test = "Policies & Procedures";
};
// On Rollout
_root.dot1.onRollOut = function() {
this.test = "";
};
_root.dot2.onRollOut = function() {
this.test = "";
};
_root.dot3.onRollOut = function() {
this.test = "";
};
_root.dot4.onRollOut = function() {
this.test = "";
};
_root.dot5.onRollOut = function() {
this.test = "";
};
_root.dot6.onRollOut = function() {
this.test = "";
};
_root.dot7.onRollOut = function() {
this.test = "";
};
_root.dot8.onRollOut = function() {
this.test = "";
};
// Original Code to make all dragable.
//
// for (n=1; n<=4; n++) {
// _root["dot" + n].onPress = function() {
// this.startDrag();
// }
// _root["dot" + n].onRelease = function() {
// this.stopDrag();
// changed = true;
// }
// };
changed = true;
_root.onEnterFrame = function() {
if (changed == true) {
this.clear();
// this.beginFill (0x33DD00);
this.lineStyle(1, 0x666666);
// First Polygon
a = {x:dot1._x, y:dot1._y};
b = {x:dot2._x, y:dot2._y};
c = {x:dot3._x, y:dot3._y};
d = {x:dot4._x, y:dot4._y};
// Second Polygon
e = {x:dot5._x, y:dot5._y};
f = {x:dot6._x, y:dot6._y};
g = {x:dot7._x, y:dot7._y};
h = {x:dot8._x, y:dot8._y};
this.drawQuad(a, b, c, d);
this.drawQuad(e, f, g, h);
// this.endFill();
// changed = false; //if you want it to draw only after the drag uncomment this line
}
};