Pretend Line Graph
Hi All!
I'm trying to animate a line in a graph. Its not a dynamic graph. I just want to show a line moving from the start point to the top of the graph but its not just a straight line.
How do I do this so it shows the progression of the line on a line graph?
I have Swish and Flash MX
Thanks a bunch! Jenn
FlashKit > Flash Help > Flash Newbies
Posted on: 09-17-2002, 08:29 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Possible Line Graph?
I wanted to try to have a graph with 4 user definable points. It would be for video game replay value, and would be first week, first month, 3 months, 6 months. Now I would theorize that you could make a pen tool, or some kind of segmented line where you could define the y position of the vertices in ActionScript, and the line would bend accordingly. Meaning if for first week it was a 9, then second week it was a 3, you could make those points move accordingly, and the line would stay connected. Any idea if something like that is possible? If not ill figure something else out, but id like to mess with that idea for my site.
Line Graph
Anyone know where I can get aline graph component for MX?
Calculate Graph Line?
Hi
I wondered if anyone has any pointers on creating a dynamic calculator graph , a line graph that has a gradual curve from point A to point B. I was thinking I could use cosine and attachmovie, attaching dots to form a curved line, any suggestions would be great.
Thanks
Wayne
Line Graph Tutorial
I am looking for a nice dynamic line graph tutorial. They data can be loaded from a xml file or an array in the actual swf movie. To see an example of what I am looking for I attached a sample. Any help would be nice. Thank You.
Simple Line Graph
I'm just trying to create a simple line graph in Flash that reads from an external .txt file but I am terrible at action scripting and have no idea where to start. How would I go about doing this?
Multiple Line Graph
First off, thanks to kglad for the line graph function I started with, it has been a huge help. Now the step I'm trying to take is 2 fold.
First, I'd like to graph more than one line segment on the graph. Right now I am graphing functions f1 and f2, but f2 currently overwrites f1. I want them to coincide so f1 goes from x=1 to x=15, f2 goes from x=15 to x=25, f3 goes from x=25 to x=10 at a different y (these are all curves), and finally f4 goes from x=10 to x=1 creating a closed shape. Also, I want the x values and the y values to be variable based on the temperature. I'm using PV=nRT and n, R, and T are all known. so I have something like P=nRT/V where P is y, V is X and the nRT can be calculated for two steps of the 4. The other two steps are adiabatic, so Q=0, I don't know yet how to fit the lines but i do know that y = a / (x^(5/3)) is a formula that works, I just need to find the proper a values for steps 2 and 4.
Part two of this issue is that currently the graph is drawing as the whole canvas, which is fine for testing until i get the multiple line part worked out; however I only want this to be 1/4 of the viewing area as I have other movie clips and such to put on this. A conceptual drawing of what I plan on making can be found at: http://www.students.bucknell.edu/gbement/Steps.html
I'm a novice to Actionscript and movie clips, I previously did everything with motion tweens and nothing was dynamic. I plan on creating the piston and molecule simulation in another movie clip, then I can vary the play speed relative to the hot and cold temperatures by looping the movieclip and having it play faster for a high T and slower for a low T.
Any help on any of my many issues would be greatly appreciated and the user will be recognized for their assistance in my research presentation :)
Scatter Graph And Best Fit Line
Hey everyone,
I've done repeated searches and I've posted over in the math forum to no avail.
I'm getting deperate witht his now, my problem is this;
I'm building a scatter graph and it's all working well, but now I need to build the 'best fit' line into it (Also known as the regression line, the average etc).
The line needs to be (I think) made up of the average of all the points, the only resources I've found are like the following :click:.
Please, please I do remember seeing actionscript implementations of this, but I really need this help.
Thanks.
harlequin.
Simple Line Graph In Flash
Hey Guys, I was just wondering if anyone had any suggestion on making a simple line graph in Flash.
I think 1000 data points, or in other words, 1000 points in the X axis is what I am shooting for. I was thinking about splitting that up into 500 and 500 so its more managable. The user would be able to switch between 1-500 and 501-1000.
The Data is read from a text file. I guess what I'm asking is the syntax and in some ways, just how to do it. A sample of the work I've doing is here:
http://mail.rochester.edu/~jy003i/ece/main.html
I am figuring that a line has to be drawn from point A to point B then to point C with the X, Y coordinates being specified from the file. As in, the Y value coming from the data file and the X position just being incremented....
Any suggestions? help!
Drawing A Line Graph From Data
Hello,
I have a data set with 400 x,y data points. I exported this from EXCEL and I want to use it to draw a line graph using the lineTo function.
Is there a way I can do this by attaching a comma delimeted text file?
Many thanks,
Tim.
Problems With Drawing A Line Graph
Hello!
Currently I'm trying to draw a line graph in my movie. I have 25 points; point1, point2, point3 etc etc.
At the moment I'm just giving each of them a static value, so all should be fine, except right now, one of the points isn't behaving like the other points. Firstly, here's the code:
Code:
for(i=1; i<=25; i++) {
_root["point"+i]._x = 505 - (9*i);
_root["point"+i]._y = 175;
}
_root.createEmptyMovieClip("line", 0);
_root.line.lineStyle(2);
_root.line.moveTo(_root.point1._x, _root.point1._y);
for(i=2; i<=25; i++) {
_root.line.lineTo(_root["point"+i]._x, _root["point"+i]._y);
}
This should put each of the points on a straight horizontal line since _y is constant. However, one point doesn't behave as intended. While all the points are on the horizontal line, point9 is off the screen (to the top left corner), meaning the line drawn goes off to the corner, then back down to number 10 again.
The link to the small printscreen i took is here
I've tried deleting that point, and putting a new one, but the same thing happens. I've also tried deleting it completely, in which the result is then point9 going again to the corner, in addition to point17.
Each point are a copy of the original, so I have no idea how that could happen, please help.
[F8] Creating A Dynamic Line Graph
Ok, so I have a formula, y=bx+a, that I need to graph a line from. The user will input data into text boxes, and it will take two more equations to find the variables to graph it. I was wondering if anyone could point me in the direction of a good tutorial that talks about dynamically generated line graphs.
Displaying The Labels On Line Graph
Hi,
I have one Line Graph. Now i want to display the values as labels on the graph(like datatips but not datatip). Please help me in this issue.
Simple Line Graph With X And Y Axis
hi is there any tutorial or help files
to create a line graph where on x axis there are 0 to 12 numbers and also on y axis 0 to 12 numbers and we have to draw a line based on the product
any help will be appreciated
thanks
Animated Line Graph Control?
Can anyone tell me what vendor provides an animated line graph control like on farecast.com?
Please see the following site and click on the "Graph" tab:
farecast.com Line Graph Control
Thanks!
Chirag
Actionscript Line Graph Using Bezier Curves
I am trying to take a set of points that I am passing in via an xml file and plot them to a graph (easy enough). My problem that I am having is the ability to draw a line to each point and curve it using the curveTo() method.
My question is what kind of formula would give me a smooth curve no matter what data points I send to the app.
I have been looking for a week for code samples in actionscript and Java and have found nothing.
Thanks in advance for your help.
How To Create A Dynamic Line (with Multiple Lines) Graph?
Hi,
I'm having a big problem here. My company wants me to produce a line graph consisting of multiple lines whose values are dynamically taken from the SQL server database.
I'm using ASP and MS SQL server.
Is there any ready made applets or any asp code or any idea that i can produce the graph?
Will deeply appreciate your help
Thanks!
Nizar
How To Create A Dynamic Line (with Multiple Lines) Graph?
Hi,
I'm having a big problem here. My company wants me to produce a line graph consisting of multiple lines whose values are dynamically taken from the SQL server database.
I'm using ASP and MS SQL server.
Is there any ready made applets or any asp code or any idea that i can produce the graph?
Will deeply appreciate your help
Thanks!
Nizar
Pretend Tab Buttons
hi there,
i have five images (snapshots) of a site that actually uses tabs- and i want to create that in flash- so i need to make invisible buttons, which i think i've got pretty much mastered, that will basically switch to another image to fain the tab function. help please? I am thinking it will work like, on release go to frame (blank) and stop? because there will be a different image in every frame? thanks for suggestions! i also need to know how to make it not run all the frames as an animation on load...any help would rock.
amber
Lets Pretend The HitTest Happened Once
onClipEvent(enterframe){
if(this.hitTest(mc1)){
_root.number-=1
}
however, when the 2 mc's touch, there r 'multiple' hits and about 5 is subtracted. how could i make sure only 12 is subtracted from number? btw, i still need the clip event to be enter frame cuz other scripts need it.. thanks for u
re replies!
Rotating Knob..creates Data...which Then Creates A Line Graph
First off....
Hoping to have a knob that will rotate and output a number from -25 to +25 into a dynamic text box(which will later be used to create my graph with line() function). Got the main rotating function working, and then set up a set of "if" / "else if" statements based around hittest to output cetain numbers into a dynamic text box when the grip instance hits the hit area on release.
Main problem is that I know I am doing this wrong. Hoping I could skip the hittest on release and just have a variable that outputs the "var angle"(or something like it). I then could convert that to the numbers I need with a little math.
Can I use any of these existing variables below??
PHP Code:
handle4.grip4.onPress = function(){
// when you press the grip in the handle
handle4.onMouseMove = function(){
// add a mouse move event to the handle
// get an angle to the mouse using atan2 (gets radians)
var angle = Math.atan2(this._parent._ymouse-this._y,this._parent._xmouse-this._x);
// apply rotation to handle by converting angle into degrees
this._rotation = angle*180/Math.PI;
// rotate the grip opposite the handle so it won't rotate along with it
this.grip4._rotation = -this._rotation;
}
}
handle4.onMouseUp = function(){
// if a mouse move event, delete it on mouse up
if (this.onMouseMove) delete this.onMouseMove;
}
Graph Help
hi
how can i create a line graph according to x,y coordinates??
thanks in advance
Bar Graph Help
I am pretty basic at my flash skills. (to me it's basically a vector powerpoint).
Anyway, I am needing to make an interactive graph where someone can enter a number 1-70 and have a bar show up representing that number.
I will need to have multiple bars in different colors and in multiple sections.
something like this...
I am using Flash CS3 Pro. Thank you for your help.
Graph
Hi,
I am trying to build a graph that will load from an external data source and I have a couple of questions.
How do I measure the length of a string so I can right align the axis labels?
How do I figure out the size of the flash object? If I put a:
var s:MovieClip = this.createEmptyMovieClip("text1", 2);
It seems to change my _root._width In the commercial flash graphs you can set the size of the graph using variables. I would like to be able to do this also.
Is there any way of doing matrix stuff so I can transform my graph co-ordinates so X goes up from the bottom?
If there are any tutorials on how to do this I'd be ever so grateful!!
Many thanks.
monk.e.boy
Graph Help
hi all
i have a graph file
in that there are 12 points but it shows only 10 red balls and not 12 red balls
pls find the attached file
Graph.
Dear All,
needs help badly to teach me how to do code this dynamic graph, if you guys have any ideal how to do code this please teach me ~~
thanks alot.
Firstly, the graph has a normal X and Y axis.
The though part is this:
Whenever the mouse cursor moves inside the graph, there must be "tracing lines" shown together with the corresponding coordinates (that is the coordinates at the position of the Mouse Over). Tracing marks meaning:
something like this this.
If the mouse cursor points over for example pointA(4, 6), a horizontal line will be join from the position of the mouse to the value of the y-axis that is 6 in the case of pointA and then a vertical line will be joined to the value of the x-axis that is 4 in the case of pointA.
And the value of the coordinates at the point which the mouseOver will be display at the interception of the two lines, that is the position of the mouse.
I am very new to flash programming and is very weak in actionscripting. After much research and thinking i can only figure out a few points:
(1) The postion of the mouse is very important.
(2) the two axis of the graph need not be dynamic ( or do they have to ? ).
(3) the horizontal and vertical "tracing lines" is dependent on the postion of
the mouse cursor as they starts from the cursor to be joined to the
various coordinates on the X and Y axis.
(4) The length of the tracing lines will definately varies depending on how
far away or how near the mouse cursor is from the axis.
(5) I have absolutely no ideal how to do the part where the value of the two
coordinates have to be show at the point where the tracing lines
intercept (the point on the graph where the mouseOver.)
I believe a lot of functions have to be written for such a graph to be programmed, but i have hardly any clue how to start, as I am a student doing a project for my school math department and the course which i took on Flash taught me merly on flash animation and basic actionscript. I borrowed lots of actionscript books from the library, but none seem to deal specifically the means and functions to do such a questions. So please teach and guide me if you can. Thanks alot
Please if you can, show me some sample functions because i can hardly come out with my own functions.
Thanks alot
[ p.s. The only way i can figure out to finish this questions is to put hundred
of movie clips (can anyone teach me how to write a loop function?) on the
graph and draw out hundred of "tracing lines" ]
regards,
LWM
Bar Graph
Can any one help me how to create bar chart(given data) in flash using actiion script..but hight should not exceed more than 215.
any idea?
Bar Graph
can anyone help me,how to create a bar graph using flash action script?
data given by user and maximum height should be 400.
thanks n advance
thil
Graph
Hello,
Can anyone help me with my graph please ?
I have two data files that populate the two different shades of blue in the bar graph. I have the dark blue one working but i cant get the light blue one to work? I origionally got the code from flashkit so i dont understand it fully..
I attached a zip of what i'm doing, just extract it all to the same place,
Thanks for any help
skid
Graph Help
I'm a newbie to actionscripting so please be patient. I'm writing a graphing application which receives information from a back end database. I have most of it figured out but I'm stumped on how I can get the values to be displayed. The number of data points is too many to put a text tag on the graph, all you see is each text tag overwritting the last. What I would like to do is have a text box on the side of the graph and as you move a line across the graph the values of the graph would be displayed in the appropriate text box. Right now I simply figure out the x and y pixel location and draw a line to that point.
Thanks.
Polar Graph
Hi.
I have a really big trouble. I need to make a polar graph and I have not idea how can I do.
Thanks for anyone that can help me
Plotting A Graph
Im starting to wonder if this can be done or not, I have posted on several sites and have not gotten any replys so this will be the last try. What I am trying to do is make a flash interfase that will have a range lets say from the bottam left of 0 to the top say 100, now what I want to do is be able to have flash get the information from my data base on stocks and take lets say x=9 and y=2 then draw me a simple line on the chart showing the percent of growth of that stock. any ideas if this can even be done or perhaps if the Gods are smileing on me a tutorial that may be out there some were I have not looked that might lead me in the right direction. thanks in advance.
Dynamic Graph
does anyone have or can point me where i can find a dynamic graph aside from the tute here in flash. i want a dynamic graph tute with an option to display the exact values of the graph or sumthin like a legend for the values. i hope there's one out there .. i badly need one a.s.a.p. thanks a lot guys!!! =)
Dynamic Bar Graph
I may be imagining things, but I remember seeing a component in Flash MX for building dynamic bar graphs. has anyone else seen it? If it doesn't exist, what can you recommend for doing bar graphs?
Bar Graph Increase?
ok, I have a bar graph that I can control by entering numbers into a text box called total. the problem is I need to know how to control the hight of the bar.
this is the code on my button
on (release) {
setProperty("_root.bar1", _height, total);
}
now my graph area is 373.2 pixels high and I need the top to represent 1,000,000 and the bottom to be 0. so I need to know how to take the number going into the total box and make it adjust to the chart. Other words how do I do the math on the above action script to make it work. LOL
Thanks for any help you can give me.
Another Graph Question
I have a bar graph that works by clicking a button and reading a number from a dinamic text box, that number comes from mysql. I want to be able to do this without haveing a user press the button but I can't figure out how. here is the code on the button.
on (release) {
setProperty("_root.bar1", _height, nu1);
}
Poll To Graph
HOW CAN I MAKE A POLL AND WHEN THE USER IS DONE IT WILL SHOW THE RESULTS OF THE POLL WITH LIKE A BAR GRAPH? THANKS YOU FOR ANY HELP.
Animation Graph
Hi
When I interpolate between keys I can use the ease in and out feature, but I feel it is really limited and would like a graph with splines for interpolation between keys. (Preferably like it works in Alias Wavefront Maya, or 3D Studio Max or Softimage)
Have anyone written a plugin or script that can be used?
I know I'm not the only animator with this wish.
/Staffan Lincoln - Sweden
Creating A Bar Graph
I created a bar graph. There is a flash text field and a button to calculate the ROI. A user types in their nimber of invoices and hits the calculate button.
After the movie runs entirely through once and (a.) the animation stops and (b.) the calculated values are placed in the four dynamic text fields the movie will not properly update the dynamic text fields again when you click the "Calculate ROI" button again (although the animation does run again)
What should I do to recalculate the fields?
Dynamic Graph... Can This Be Done?
Hi. I've got an idea about creating some dynamic graphs.
What I'm wondering is this: With the drawing tools, is it possible to create lines between points based not on their x, y coordinates? Ideally, I'd like to be able to draw lines between two named points, irrespective of where those points may lie on the x and y axes.
Failing that - can a polygon be created and 'stretched' out - it's shape being dictated by the vertices' distance from a centre point?
Can either of these be done?
Any guidance would be massively appreciated.
Plotting A Graph , Help
i need to plot a graph and have no idea how to even kick start. These is what how dynamic the graph is:
Basically is letting user trace the point(the correct X and Y coordination) on the graph and allow them to plot the graph. For example, when the user click on the correct coordination, a dot will appear and when the user click on the 2nd coordination, a line will appear to connect the first point to the 2nd one and etc. The last fucntion of this graph is to have a clear button that allow the user to clear the last plot attempt and so forth so that the user can continue to plot the graph.
Any idea where can i get the necessary information and possible someone can offer me some advice ?
...dynamic Graph...
hello
hope all you wiil fine and doing very well i am flash animator now i need to make bar graph which will get x, y vlaue from database and will create graph on x, y positiion.
Please any one let me know how i can make possible that.
Thanks
Curved Graph, Is It Possible?
The graph should go through some points loaded via a xml feed - and should curve nicely, not straigth lines.
Have not been able to find it or any tutorials about it anywhere so I am starting to wonder if it is possible?
Thx in advance for any help...
Regards
Latterlig
Graph Tracker
I just came across a Graph tracker for Stocks on Yahoo finance in which we could drag the line grph to any timeline. It's ben made in Flash. Does anyone has any clue how it can be done. Also is there any tutorial available on it on Flash Kit.
...dynamic Bar Graph...
hello
i want to make dynamic bar graph which will take value from database and generate by value plz any one let me help how i can done that
Regards
My Graph Widget
Hey, i made a fun general-purpose graph for a friend of mine, check it out:
http://www.schelterstudios.com/storage/graph2.html
http://www.schelterstudios.com/storage/graph.html
I designed it in such a way where you can style it by passing 3 parameters into its setStyle() method.
1) color of the line
2) bitmapdata object for the top section
3) bitmapdata object for the bottom section
Since it uses bitmapdata objects, you can use anything you want for the graph's appearance, as seen in the two examples I've listed above. It establishes a reference to the bitmapdata you pass in, so you can also alter them and see the effects appear in the graph itself as soon as it redraws itself.
As far as populating the graph goes, all you do is push in single number samples and it plots it at the end of the graph. It scales the data so the average lies across the middle of its y axis, but it scales down even further if outliers exceed the boundaries. You can also set a units string that is appended to the textfield showing the current sample values.
The graph itself is quite ideal for front-end display of server data, as it only updates itself as frequently is data is pushed into it, so the type of load it requires is all dependent on how you build the model to populate it.
Results Bar Graph
Hi guys,
Building a poll application. the results are parsed from an XML file to flash. Depending on how many results there were, that is how many slider movieclips will be attached. This works. My problem is, the scaling mcs get their values from the XML file, but they all just scale to the value of the first result. So for instance let's say the results are:
70
40
30
3 mc's are then dynamically added to the stage. The first one should scale to a value of 70, second one to 40 and the third to a value of 30.
Attached is the .fla and .xml file for clarity.
Thnx in advance.
|