I have an FLA that “erases” an image to reveal something below, at which point the cursor (an eraser bitmap) needs to be released in order for the user to use it to click a print button. You can click the print button with the erase function cursor, but I feel like it is not good user interface. The AS below should delete the eraser cursor and advance to another frame but it isn’t.
stop();
Mouse.hide();
this.createEmptyMovieClip("maskMC_mc", this.getNextHighestDepth());
floorLogoPic_mc.setMask(maskMC_mc);
//
this.createEmptyMovieClip("cursorHolder_mc", this.getNextHighestDepth());
cursorHolder_mc.attachMovie("customCursor_mc", "customCursor_mc", this.getNextHighestDepth());
cursorHolder_mc._x = _level0._xmouse;
cursorHolder_mc._y = _level0._ymouse;
//
floorLogoPic_mc.clickEnter_btn.onRelease = function() {
//trace("getURL call");
//getURL("http://www.yahoo.com/", "_self");
trace("maskMC_mc before removeMovieClip = "+maskMC_mc);
maskMC_mc.removeMovieClip();
trace("maskMC_mc after removeMovieClip = "+maskMC_mc+" = its been deleted");
delete _level0.onMouseMove;
trace("onMouseMove = "+_level0.onMouseMove);
trace("cursorHolder_mc before removeMovieClip = "+cursorHolder_mc);
cursorHolder_mc.removeMovieClip();
trace("cursorHolder_mc after removeMovieClip = "+cursorHolder_mc+" = its been deleted");
Mouse.show();
trace("gotoAndStop(print)");
_level0.gotoAndStop("print");
};
//
var i:Number = 0;
function attachShape() {
i++;
var mc:MovieClip = maskMC_mc.attachMovie("customBrush", "customBrush", i);
mc._x = _level0._xmouse;
mc._y = _level0._ymouse;
mc._xscale = Math.random()*120+50;
mc._height = mc._xscale;
mc._rotation = Math.random()*360+35;
}
//
this.onMouseMove = function() {
attachShape();
cursorHolder_mc._x = _level0._xmouse;
cursorHolder_mc._y = _level0._ymouse;
updateAfterEvent();
};