Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-07-2008, 08:28 PM   PM User | #1
neo_philiac
Regular Coder

 
Join Date: Jul 2006
Posts: 138
Thanks: 3
Thanked 0 Times in 0 Posts
neo_philiac is an unknown quantity at this point
Wrong line height

Hello I am having a simple problem

Code:

	  var rectHeight = 37;
	  
	  var rectWidth = 37;

		tmp_big.lineStyle(rectWidth,color_tmp,100,true,"none","square", 1);
	  	tmp_big.moveTo(0, (rectHeight));
	  	tmp_big.lineTo(0, (-(rectHeight)));
	  	tmp_big._x = (Stage.width-1280)+ 640; // Just trying to put the shape in a certain position
		tmp_big._y = Stage.height/2;  // Change registration point
The width is perfect when i draw the line but the height is 3 times 37. What am i doing wrong?
neo_philiac is offline   Reply With Quote
Old 05-12-2008, 03:36 AM   PM User | #2
gnomeontherun
Senior Coder

 
gnomeontherun's Avatar
 
Join Date: Sep 2007
Location: Houston
Posts: 2,846
Thanks: 10
Thanked 238 Times in 229 Posts
gnomeontherun will become famous soon enoughgnomeontherun will become famous soon enough
I think it has to do with your .lineTo.

What if
Code:
	  	tmp_big.moveTo(0, (rectHeight / 2));
	  	tmp_big.lineTo(0, (-(rectHeight / 2)));
Other wise your line is going 37 px above the origin and also 37 below I think.
gnomeontherun is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:11 PM.


Advertisement
Log in to turn off these ads.