Copy link to clipboard
Copied
Animate CC as3.0 [Mouse range] Problem
//=============================
stage => (0,0,720,480)
wantRectangle => (200,420,380,480)
var r:Number = 100;
MovieClib.bar.addEventListener(MouseEvent.MOUSE_UP, prg);
MovieClib.bar.startDrag(true, new Rectangle(0, 0, r, 0));
stage.addEventListener(MouseEvent.MOUSE_UP, prg);
When I run this, other buttons outside the "wantRectangle" range cause problems
(Example, the problem of intermittent interruption when playing music, etc.)
Query how to execute "prg" on stage scope within wantRectangle scope
thank you
Copy link to clipboard
Copied
when you run what? (what you showed is pseudo-code with typos, isn't it?)
and what problems with "other buttons" do you have?
and is wantRectangle as movieclip with its parent the stage and prg is encoded on the main timeline?
if yes to everything, then
parent.prg() or this.parent.prg() would execute prg from the wantRectangle timeline.
Copy link to clipboard
Copied
Thank you
When "MOUSE_UP" is performed only within the "wantRectangle" range
I want to know how the "prg" function is executed
Copy link to clipboard
Copied
i'm not sure what exactly you want but the event properties will tell you which object is dispatching the event and the mouse's location.