Actionscript :: Assemble Array Of Continuous Points For A Contour Line Using Conrec

Mar 31, 2011

I am trying to implement contour lines in ActionScript using Conrec. I have looked at both the java and javascript implementation and am still stuck.URL...Conrec will take grid data and assemble continuous contour lines. The problem is that it does not necessarily draw those lines in a continuous fashion. For example, it will draw A->B and then C->B and then C->D instead of A, B, C, D, etc.The javascript implementation seems to be accounting for this and serializing the instructions into an array of draw points. Which is what I too want to accomplish in the end. That is it takes the instructions from the core Conrec logic (eg: A->B, C->B, C->D, etc) and organizes it into an A, B, C, D series. I think it will also return the series as a multi-dimensional array to accommodate broken lines (eg: [[A, B, C, D], [E, F, G]]). This last functionality is what I need to do in Actionscript.This last part is where I am stuck. Ignore Conrec for now (I have given up on finding an Actionscript implementation), how can I organize these instructions into a collection of serial points? When Conrec gives me "draw point from X->Y" how can I first check if X or Y are already in a series and append either X or Y (whichever is not in the series) into the series? AND if neither are in the series, start a NEW series with X, Y as the starting set. Then check subsequent instructions against all existing series and connect series if they now start and stop on the same point? Also, I need to be able to allow for a series to close itself (eg: A, B, C, A) -- a loop (is that even possible?!).

I'm not sure if there is a technical term for what I want to do beyond "concatenation". I also hope someone out there has done this with Conrec and can give me some pointers.In the meantime, I am going to continue to plug away at this and see if I can come up with something but I am not confident in my abilities.If you know another way to draw contour lines from grid data, I am open to alternatives. But I have to be able to implement it in Actionscript.

View 3 Replies


Similar Posts:


Draw A Continuous Curved Line From 3 Given Points At A Time?

May 10, 2011

I am trying to draw a continuous curved line in flash. There are many methods but none of the ones I have found so far quite fit my requirements. First of all, I want to use the flash graphic api's curveTo() method. I DO NOT want to simulate a curve with hundreds of calls to lineTo() per curved line segment. It is my experience and understanding that line segments are processor heavy. Flash's quadratic bezier curve should take less CPU power. [code]...

View 3 Replies

Actionscript 3 :: Calculating Evenly Distributed Points On A Line Of Points

Oct 3, 2011

I have been tasked with trying to create a drawing tool that draws dotted lines as you drag the mouse across the stage. I can easily capture the points on MouseEvent.MOUSE_MOVE and store them in a vector and then draw the points as dots:

The problem is that I need to calculate evenly distributed points on an ever growing Vector of points so I can only draw the line between say every 5th point (say using modulus). I have been battling away with Bezier curve equations both Quadratic and Cubic but still can't quite figure out how to convert my Vector of points into an evenly distributed Vector of Points without sucking the life from the CPU.

View 1 Replies

Flash :: Using The Pen Tool - Line Automatically Connects Between The Two Points In A Straight Line

Jul 3, 2009

I'm in the process of teaching myself the components of the CS4 Design Premium package using the Adobe Classroom in a Book series. I'm currently going through the Flash CIAB and i've started using the pen tool. The task involves creating a wave like design across the stage. Whilst this in itself is simple, the final instruction is to click on the first anchor point to close the shape. In the illustration, the closed shape seems to automatically extend around the stage, however when I click on the first anchor point, the line automatically connects between the two points in a straight line.

Am I doing something wrong? The next step is to fill this area, but with the straight line effect that I am getting, this becomes impossible. I should point out that the instruction states that the pen tool line should extend off the stage. I have done this, but even then on clicking on the first anchor point the shape is closed incorrectly.

View 2 Replies

Actionscript 3.0 :: Drawing A Continuous Line On Press?

Mar 5, 2009

I am attempting to make a simple click and draw scribble function. The code i created below kind of does this but in a really bad scattered kind of way. Even when I up the frame rate considerably the dots are still spaced apart and I want a nice solid line.

[code]...

View 1 Replies

ActionScript 3.0 :: Split A Large Text File Into An Array At Line Breaks So One Array Element = One Line?

Jan 8, 2010

i need to split a large text file into an array at line breaks so one array element = one line.i have tried the using "" in both match() and in RegExp but it doesnt work.i had the g and m flags on. tried the $ sign too.

View 8 Replies

Flex :: Continuous Integration - Run Unit Tests From The Command Line On Linux?

Mar 12, 2011

I am setting up a FlexBuilder build under Hudson/Jenkins on a Linux system. I want to execute our unit tests, but do it without using the standard GUI-based test runner.

View 1 Replies

Creating A Line Between 2 Points?

May 20, 2009

I want to create line between 2 points ...such tht the line will start when i click the point A then i will drag the line by holding it to point B and i will join the line to point B by clickin on point B (somethin like the pen tool) ..then line will then be joined between the points ...

View 1 Replies

AS3 :: Flash - Get The Two Points Of A Line?

Oct 15, 2011

I have a component (link to Test class) which contain one line in it, and I put one point of this line to (0, 0).

Then drag it to Flash(fla), and get its Shape in AS3 like:

// in Test.as
// assume that the movie clip only contain one line.
var line:Shape = Shape(getChildAt(0));

And I can get one point of this line which is x and y of var line. But how to get another point of this line?

Edit:
Ignore component stuff above, here has another question but I guess it pretty much the same as the question above:

Draw a line from (0, 0) to (10, 10) and draw another line from (10, 0) to (0, 10), how to get those lines of two-point form in AS3?

If I access them as Shape then I get two similar shapes which have same x, y, width and height values. Does AS3 has some way to access line as a REAL line not just a shape? or does it has any way I can calculate it out?

View 2 Replies

ActionScript 3.0 :: Swf Array Continuous Loop

Jun 7, 2011

I need to loop an array that also play the swf to the end beffor it goes to the next array. How whould i do that? if anyone could link me to a page where i can find out or tell me how i did it would be great.

i have this but this dosent work as i wannt:

ActionScript Code:
function onCompletePreloading():void
{
contentContainer.addChild(_swfClipsArr[0]);

[Code]....

insted of having the "addEventListener(MouseEvent.CLICK, setContent);" i need something that counts the current frame and the end frame of that swf is that possible?

View 1 Replies

ActionScript 1/2 :: Join Two Points With A Line?

Aug 25, 2010

I want to ask how do you join two points with a line using actionscript? The points would be constantly moving.

View 9 Replies

ActionScript 3.0 :: Find Points On The Line When Given The X Value?

Oct 28, 2010

I have a line that is drawn using the draw api. I need to find points on the line when given the x value, how would I do this. I know on the bezier segment I can just user the yForX() and get the value but not sure how to with just a straight line.

View 5 Replies

ActionScript 2.0 :: Create A Line Between Two Points?

Oct 23, 2009

I need to create a line drawn between 2 points. My actual idea is of joining 3 points with lines drawn dynamically(for a triangle).

View 1 Replies

ActionScript 2.0 :: Check All Points Along A Line?

Aug 20, 2009

I'm using Flash 8 and AS2 I am attempting to make some code that checks whether or not a line that rotates around the screen is hitting a movie clip. Here is my code (with comments explaining it):

[Code]....

View 3 Replies

Professional :: Anchor Points On Line Segments?

Feb 14, 2010

Closed path made with pen tool in Flash MX  comprises of line segments & curved segments both.While adding anchor points on segments it is noticed that pen tool adds anchor points on curvaceous segments but not on line segments. Why is it so ? Is their any way to accomlish this task ?

View 5 Replies

ActionScript 2.0 :: Find The Points In A Line (Math)

Feb 3, 2005

find a points in a line Actually i want to make some footsteps in a sand. The footsteps are dhynamically placed on the stage. How to find the points in a dioganal. see the image

View 1 Replies

ActionScript 2.0 :: Find The Points In Line (Math)

Feb 3, 2005

i'm trouble to find a points in a line Actually i want to make some footsteps in a sand. The footsteps are dhynamically placed on the stage. How to find the points in a dioganal.

View 1 Replies

ActionScript 3.0 :: Drawing A Squiggly Or Wavy Line Between Two Points?

Oct 19, 2008

draw a squiggly or wavy line in the MOUSE_MOVED event as the user clicks and moves the mouse.

View 1 Replies

ActionScript 3.0 :: Add Mc Over Some Points Of A Line Drawn With LineTo Method

Nov 1, 2010

this is the thing: Using "lineTo" i get a line drawn on stage when dragging a mc. Then i should have four mc (note1, note2, note3, note4) added randomly over this line. I mean, the line is drawn and then over some parts of this line, using x and y of some of the points drawn there, this movie clips should be added randomly. I can make the mc appear randomly, but always in the same point (mouseX, mouseY); i cannot access others x and y of the drawn line. This is my code (noteContainer is a sprite):

Code:
private function drawingAPI(event:MouseEvent):void{
sprite1.graphics.lineTo(mouseX, mouseY);
}

[Code]...

View 9 Replies

ActionScript 3.0 :: TweenMax: From Flat Line To Multiple Points?

Jan 11, 2012

I think it would be cool if the line started out as flat (i.e., y=_height/2 for all points) and then the y points of the line animate into place.I don't even know where to start with doing this in TweenMax/Lite... I've seen several code snippets that draw a line from left to right, but that's not what I want.

View 6 Replies

ActionScript 2.0 :: Trigonometry - Line To Continue After The Points In Both Directions And With The Same Steep

Sep 27, 2005

Is there someone who is good at trigonometry? I have two points punkt1 and punkt2 and a line that is drawn between them. Both points is dragable. I want the line to continue after the points in both directions and with the same steep. I have counted the steep between point1 and point2 and tried to continue to drag to a point with the same steep, but it doesnt succed.

[Code]....

View 3 Replies

Assemble Animation / Sound And Background Image Automatically?

May 16, 2011

I need to learn how feasible it is to automatically assemble Flash animations which take a background image, an animation (or a set of vector drawings that can be turned into an animation) and a sound file from a set of files. In other words, assume that I have the following set of files:

3 background images (let's assume JPG)
3 animations (no sound, no static background)
100 sound files (let's assume MP3)

So if I want to code something like:
for i 1 to 3
for k 1 to 3
take animation i
take background image k
for j 1 to 100
take sound_file j
resulting_swf = assemble (animation[i], background[i], sound_file[j])
save(resulting_swf)

Which will produce 900 Flash animations with different combinations of sound and background, what is the starting point? Are there some libraries (in Python, Perl, PHP, etc.) with good documentation and examples to develop something like that, some program that I can run from the command line?

View 2 Replies

ActionScript 3.0 :: Flash Runtime Ignores Alpha Values When Iterating Over Points In A Line

Apr 15, 2011

I have a large-ish array of points.

The graphics object I am using has it's alpha value set to 0.1.

When these points are plotted iteratively, and the line being drawn overlaps another line drawn earlier, there is no visible change in the colour at the intersection.

If I draw the line differently, not using an array of points, the alpha is not ignored.

ActionScript Code:
public function render(e:Event):void
{
if (segmentsCollection.length > 0)

[Code].....

This all occurs on each ENTER_FRAME event until the array is emptied.

I have tried loads of options but the alpha is always ignored.

View 5 Replies

Javascript :: Contour Plot In Web Browser?

Jan 5, 2011

I need to plot a contour chart in the web browser. It needs to be interactive as well. Does anyone know good javascript library, flash or flex libary to do this?

View 1 Replies

ActionScript 3.0 :: Fill Within Contour Of Image?

Feb 25, 2012

What I want to do is have an image and fill within the contour of the image with circles of selected size. what would be the first step in doing this? Or is this even possible simply in AS3?

View 2 Replies

ActionScript 2.0 :: Array Text Into Textfield And Creating New Line For Each Array Element?

Oct 4, 2006

I have an array called dropTarg1 which stores dropped-in items.I want to loop through this array and in a textfield, display each array item on a new line of this text fieldI think I need to use something like Array.join("/n") but I can't get it working properly. I hope that the /n would create a new line of the text field called reviewBoxContentText.

for(var i:Number = 0; i<dropTarg.length; i++){
with(reviewBoxContent.reviewBoxContentText){
autoSize = true;

[code].....

View 2 Replies

ActionScript 3.0 :: Setup An Array Of Cue Points?

Mar 28, 2011

I'm trying to set up an array of cue points and when each cue point is reached, it triggers an event. I've got the array set up, but am having difficulty setting up the action events.

[Code]...

View 3 Replies

ActionScript 3.0 :: "attach" Textbox To Midpoint Of Line Between 2 Movable Points?

Dec 1, 2009

I have 2 points you can drag. A draw a line between them. I have a textbox that displays the distance between the 2 points. How can I have the textbox "attach" itself to the midpoint of the line and stay there as the points are dragged?a file is attached and you can see it here [URL]

PHP Code:

var item:MovieClip;
var dragOffsetX:int;
var dragOffsetY:int;
var itemOffsetXY:int;

[code]....

View 3 Replies

ActionScript 2.0 :: Make The Bar "snap To" Certain Points Along The Line?

Oct 19, 2005

I'm working on this sliding bar navigation thing , and I'd like to make the bar "snap to" certain points along the line.

View 5 Replies

Actionscript 3 :: Irregular Shaped Gradiant Contour In Flash?

Jan 30, 2012

I am looking for a way to get a similar effect as posted in the Adobe forums The current solution is very brute force using about 60 intermediate shapes gradually going from the outer shape towards the inner shape while slightly changing the color each time.

[Code]...

particular problem, I only wanted to have a shape fade into the color of the background so my solution was to draw the image slightly larger than usual and use Flash's blur filter to create the gradient effect. This is suitable only because my background image is a solid color so this won't work for everybody. This is also a very cpu intensive method but is faster than drawing 60 shapes.

View 1 Replies







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