madasczik
asked on
MAKE LINE GROW DIAGONALLY
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.
Any help would greatly be appreciated and 500 points to the expert with the solution.
Sorry if I have already asked you, but: with flash 5 or flash mx?
ASKER
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 https://www.experts-exchange.com/questions/20785183/SWAP-FADE-IN-AN-OUT-SYMBOLS-ON-MOUSEOVER-AND-MOUSEOUT.html for 500 points as usual.
ok, could you post your fla (to avoid starting to create the example from scratch)?
ASKER
ASKER
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.
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.
no no, that's ok, i'm working on the example.. :)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
works great, its gonna look real good when i get the good images in there. thanks once again.
;)
ASKER
Can you comment the fla for me, its doing a lot in the main timeline, 500 points https://www.experts-exchange.com/questions/20786956/Please-Comment-This-FLA.html
ASKER
Wanna tweak it just a little bit https://www.experts-exchange.com/questions/20786986/How-do-I-fade-multiple-symbols-out-on-mouseover.html