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
Solved

MAKE LINE GROW DIAGONALLY

Posted on 2003-11-01
11
750 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
  • 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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 

Author Comment

by:madasczik
ID: 9664734
0
 

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 500 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
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.

829 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