Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 02-25-2005, 08:08 PM   #1
Registered User
Join Date: Apr 2004
Posts: 56
Default masking problem

Hey guys,

heres the problem im working on. I have a layer(graphic) which gets "erased"(coved up) by clicking and holding down the mouse.

and I have a custom mouse cursor.

The problem is when you "erase" it creates a mask which also covers the custom mouse cursor.

Everything is perfect except i want the mouse cursor to not be affected by the mask or have it be above the mask which is created.

Anyone know how to fix it? I cant seem to figure it out.


ActionScript Code:
L = {}; L.onMouseMove = function() {         My_mc._x = _xmouse;         My_mc._y = _ymouse;                 updateAfterEvent(); }; Mouse.hide(); Mouse.addListener(L); paint_mode = "erase"; i = 0; this.onEnterFrame = function() {     if (pr) {         if (paint_mode == "paint") {             this["mc"+i].lineTo(_xmouse, _ymouse);         } else {             m = this["mc"+i];             n = random(10000);             m.attachMovie("dot", "dot"+n, n);             m["dot"+n]._x = _xmouse;             m["dot"+n]._y = _ymouse;         }     } }; this.onMouseDown = function() {     i+=2;     pr = true;     this.createEmptyMovieClip("mc"+i, i);     this["mc"+i].lineStyle(10, 0xFFFFFF, 100);     this["mc"+i].moveTo(_xmouse, _ymouse);     if (paint_mode == "erase") {         attachMovie("pic", "pic"+i, i+1);         this["pic"+i].setMask(this["mc"+i]);     } }; this.onMouseUp = function() {     pr = false; }; b_paint.onRelease = function() {     paint_mode = "paint"; }; b_erase.onRelease = function() {     paint_mode = "erase"; };

Last edited by dBS; 02-25-2005 at 08:23 PM.
dBS is offline   Reply With Quote
Old 02-25-2005, 08:48 PM   #2
Xeef's Avatar
Join Date: Aug 2004
Location: Ibiza/Spain language :Hungarian/German/ abit English
Posts: 6,539

My_mc.swapDepths(15000) //or what ever number as long it's hight enougth

test your self -->http://www.actionscript.org/forums/s...86&postcount=8
Xeef is offline   Reply With Quote
Old 02-25-2005, 09:05 PM   #3
Registered User
Join Date: Apr 2004
Posts: 56

nice... thanks man.
dBS is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 11:17 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.