Question
Can anyone explain the difference between these 2 versions?
I don't understand why Version 2 works and Version 1 does
not. Both are on the main timeline, however Version 2 nests one
clip inside the other. They both display correctly, however
mouse-dragging only works on the Version 2. The events don't get
fired for Version 1. Can anyone explain what's up?
Version 1:
this.createEmptyMovieClip("thisClip",getNextHighestDepth());
thisClip.loadMovie("man.swf");
thisClip.onPress = image_press;
thisClip.onRelease = image_release;
Version 2:
this.createEmptyMovieClip("thisClip",getNextHighestDepth());
thisClip.createEmptyMovieClip("man", thisClip.getNextHighestDepth());
thisClip .man.loadMovie("man.swf");
thisClip.onPress = image_press;
thisClip.onRelease = image_release;
The handlers are defined as simple calls to startDrag/stopDrag:
function image_press() {
this.startDrag(false);
trace("man press");
}
function image_release() {
this.stopDrag();
trace("man release");
}
Version 1:
this.createEmptyMovieClip("thisClip",getNextHighestDepth());
thisClip.loadMovie("man.swf");
thisClip.onPress = image_press;
thisClip.onRelease = image_release;
Version 2:
this.createEmptyMovieClip("thisClip",getNextHighestDepth());
thisClip.createEmptyMovieClip("man", thisClip.getNextHighestDepth());
thisClip .man.loadMovie("man.swf");
thisClip.onPress = image_press;
thisClip.onRelease = image_release;
The handlers are defined as simple calls to startDrag/stopDrag:
function image_press() {
this.startDrag(false);
trace("man press");
}
function image_release() {
this.stopDrag();
trace("man release");
}