I havent done any actionscript in ages so I wrote some last night for something Im building. It all worked apart from the easiest bit. Even now when I'm not tired I can't see where I'm going wrong.
I have a movieclip and I only want it to drag if Bar = 1 but even when I define Bar as 2 before the if statement it still moves.
Code:onClipEvent(load){
Bar = 2;
if(Bar = 1){
startDrag(this);
}
}
It always drags even if bar = 2, any ideas?

