[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

MAKE LINE GROW DIAGONALLY

Posted on 2003-11-01
11
Medium Priority
?
760 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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

Independent Software Vendors: 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!

Question has a verified solution.

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

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
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…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

649 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