ActionScript 2.0 :: How To Drag In A Triangle?
Feb 18, 2004i want to drag my object, but the boundaries have to form a triangle and not the standard rectangle...
View 3 Repliesi want to drag my object, but the boundaries have to form a triangle and not the standard rectangle...
View 3 Repliesi want to drag my object, but the boundaries have to form a triangle and not the standard rectangle...
View 3 RepliesI want to do a triangle so when you drag the corners the sides and the angles alter and you can show the degrees and lengths. Just like this website.
[URL]
I want to do a triangle so when you drag the corners the sides and the angles alter and you can show the degrees and lengths. Just like this website.
[URL]
It's easy to draw a round cornered rectangle/square but how do you draw a triangle with rounded corners?
View 4 Repliesbest method to calculate the angles of a triangle? Or have any good references? I have 3 points which can be moved when the user drags on it, so the angles will have to change accordingly.
View 8 RepliesIn my quest to build a terrain with proper collision detection, I've reached another stalemate. What I need is to be able to find the normal(x,y,z) for a 3d Triangle. before I start to build everything from scratch, cross products and all that jazz. I want to check if someone's done this before or can give me their 2 cents of how to do this the best way.Given 3 verticles with (x,y,z): v1, v2, v3 How do I find the Normal(x,y,z)I'm using away broomstick, and as far as i can tell there's no support for normal calculation. You would think that .subGeometry.vertexNormalData returns the proper normal, but it doesn't.
View 14 RepliesI have this triangle drawn (see fla)(Got it from this forum). Now I want a height being drawn as well. I want a height from point A beeing drawn to BC The angle at BC must be 90 degrees of course and the height drawn must alter when I drag the points B and C. Is this possible to do in flash, I have seen it done in JAVA
View 3 RepliesI want to build a specifik thing in flash, and don't really know where to start.... Say I have:
3 images of 3 three different squares
3 images of 3 three different triangles
3 images of 3 three different circles
The first thing you see is Square 1, Triangle 1 and Circle 1. If you were to click on Choose Square, Square 2 will appare in Square 1s place. If you click on it one more time, Square 3 will appare, and then round again to Square 1. Same thing for all the shapes.When you're satisfied with your selection of shapes you click OK and then you get to see a movie, based on whatever choices you've made. Because there are 3 different shapes and 3 different objects within each category, there will be 9 different movies to watch (3x3=9).One example of how this could turn out is:
Square 1 + Triangle 1 + Circle 1 = Movie 1
Another one could be
Square 2 + Triangle 2 + Circle 2 = Movie 6
I am working on a draggable triangle in AS3 and the corners must be interactive. To each corner a bitmap will be attached (in my example for now it's just a name of a city). When dragging a specific corner, the bitmap/cityname (attached to it) should fade in from 0 to 100 alpha. If the bitmap/cityname won't reach 100 of alpha, when Mouse Up, then it should fade back out to 0 opacity. If it does reach 100 alpha when Mouse Up, then it should stay that way. However, if another corner is dragged, then the cityname which is currently at 100 opacity should fade out again. Well I've got the draggable triangle figured, I've got the corners citynames appearing and disappearing when they don't reach 100 alpha. What I can't get to figure out is the last bit - the cityname currently at 100 opacity fading back out to 0 when a different corner is dragged. Hope it's at least a little understandable. I'm not sure my code is perfect (this is my first time in AS3) so don't mind if something is not the way.[code]
View 3 Replieswhy do when I draw a triangle for instance with the pen tool, and then I rotate it with the free transform tool, so while I rotate the triangle, it is scaled and dissorted its shape, and it lengthen a little. And I don't know how to prevent it.
View 4 RepliesHow to draw a triangle in a math graph which displays X and Y axis.
View 2 RepliesI wanna generate a random triangle with coordinates, which shows the arcs of each corner in actionscript 2.0 with flash 8.0.
View 1 RepliesI have a big code, but essentially, this part comes to transformation of a BitmapData to triangle points, using affine transformation. Also - I know that BitmapData is rectangular - the last, fourth point of the transformation is just the first one reflected over the axis defined by the other two points.
A small thing so you can see which point is which one:
1........2
. / / / /|
./ / / /
. / / / |
./ / /
. / / |
./ /
. / |
./
3 - - - -4 - 4th point reflected
This whole process would come to scaling, rotating and skewing the BitmapData based on the angles between the points... But somehow my code still does not work. Looking at a similar thing in PaperVision 3D - still didn't work?
I am trying to draw a triangle and square using a movieclip that follows the pen of a line.It works, both triangle and square draw together. But I keep getting a flicker of a movieclip in the top left corner.
View 0 RepliesI am making a house with actionscript, and the roof is made by a triangle. I am supposed to change the triangle height (y-axis) using a slider.[code]...
View 9 RepliesIs there a simple way to draw a triangle with rounded corners in AS3?
View 1 RepliesDraw a Triangle with rounded corners?
View 2 RepliesI'm new to actionscript 2.0.I want to draw a triangle with an arc showing the angle of the triangle at each corners.I need this in actionscript 2.0.
View 3 Repliesi want to find third Point of Triangle i Have two point p1,p2 with respect to it i want to find third point of triangle
Note one thing triangle is 45 - 90 - 45 degree so the point i want to find is at 90 degree,
so as per my requirment p1 = 45 degree p2 = -45 degree and p3 = 90 degree so i want to find p3
There is some information but I couldn't figure it out:How can I detect if a line intersects with a triangle ? And how can I detect the point of intersection in AS3 ?
View 1 RepliesI am trying to construct an equilateral triangle with the following code, but I am not seeing what I would expect to. I would expect to see a triangle drawn to the stage, but I don't see one. I think there must be something wrong in terms of the location of the tri sprite on the screen.
[Code]...
UPDATE: I can now see the triangle but it is not filled in. It seems to have the generally-correct shape, but I would expect for it be 3 sided, rather than 4.
How to calculate the area of a triangle giving 3 (X, Y) points?
View 2 RepliesI set up a loop where a movie clip moves in a triangle over and over. It works, but I want it to pause for 5 seconds at each location, so I added a Timer (my first attempt). Now, it will go through the triangle once, pausing correctly, but then the main movie clip (target_mc) stops in the original position and never moves again.
Code:
import fl.transitions.*;
import fl.transitions.easing.*;
var xMove0:Tween;
var yMove0:Tween;
var xMove1:Tween;
[Code] .....
I have a music controller that I can turn on/off, but I would like to add a triangle slider volume control too and also set the default volume to be 50% so the users can choose if they want to turn it up/down.
View 1 RepliesI know the length of the triangle segments and the xy coordinates of two points. How do I figure out the xy of the 3rd point?
View 3 Repliesi want to finish it in the end! i have this code which generated 20 stars and an ai player collects all of them (going for the one which is closest to it). This code was courtesy of -lauri... the code was
ActionScript Code:
import flash.events.Event;
import flash.display.MovieClip;[code].........
what i have currently is a player who moves around with the arrow keys collecting stars which appear at random moments... i wanted to make it so that the ai can also collect these stars and i am pretty sure that the code for that would be linked to what.
whats the best way to restrict a draggable object to a non-rectangular shape (like triangle) I did it with hittest but i cant get it to go to the nearest point when the cursor is outside the shape...
View 5 RepliesTrying to draw a triangle and then fill the color inside using the paint tool. I am not able to fill any color inside. Made sure the lines are overlapping, tried using the fill large gaps, made sure alpha is set to 100%.
View 3 Replieshow i display the coordinates of a random triangle in a graph which ranges from -10 to +10 in XY axis with the points like A(2,1) etc with arcs in each corner, in actionscript 2.0
View 1 Replies