Flex :: Math-related - Constructing Equilateral Triangle

Jan 6, 2010

I 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.

View 3 Replies


Similar Posts:


Flash :: Draw A Triangle In A Math Graph?

Mar 31, 2010

How to draw a triangle in a math graph which displays X and Y axis.

View 2 Replies

Flex :: Unable To Use NativeProcessInfo And Other Related Classes?

Jun 23, 2011

I have an AIR application in which I have to start some native applications in a windows machine.But the problem I am facing is that whenever I try to create a NativeProcess instance,I am getting a compiler error because NativeProcess is not getting imported into the project.I tried import flash.desktop.*; Even then no use.I have also added <supportedProfiles>extendedDesktop</supportedProfiles>
in the application descriptor file.I am using FlashBuilder 4 with Flex 4 SDK

View 1 Replies

ActionScript 2.0 :: Constructing Name Of A Movie Instance

Jul 22, 2004

I have a number of instances of the same movie in a frame. I have named all this instances using the form: movieclipname1, movieclipname2... movieclipnameN.I want to control everyone of them so i have to reference everyone of them using it's own name.Is it possible to use a loop where I will constructing the name of each movie ?[code]

View 6 Replies

ActionScript 2.0 :: Constructing The Name Of A Movie Instance?

Jul 22, 2004

I have a number of instances of the same movie in a frame. I have named all this instances using the form : movieclipname1,movieclipname2...movieclipnameN I want to control everyone of them so i have to reference everyone of them using it's own name. Is it possible to use a loop where I will constructing the name of each movie ? for example:

for (i=1; i++) {
with (movieclipname+1) {
play();
}
}

Is the above loop correct?

View 6 Replies

Flex :: Click On A Row In A DataGrid And Highlight All Related Rows?

Jul 1, 2010

how I can select a row in a datagrid in flex and have it highlight that row plus any related rows.Let me give you can example:Let's say that I have a datagrid. In the grid I have two columns for each row. One column has what type of car they own, and the other column has the owners name. Let's say that an owner has two cars. So you have a datagrid that looks like this (4 rows, 2 columns):if you click on the Camery row, the Jaguar row and the Camery row are both highlighted.I have a datagrid that has items, and has related items to its parent.

View 2 Replies

Flex :: How Is The Height Of A Component Related To Its Skin File

May 2, 2011

I have a panel with a custom skin whose height is smaller than its hostcomponent's height. When I layout this out in a vgroup, the component's size doesn't reflect the skin's smaller size.

Is there a way to completely delegate the size of a container to the skin class?

View 1 Replies

ActionScript 3 :: Flash - Math.floor Acting Like Math.round?

Mar 7, 2011

Here is the problem:

var p:int = 0;
var n:Number = 0;
n = 32.999999999999999;
p = Math.floor(n);
trace(p); // returns 33
n = 32.11111111111111;
p = Math.floor(n);
trace(p); // returns 32

I would expect both of these to return 32. I have searched, and it seems this is an unreported bug in AS3. Or ... am I doing something wrong?

View 4 Replies

ActionScript 3.0 :: Simulate Gravitational Acceleration By Constructing Function

Aug 9, 2010

Code:
package {
import flash.display.MovieClip;
import flash.events.TimerEvent;
import flash.utils.Timer;
public class Player extends MovieClip {
spawn();
[Code] .....

I'm trying to simulate gravitational acceleration by constructing a function that will subtract from the Player object's yVelocity every half a second. For now, I'm getting 1180: Call to a possibly undefined function spawn but I'm sure there are other things wrong with the code.

View 2 Replies

ActionScript 2.0 :: Constructing A Quiz Using Flash Learning Interactions?

Jan 22, 2009

I am looking at the creation of a quiz using the Learning Interactions in Flash.I noticed that when I place say a Multiple Choice question on the stage that the area which says 'Question will appear here' is a dynamic text field.This renders the final text bitmapped. Is there any way of getting the text to look like smooth like the rest of my work?I have tried to anti alias it for Animation and Readability but it doesn't change.nd in all honesty set against the rest of my work the text looks crap.

View 1 Replies

ActionScript 2.0 :: What Is The Diffrence Between Math.floor And Math.round

Sep 26, 2005

Wat is the diffrence between these two?

View 2 Replies

ActionScript 2.0 :: [F8] Math.round And Math.ceil?

Feb 16, 2009

I have a code in which I have to use Math.round if a certain value is for example 3.67 (67 is higher than 50) and Math.ceil if a value is for example 3.23 (23 is lower than 50). What can I do to make flash calculate if what after the dot �.� in 3.23 (for example) is higher than 50?

View 2 Replies

Flash :: Flex - What Are Possible Non-code-related Reasons For A Blank Screen In Builder 4.6 Design View?

Dec 13, 2011

I was editing a very basic mobile Flex project, and after I debugged the master (application) mxml file, Design View stopped working (blank screen displayed, no Design View errors) for all files. Creating new projects, either mobile or else, or testing old, working projects, doesn't work either. Out of the related issues I've found info on, most concern earlier versions of the IDE, and deal with either Design View errors (got none), use of certain functions or custom components (I get the error even on a new project), or are solved by changing styles back-and-forth (tried already, to no avail).

I can't drag and drop components to the design area, either (a "prohibited" symbol appears and nothing happens when I drop); so I'm pretty sure it's not code-related or a bug, but probably something stupid, like a configuration issue, so I definitely need someone to take a fresh look at it.

View 1 Replies

Flex :: Actionscript 3 - How To Use Math Mod Function

Aug 25, 2011

How to use math mod function in flex?

calculate like this 7 mod(%) 2 = 1

View 1 Replies

Flex :: Math - Rotate Point From A Given Center?

Jan 30, 2012

I'm trying to rotate a point in my Canvas from a given point (center). In my MouseDown handler, I save the point where user click (oldPos), and in my MouseMove handler, I'm doing this:

private function onMouseMove(event:MouseEvent):void
{
// Where the user pointer right now

[code]......

View 1 Replies

Actionscript 3 :: Math Inconsistencies - Build A Calculator In Flex?

Feb 6, 2010

I'm trying to build a calculator in Flex / actionscript 3 but have some weird results using the class Math :

trace(1.4 - .4); //should be 1 but it is 0.9999999999999999
trace(1.5 - .5); //should be 1 and it is 1
trace(1.444 - .444); //should be 1 and it is 1
trace(1.555 - .555); //should be 1 but it is 0.9999999999999999

I know there are some issues with floating point numbers, but as you can see, it should at least fail for all of my examples, am I right?How the problem is solved in other calculators and how should I proceed in order to build a usable calculator in Actionscript 3 .

View 3 Replies

Flex :: Math - Video Player - How Many Times It Has Played

Aug 24, 2010

I have a video player in flex which constantly plays a movie. Is there a way to see how many times it has played? So each time the movie is played, text filled populates with +1.

View 1 Replies

Flex :: Return Multiple Variables From Math-crunching AS3 Function?

Nov 9, 2011

I'm new to Actionscript programming. I'm trying to figure out what is the best way to return multiple variables, each having a different data type, from a function. For example, if a function needs to return variable aa ( a string) and variable bb (a number).

The function I'm using just crunches a lot of math, and doesn't relate to an object in a GUI. One method I got from a Google search used an Object, but as (I think) this requires me to create a class, I wondered if there was a simpler way. Since an array can hold elements of different data types, perhaps this is a simpler approach (?). [code]...

View 2 Replies

ActionScript 2.0 :: Math.min And Math.max?

Jan 16, 2004

So here is a piece of code that I have seen used a lot but don't really quite understand:

myVar = Math.min(Math.max(myVar, this.min), this.max);

or some variation thereof. I understand that the function first finds the maximum value of two values then turns around and uses that to find the minimum between two values.why this is done? And how do you know when to use it?

View 3 Replies

ActionScript 2.0 :: Math.min And Math.max

Jan 16, 2004

So here is a piece of code that I have seen used a lot but don't really quite understand:[code]or some variation thereof. I understand that the function first finds the maximum value of two values then turns around and uses that to find the minimum between two values.And how do you know when to use it?

View 3 Replies

ActionScript 2.0 :: How To Drag In A Triangle?

Feb 18, 2004

i want to drag my object, but the boundaries have to form a triangle and not the standard rectangle...

View 3 Replies

ActionScript 2.0 :: How To Drag In A Triangle

Feb 18, 2004

i want to drag my object, but the boundaries have to form a triangle and not the standard rectangle...

View 3 Replies

Draw A Triangle With Rounded Corners?

Nov 23, 2002

It's easy to draw a round cornered rectangle/square but how do you draw a triangle with rounded corners?

View 4 Replies

ActionScript 2.0 :: Calculate Angles Of A Triangle?

Mar 15, 2007

best 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 Replies

ActionScript 3.0 :: Find The Normal(x,y,z) For A 3d Triangle?

May 11, 2011

In 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 Replies

ActionScript 2.0 :: Height Being Drawn In A Triangle

May 16, 2005

I 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 Replies

ActionScript 2.0 :: Square 1 + Triangle 1 + Circle 1 = Movie 1 ?

Jan 30, 2009

I 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

View 10 Replies

ActionScript 3.0 :: Draggable Triangle With Interactive Corners

Jun 16, 2010

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 Replies

Professional :: Draw A Triangle For Instance With The Pen Tool

Apr 9, 2011

why 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 Replies

Actionscript 2.0 :: Display Coordinates Of A Random Triangle In It?

Apr 2, 2010

I wanna generate a random triangle with coordinates, which shows the arcs of each corner in actionscript 2.0 with flash 8.0.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved