Windows

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsOperating SystemsWindows

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old October 27th, 2006, 04:24 AM
woopsedoo woopsedoo is offline
Contributing User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Dec 2005
Location: England
Posts: 175 woopsedoo New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via MSN to woopsedoo
Talking windows mouse box

i am trying to create the effect that you get on your desktop with windows where you press the mous and then drag the mouse and it creates a box, ive made some code but when you release the mouse the box is created again for some reason, could someone please correct this code :

Code:
x = 0;
y = 0;
onMouseDown = function () {
	x = _root._xmouse;
	y = _root._ymouse;
	createEmptyMovieClip("pen", 1);
	pen.lineStyle(1, 0x000000, 100);
	pen.moveTo(x, y);
	onEnterFrame = function () { x2 = _root._xmouse;y2 = _root._ymouse;};
	pen.lineTo(x2, y);
	pen.lineTo(x2, y2);
	pen.lineTo(x, y2);
	pen.lineTo(x, y);
	onMouseMove = function () { pen.removeMovieClip();createEmptyMovieClip("pen", 1);pen.lineStyle(1, 0x000000, 100);pen.moveTo(x, y);pen.lineTo(x2, y);pen.lineTo(x2, y2);pen.lineTo(x, y2);pen.lineTo(x, y);};
};
onMouseUp = function () {
	x = 0;
	y = 0;
	pen.lineStyle(1, 0xFFFFFF, 100);
	pen.removeMovieClip();
};


any help is appreciated
thanks
woopsedoo

Reply With Quote
  #2  
Old October 27th, 2006, 04:35 AM
woopsedoo woopsedoo is offline
Contributing User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Dec 2005
Location: England
Posts: 175 woopsedoo New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via MSN to woopsedoo
actualy dont worry ive done it

Code:
can = false;
onMouseDown = function () {
	can = true;
	x = _root._xmouse;
	y = _root._ymouse;
	createEmptyMovieClip("pen", 1);
	pen.lineStyle(1, 0x000000, 100);
	pen.moveTo(x, y);
	onEnterFrame = function () { x2 = _root._xmouse;y2 = _root._ymouse;};
	pen.lineTo(x2, y);
	pen.lineTo(x2, y2);
	pen.lineTo(x, y2);
	pen.lineTo(x, y);
	onMouseMove = function () { if (can) {pen.removeMovieClip();createEmptyMovieClip("pen", 1);pen.lineStyle(1, 0x000000, 100);pen.moveTo(x, y);pen.lineTo(x2, y);pen.lineTo(x2, y2);pen.lineTo(x, y2);pen.lineTo(x, y);}};
};
onMouseUp = function () {
	can = false;
	pen.removeMovieClip();
};

Reply With Quote
  #3  
Old October 28th, 2006, 07:13 AM
woopsedoo woopsedoo is offline
Contributing User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Dec 2005
Location: England
Posts: 175 woopsedoo New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via MSN to woopsedoo
how do i make the line a dotted line?

Reply With Quote
  #4  
Old October 28th, 2006, 11:22 AM
Corkysmurf Corkysmurf is offline
Contributing User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Aug 2006
Location: Ontario, Canada
Posts: 135 Corkysmurf New User: is a brand new recruit and a unknown entity at this point. 
Time spent in forums: 4 h 35 m 2 sec
Reputation Power: 0
Quote:
Originally Posted by woopsedoo;29071
how do i make the line a dotted line?


Isn't there a pen type that makes lines dotted?
__________________
Corkysmurf

Reply With Quote
  #5  
Old October 28th, 2006, 03:27 PM
L_Curtis L_Curtis is offline
Contributing User
Tutorialized Novice (500 - 999 posts)
 
Join Date: Jul 2006
Location: Texas
Posts: 729 L_Curtis User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 26 m 33 sec
Reputation Power: 14
Send a message via AIM to L_Curtis Send a message via MSN to L_Curtis
Yea there is a stroke style for when you are drawing lines but i couldnt find out how to do it with actionscript.

Reply With Quote
Reply

Viewing: Tutorialized ForumsOperating SystemsWindows > windows mouse box


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.

© 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap