Solved

# MAKE LINE GROW DIAGONALLY

Posted on 2003-11-01
753 Views
If I draw a diagonal line in flash and convert it to a symbol, how do I make its width grow to 100% on that angle. I have a map with  I would do it the easy way by tweening a blocker over it but the line is over an image and the blocker would be noticeable.  I will need to make a bunch of these growing lines at various angles.  Here's what I'm working on http://dev.fusionapps.com/wboe/flash/wboe_map_links2.html  The John F. Kennedy link is an example with a tweening blocker and want to replace with code.  I will need to do the same on the rest of the buttons.

Any help would greatly be appreciated and 500 points to the expert with the solution.
0
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• Learn & ask questions
• 6
• 5

LVL 27

Expert Comment

ID: 9664701
Sorry if I have already asked you, but: with flash 5 or flash mx?
0

Author Comment

ID: 9664721
This will be for MX, was using Flash 5 for a different project by request.  Might as well kill two birds with one stone, got an additonal question here http://www.experts-exchange.com/Web/WebDevSoftware/Flash/Q_20785183.html  for 500 points as usual.
0

LVL 27

Expert Comment

ID: 9664728
ok, could you post your fla (to avoid starting to create the example from scratch)?
0

Author Comment

ID: 9664734
0

Author Comment

ID: 9666967
Does this have anything to do with it, don't understand it completely, guess we need to calculate slope first, found this site:

http://www.kirupa.com/developer/actionscript/backface_culling.htm

Was able to get the code, maybe it can be modified to calculate the angles of drawn lines.:

function ()
{
return((b._y - a._y) / (b._x - a._x) - (c._y - a._y) / (c._x - a._x) < 0 ^ (a._x < b._x ^ a._x < c._x));
} // End of the function
isVisible = function ();
c.onPress = startDrag;
b.onPress = startDrag;
a.onPress = startDrag;
c.onRelease = stopDrag;
b.onRelease = stopDrag;
a.onRelease = stopDrag;
c.onReleaseOutside = stopDrag;
b.onReleaseOutside = stopDrag;
a.onReleaseOutside = stopDrag;
a.hitArea = a.dot;
b.hitArea = b.dot;
c.hitArea = c.dot;
this.onEnterFrame = function ()
{
this.clear();
this.lineStyle(2, 7829367, 100);
this.moveTo(c._x, c._y);
if (isVisible())
{
this.beginFill(16756655, 100);
} // end if
this.lineTo(a._x, a._y);
this.lineTo(b._x, b._y);
this.lineTo(c._x, c._y);
this.endFill();
} // End of the function

Also found this on expert exchange, this is not to clear either to me:

http://www.kirupa.com/developer/actionscript/backface_culling.htm

If you need more points, let me know and I'll start a new question.

Your help is unprecedented, thank you.
0

LVL 27

Expert Comment

ID: 9667523
no no, that's ok, i'm working on the example.. :)
0

LVL 27

Accepted Solution

negatyve earned 500 total points
ID: 9668182

you have to change imagesXX_mc on the main timeline, one for each button
0

Author Comment

ID: 9668275
works great, its gonna look real good when i get the good images in there.  thanks once again.
0

LVL 27

Expert Comment

ID: 9668288
;)
0

Author Comment

ID: 9676194
Can you comment the fla for me, its doing a lot in the main timeline, 500 points  http://www.experts-exchange.com/Web/WebDevSoftware/Flash/Q_20786956.html
0

Author Comment

ID: 9676379
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. â€¦
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and câ€¦
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
###### Suggested Courses
Course of the Month9 days, left to enroll

#### 738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.