Question
if (condition) not working
Goal: To change the cursor to a custom cursor (mc:
drag_cursor), when the mouse is over the mc called "image_holder".
However I only want the cursor to change when certain files are
loaded into "image_holder".
Method:
onEnterFrame = function() {
if (menus.hitTest(_root._xmouse, _root._ymouse, true)) {
stopDrag;
drag_mouse._x = -100;
drag_mouse._y = -100;
}else{
if (content.image_holder.hitTest(_root._xmouse, _root._ymouse, true)) {
if (dragCursor = true) {
trace(dragCursor)
startDrag(drag_mouse);
drag_mouse._x = _root._xmouse;
drag_mouse._y = _root._ymouse;
}
}
}
}
Problem:
menus.hitTest - changes the cursor back when user mouses over the menu (works)
content.image_holder.hitTest - changes the cursor to the custom cursor when the user is mouse over "image_holder" (works)
if (dragCursor = true) { - condition that asks if the cursor should be change to "drag_cursor". dragCursor is set to true when the user clicks a certain button to load certain files into "image_holder". The problem is that the cursor changes before it is set to true even after I set it to false at the start of the movie.
Cheers
Method:
onEnterFrame = function() {
if (menus.hitTest(_root._xmouse, _root._ymouse, true)) {
stopDrag;
drag_mouse._x = -100;
drag_mouse._y = -100;
}else{
if (content.image_holder.hitTest(_root._xmouse, _root._ymouse, true)) {
if (dragCursor = true) {
trace(dragCursor)
startDrag(drag_mouse);
drag_mouse._x = _root._xmouse;
drag_mouse._y = _root._ymouse;
}
}
}
}
Problem:
menus.hitTest - changes the cursor back when user mouses over the menu (works)
content.image_holder.hitTest - changes the cursor to the custom cursor when the user is mouse over "image_holder" (works)
if (dragCursor = true) { - condition that asks if the cursor should be change to "drag_cursor". dragCursor is set to true when the user clicks a certain button to load certain files into "image_holder". The problem is that the cursor changes before it is set to true even after I set it to false at the start of the movie.
Cheers