?
Solved

MAKE LINE GROW DIAGONALLY

Posted on 2003-11-01
11
Medium Priority
?
758 Views
Last Modified: 2008-02-01
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
Comment
Question by:madasczik
[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
11 Comments
 
LVL 27

Expert Comment

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

Author Comment

by:madasczik
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

by:negatyve
ID: 9664728
ok, could you post your fla (to avoid starting to create the example from scratch)?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:madasczik
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

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

Accepted Solution

by:
negatyve earned 2000 total points
ID: 9668182
htm: http://www.negatyve.com/EE/wboe_map_links/wboe_map_links.html
fla: http://www.negatyve.com/EE/wboe_map_links/wboe_map_links.zip

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

Author Comment

by:madasczik
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

by:negatyve
ID: 9668288
;)
0
 

Author Comment

by:madasczik
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

by:madasczik
ID: 9676379
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

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. …
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.
Suggested Courses
Course of the Month9 days, 5 hours left to enroll

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

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

Join & Ask a Question