Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do I catch an On(release) without a button 1

Status
Not open for further replies.

Themuppeteer

Programmer
Apr 4, 2001
449
BE
Hello,

I have a button,when I click on it, my mouse changes into a filled rectangle (graphic) which I can move around then as it is my mouse. What I want to do is when I click somwhere on stage,the rectangle stays there and my mouse comes back.
Do I have to make a button as large as my stage to catch the on(release) ? or are there beter ways?
Waiting for your replies...
thnx.
Greetz,
muppeteer.gif

themuppeteer@hotmail.com

Don't eat yellow snow...
 
I managed to get it to work by putting the rectangle in a movieclip,and then inside that movieclip once again change the rectangle to a button and write the code for the
on(release), but I'm not really happy with this because a stupid rectangle should use recources as movieclip and graphic while it is only a graphic.
any reactions are very welcome. Greetz,
muppeteer.gif

themuppeteer@hotmail.com

Don't eat yellow snow...
 
How about an

onClipEvent(mouseDown){
//do stuff
}

...attached to a movieclip - this will catch a mouse click anywhere on stage without a button.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top