Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Please Help Me Make Dynamic Bar Graph



I'm trying to do a dynamic bar graph like THIS.I'm trying to conceptualize how I would go about doing this in Flash.My first thought was to create a MovieClip with exacty 100 frames. The first frame would look like THIS, and the last frame would look like THIS.Now, my idea is to do some Actionscript like this:
Code:
// Psuedo code (not an Actionscript guy yet...)// The percentage comes from a value passed in by PHPvar percentage = 56%;barMovieClip.play();barMoveClip.stopAtFrame(56);// Sorry for the horrible code. I hope you get the idea.
So me questions are:1) How can I easily create this 100 frame movieclip with the bar filling up to the right as each frame goes by? (i.e. frame 56 would show the bar 56% filled in) I've tried to do a shape tween with no luck.2) Once I have the movieclip, how can I tell it to play through and stop at the proper frame according the percentage I receive from the database?Thanks for any help guys.



KirupaForum > Flash > Flash 8 (and earlier)
Posted on: 04-23-2007, 08:50 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Help Me Make Dynamic Bar Graph
I'm trying to do a dynamic bar graph like THIS.

I'm trying to conceptualize how I would go about doing this in Flash.

My first thought was to create a MovieClip with exacty 100 frames. The first frame would look like THIS, and the last frame would look like THIS.

Now, my idea is to do some Actionscript like this:



Code:
// Psuedo code (not an Actionscript guy yet...)


// The percentage comes from a value passed in by PHP
var percentage = 56%;

barMovieClip.play();
barMoveClip.stopAtFrame(56);

// Sorry for the horrible code. I hope you get the idea.
So me questions are:

1) How can I easily create this 100 frame movieclip with the bar filling up to the right as each frame goes by? (i.e. frame 56 would show the bar 56% filled in) I've tried to do a shape tween with no luck.

2) Once I have the movieclip, how can I tell it to play through and stop at the proper frame according the percentage I receive from the database?

Thanks for any help guys.

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?

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.

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

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

Dynamic Graph
Hi,

can anyone teach me how to progam dynamic graphs using flash mx please.

The graph is suppose to be a dynamic frequency polygon, and is plotted when the user clicks on the appropriate frequencies on the various (x & y coordinates).

The instruction for this graph is:
user clicks on the correct cumulative frequencies(the y-axis) at each boundary and a line will be formed to join one point to another on the graph below.

The logic is:
-The user clicks on one point of the graph say P1(x: 3, y:7), a dot will appear
on that coordinate.
- Then he/she clicks on another point say P2(x:7, y: 9), another dot will
appear, and P2 will be joined to P1 by a line.

Please teach me if you can, thanks alot.

(or is there any good tutorial websites that teaches such dynamic flash codes?)

thanks alot.

regards,
LWM

Please Help With Dynamic Bar Graph
I'm trying to do a dynamic bar graph like THIS

I'm trying to conceptualize how I would go about doing this in Flash.

My first thought was to create a MovieClip with exacty 100 frames. The first frame would look like THIS and the last frame would look like THIS

Now, my idea is to do some Actionscript like this:


[CODE]// Psuedo code (not an Actionscript guy yet...)


// The percentage comes from a value passed in by PHP
var percentage = 56%;

barMovieClip.play();
barMoveClip.stopAtFrame(56);

// Sorry for the horrible code. I hope you get the idea.
[/CODE]

So me questions are:

1) How can I easily create this 100 frame movieclip with the bar filling up to the right as each frame goes by? (i.e. frame 56 would show the bar 56% filled in) I've tried to do a shape tween with no luck.

2) Once I have the movieclip, how can I tell it to play through and stop at the proper frame according the percentage I receive from the database?

Thanks for any help guys.

Dynamic Graph HELP
Hello!

I have this little problem with my dynamic flash graph that reads and displays values from a csv file. When I test/preview it in Flash MX, the values from the file loads automatically and displays it correctly. But when I embed the swf file into a webpage, the values does not load and draw till I right-click and select 'play' manually. I'd already set the autoplay to 'true' but it still does not work. Can anybody please help me out?

How To Create Dynamic Graph
hi there,

this is raheel, i want to create a dynamic chart or graph

using a text file called data.txt, by calling it into my fla using loadvarialbnum().

the graph only return the value if client press the refresh btn on the browser otherwise no request will be served.

hope u any one help to find my problem

rgds
Raheel

Dynamic Data To Graph
I think this is a big question so I don't expect someone to give me a complete answer—I'm just looking for a start so I know where to look. OK here is my question

What I would like to do is have 10 pictures that could be rated (1—5 (5 being the best)) by users visisting my webpage. I would also like to have a graph that displays the results so users could see what other have selected.

Draggable/dynamic Bar Graph..
I was trying to help out in another post...and got stumped myself on some code.

basically...the gist of it is... you drag a bar to the "right" or "left" and the other bars adjust accordingly.

maybe I am going about this the wrong way?

heres the basic code for it:
code:
startX = this._x;
trace(startX);

this.onPress = function(){
this.startDrag(false,0,this._y,450,this._y);
this.onEnterFrame = function(){
if(this._x > startX){
_root.turnaround_mc.blueSlider._x -= (this._x - startX);
}else if(this._x < startX){
_root.turnaround_mc.blueSlider._x += -(this._x - startX);
}
}
}
this.onRelease = this.onReleaseOutside = function(){
stopDrag();
delete this.onEnterFrame;
startX = this._x;
trace(startX);
}


the problem (as I see it)...is the onEnterFrame part.... I need it to continually check the _x of the object...as well as continually adjust the _width of another object based on the _x of this object.

but the onEnterFrame also..continually "adds/subtracts" from _width of the object..instead of just doing how much has been moved on the intial objects _x.

code is IN the greyHandle clip...the bar's _width has an on enterframe to be wherever the the greyHandle is... (making our slideable/draggable bargraph)..

its controlling the other clips that is problematic..

here is the .zip

I need the continual CHECK..but NOT the continual addintion/subtraction.....needs to be constrained to ONLY the amount (plus/minus) moved by the greyHandle _x...

hope it makes sense..(the .fla will) LOL

thanks

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

Simple Dynamic Bar Graph
Hi! I'm trying to make a simple dynamic bar graph to visualize some data, in theory the code seems fine to me but for some reason it only displays one of the bars, I'm sure is a very little thing but I just can't see it:


Code:
// display a dynamic number of color bars in a bar that has a fixed width
var aColors:Array = Array(0x00FF00, 0xFF0000, 0x0000FF, 0x00FF00);
var aNumbers:Array = Array(100, 20, 10, 2);

function createBar(sx:Number, sy:Number, w:Number, h:Number) {
// create bar container
var colorbar:MovieClip = this.createEmptyMovieClip("colorbar", this.getNextHighestDepth);
colorbar.lineStyle(2, 0, 100);
colorbar.moveTo(sx, sy);
colorbar.lineTo(sx+w, sy);
colorbar.lineTo(sx+w, sy-h);
colorbar.lineTo(sx, sy-h);
colorbar.lineTo(sx, sy);
// get sum of quantities
var aNumbersTotal:Number= 0;
for (var i in aNumbers) {
aNumbersTotal+= aNumbers[i];
}
// put item in containers
for (var i in aNumbers) {
var nWidth:Number = Math.round(((aNumbers[i]*w)/aNumbersTotal));
rect = _root.colorbar.createEmptyMovieClip("rect"+i, this.getNextHighestDepth);
rect.beginFill(aColors[i], 100);
// trace(aColors[i]);
rect.moveTo(sx, sy);
rect.lineTo(sx+nWidth, sy);
rect.lineTo(sx+nWidth, sy-h);
trace(nWidth);
rect.lineTo(sx, sy-h);
rect.lineTo(sx, sy);
rect.endFill();
sx = sx+nWidth;
}
}
createBar(Stage.width/2, Stage.height/2, 200, 20);

Many Thanks to all of you who help me on this!!

Dynamic Rounded Graph With Php
Hello friends,
I need to make an dynamic rounded graph for the present market condition. In this only three
catagory and these will increasing by dynamic values from php. I am a flash designer, and I have no idea about programming, Please give me solution. If you knw tutorial link about it please give me. Every help will be appriciate.



Please help!


himanshu vyas

Dynamic Graph Plotting Challenge
Hi,

I am stuck with this project I got ... well let me first explain what I've done so far. First version of the project involved using a given array of eg 36 answered qustions where each answer can be from 1-5 (but points 4 & 5 are plotted on the same line so it's like there are 4) ...at the moment the graph is a static image of the circles one inside the other with common origin but different radiuses all together divided into 36 sectors (each sector belongs to a one question) reffer to the graph attached. so for example question one starts of on the radius 1 sector 1 which is 0 degrees of the circle. If answer is 1 dot is plotted in the origin if answer 2 dot is plotted on the intersection of the smallest circle and the radius line ... etc answer 4-5 plottted on the most outer intersection of biggest circle . So I've done that because I had the set number of questions and preset graphs looks (which is just a background jpg image) so I just manually placed the dots and activated each one depending on the array values ... and then used those coordinates to fill the shape ...so just the green area (filled area over the graph) is dynamic.

Now the problem is in new version I wont know how many questions there are going to be in other words it varies from 26 to 46 can be anything and the whole graph needs to be dynamically drawn so now I need to mathematically draw it and calculate the dots... so I'll pass to flash number of question and answer for each question (1-5 or one of the 4 dots per sector) it needs then to calculate how to draw graph and how many sectors to draw and then calculate the dots and plot the graph by connecting dots and filling the area.

Any ideas my maths is not that good

cheers

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

Dynamic Graph Re-scale Problem
Hi Guys

I'm really struggling with a graph I'm creating. I asked for some help the other day with getting objects to not re-scale and I thought I had it all sorted. But alas... No. What I am trying to create is a dynamic graph that takes the some data that has been randomly generated then plot it accordingly. Thats all well and good, but I fall down when I try to get the graph to scale dynamically. It does this and I've even managed to get the plot line to not scale when the height adjusts. My problem is with the points. Because they are duplicated within the mcplot they scale with it. So I either need a way of stopping the duplicated points scaling or if the answer is to not place them in the mc plot how can I get the dots to correctly correspond to the plotted point. I've included the .fla. Be patient with it because it takes about a minute for the plot points to show on screen. I'm really sorry to have to ask for help again, but the actionscript bible has failed me and I can't fins any relevant tutorials on the tinternet.

Thanks for your help

Rich

Dynamic Change Of Color For Graph
i tried duplicating a movie clip of a bar with animation that tweens upwards and changes colors from red to green when it reaches it's last keyframe.

however, duplicating the movieclip only duplicates the first frame of the movieclip and not the rest of the animation.

so i'm looking for a way to dynamically change the color of the movieclip based on it's _y position instead, however i don't know how to dynamically change the color from red to green using only actionscript.

here's the code i used


Code:
stop();
this.onEnterFrame = function(){
/* creates bars */
for(counter=0;counter<=10;counter++){
duplicateMovieClip (_root.bar, "bar" + counter, counter);
}
/* this places the bars in their places */
for (counter=0;counter<=10;counter++){
this["bar"+counter]._x = 42+this["bar"+(counter-1)]._x ;
this["bar"+counter]._y = this.bar._y;
}

colorshift = new Color("_root.bar");
colorshift.setRGB(0x006699);
}
i also would like to know how to preserve the image gradient within the movieclip
or is there a way to just change the percentage of the RGB (like in properties>color>advanced option) because my current code changes it into a single color and makes the image look flat.

Dynamic Bar Graph From Content In XML Or Csv File
I'd like to make a bar graph(s) that grow/shrink as a result from reading data from an XML file or CSV file. I'm still pretty new to actionscript, so can you tell me if I am headed in the right direction? Below is how I am thinking of tackling this little project:

1. Create a MC of the bar graph(s)
2. Read the XML or CSV file and parse the values into variables
3. Use ._height = the variable that contains the info from the XML or CSV file to adjust the size of the bar graph MC

Is this how you would do it, or am I way off track? :?:

Thanks for the advice.

Drawing A Dynamic Pie-chart / Graph -circle
Hello!
I made a little poll which shows five most common answers graphically - with bars.
It would be neat if you could show same information in a pie chart! Does anybody know how to do that?

My bar-graph works basically like this(simple):

multipler = (bar_max_height / amount_of_answers)
bar1_height = (answers1 * multipler)
bar2_height = (answers2 * multipler)
...

Like that it would be super-easy to get out how many degrees answer1..etc would take from the chart.
But how to draw a semicircle in flash based on that information? And how to tell where the next pie will start(in fact that it is fairly simple to count sum of degrees taken by previous slices).

Any ideas or good tutorials around?

(I think that this is irrelevant, but information is stored in MySQL and accessed via PHP)

*DIFFICULT* Multiple Movieclips Over Dynamic Graph
I'm building a graphing tool for flash. The graphing functionality works fine. That is, when i graph the arrays
below, the correct line is drawn. My problem lies in this script rather than in the drawing
script. I want to be able to move my cursor and have these boxes appear at the plotted points equal to
the xvalue of where my cursor is at. Then, i want to add another graph line to the stage and have the same
functionality. If there are two graphs on the stage and i move my cursor from left to right, i want these
boxes to pop up on the plotted points of both graphs if the cursors x value is on or between it's corresponding
plotted points x-value.

what happens is that this works for the first graph. It draws fine and when i move the cursor, the corresponding
box appears. When i add the second graph, however, it draws correctly but none of the boxes show up. They only show
up on the first graph.

Anyone have any ideas how to fix this? If not, is there a better way to go about this?

Here's the code:



ActionScript Code:
//I usually have these defined in another movie but for posting purposes i'll do it here
_global._global.master_xArray[0] = [72,126.545454545455,181.090909090909,235.636363636364,290.181818181818,344.727272727273,399.272727272727,453.818181818182,508.363636363636,562.909090909091,617.454545454545,672];
_global._global.master_yArray[0] = [6.79155256064206,188.692823599616,202.697312092987,202.697312092987,145.230148235692,152.907310419979,7.93314587290325,0,58.881482124309,84.4511325013621,54.2683071392721,50.7247615068526];

_global._global.master_xArray[1] = [72,126.545454545455,181.090909090909,235.636363636364,290.181818181818,344.727272727273,399.272727272727,453.818181818182,508.363636363636,562.909090909091,617.454545454545,672];
_global._global.master_yArray[1] = [149.906329428753,151.635712285517,149.895224500714,149.991511943221,150.33667055246,150.372870604886,150.366395526,150.471238124549,150.36901239726,150.898157185839,150.429770779971,150.370153084732];

var id_count = 0;

y_array = new Array();
x_array = new Array();

_global.text_id_array = new Array();
_global.box_id_array = new Array();

//this is just to start it all off in the loop
//later on we get the arrays by going through that _global.master_array
y_array = _global.master_yArray[1];
x_array = _global.master_xArray[1];

_global.graph_id = 0;
 
for (i = 0; i < x_array.length; i++)
{
    //my graph stage is 300px high.  the logic here is when i plot a point
    //i want to create a box that spans the whole height of the stage and it's
    //left side should be on the same x-coordinate as that plotted point.
    var start_y = 300 -(300-(y_array[i]));
    var end_y = 300-(y_array[i]);
    var bottom_y = 300;
    var right_x = (x_array[i + 1] - x_array[i]);
    var left_x = x_array[i];
   
 
    //here is the invisible boxes we use for the rollover
    //i create them and when the user rolls over them, the following
    //comment box is turned visible for that particular point on the graph
    //these boxes are exactly the same for every graph that is plotted together
    //that's why i only plot it for the first line and not all of them (like in the
    //following loop
    _root.createEmptyMovieClip(String("mc" + i), 1000 + i);
    _root["mc" + i].lineStyle(0, 0xCCCCCC, 100);
    _root["mc" + i].beginFill(0xffcc66, 100);
    _root["mc" + i].moveTo(0, (start_y * -1));
    _root["mc" + i].lineTo(right_x, (start_y * -1));
    _root["mc" + i].lineTo(right_x, end_y);
    _root["mc" + i].lineTo(0, end_y);
    _root["mc" + i].endFill(0, (start_y * -1));
    _root["mc" + i]._x = (x_array[i]);
    _root["mc" + i]._y = (y_array[i] + 18);
    _root["mc" + i]._alpha = 30;

  //_global.array_holder is an array from another swf that tells
  //us how many graphs are currently loaded.  Right now, i'm only dealing with
  //two at most.  By the way, i've checked and this does indeed have the correct values
  for(j=0; j<_global.array_holder.length; j++)
  {  
      x_pos_array = new Array();
      y_pos_array = new Array();
      
      x_pos_array = _global.master_xArray[j+1];
      y_pos_array = _global.master_yArray[j+1];

      var box_var = ("box" + j);
    //these are the little comment boxes that will pop up on roll over of the
    //previously mentioned movie clips.  I'm creating unique names for them
    //and i'm trying to put them on seperate depths.  That's _global.layer_count is
    //initially set to 1 and it's incremented at the bottom of this script.  Currently
    //these boxes only show up on the first x and y arrays of values.
    _root.createEmptyMovieClip(String(("box" + j) + i), ((2000  * _global.layer_count) + j));
    trace("ID: " add ("box" + j) + i);
    trace("on layer: " add (2000 * _global.layer_count) + j);
    _root[("box" + j) + i].lineStyle(0, 0x000000, 100);
    _root[("box" + j) + i].beginFill(0x6699cc, 60);
    _root[("box" + j) + i].moveTo(0, 0);
    _root[("box" + j) + i].lineTo(10, 6);
    _root[("box" + j) + i].lineTo(10, 12);
    _root[("box" + j) + i].lineTo(100, 12);
    _root[("box" + j) + i].lineTo(100, -12);
    _root[("box" + j) + i].lineTo(10, -12);
    _root[("box" + j) + i].lineTo(10, -6);
    _root[("box" + j) + i].endFill(0, 0);
    _root[("box" + j) + i]._x = _root["mc" + i]._x;
    _root[("box" + j) + i]._y = _root["mc" + i]._y;
    _root[("box" + j) + i]._visible = false;
   
   
    //the text box here shows up inside the previous comment box movie clip
    //like that mc, it only shows for the first set of x an y array values.
   
       
    _root.aTextFormat = new TextFormat();
    _root.aTextFormat.size = (temp);
    _root.createTextField(String((("tinyText" + j) + i)), (3000 * _global.layer_count) + j, 0, 0, 100, 20);
    _root[("tinyText" + j) + i].html = true;
    _root[("tinyText" + j) + i].multiline = true;
    _root[("tinyText" + j) + i].wordWrap = true;
    _root[("tinyText" + j) + i].text = my_text;
    _root[("tinyText" + j) + i].setTextFormat(aTextFormat);
    _root[("tinyText" + j) + i]._x = (_root["mc" + i]._x + 13);
    _root[("tinyText" + j) + i]._y = (_root["mc" + i]._y - 6);
    _root[("tinyText" + j) + i]._visible = false;
   
   
    //this is essentially the id number for each movie clip
    my_text = j+""+i;   
   
  _root["mc" + i].text_id  = my_text;
  _root["mc" + i].box_id  = my_text;
   
  _root["mc" + i].onRollOver = function()
  {
        //trace("text ID  in function: " add "tinyText" + this.text_id);
        //trace(" box ID  in function: " add "box" + this.box_id);
        _root["tinyText" + this.text_id]._visible = true;
        _root["box" + this.box_id]._visible = true;
       
  }
   
    _root["mc" + i].onRollOut = function()
    {
        _root["tinyText" + this.text_id]._visible = false;
        _root["box" + this.box_id]._visible = false;
    }
    id_count++;
  }

  _global.layer_count++;
}

Dynamic Bar Graph From Input Text Field
Hello!

I am trying to make a bar graph that tweens to the height, or decrease, according to the number defined in the Dynamic text box. I would like to use the tween class from MX for a nice bounce effect. Here is my code:

import mx.transitions.Tween;
import mx.transitions.easing.*;

ICcost._height = Number(ICC1);

new Tween(ICcost, "_yscale", Elastic.easeOut, 0, ICC1, 2, true);

ICC1 is the dynamic text field that displays a number from a formula through a couple input boxes. ICcost is the name of the MC I want tweened.

As I have it now it doesnt tween, the height just goes to the ICC1 number which is ok for now. Is there a way to set the tween to happen when flash registers a change in the number? I am fairly comfortable with AS2 and I know there is a way I just don't know exactly what I am looking for. Any help or suggestions would be great!

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

How To Make A Pie Graph That "grows"
I've got a jpg image of a pie graph and what I want to do is make a movie in which the graph starts out completely masked and then it slowly unmasks so that it appears that the pie is being formed. I know how to create masks and masked layers, but how can you use a masks in a case like this?

Any suggestions?

Thanks,

Michael

Dynamic Multiple Choice Quiz - How To Make It Dynamic
Hi all,
I'm a programming-in-Flash-other-than-basic-stuff-newbie and would appreciate any help on a project I need done this week. I've been using the multiple choice quiz template. It's for an online pop trivia game using covers. Here's the basics:

You see three pictures and pick one of them. You are taken to a question about the cover. You answer it and your right or wrong choice tally starts. You are then taken to the "choose a cover from the 3 pics" screen again. Only this time the picture you have chosen is replaced by another picture so that there are the two pics that were up already that you didn't choose and 1 new one. You choose one of the 3 and answer it. The process continues for around 10 questions.

I'm thinking of a data pool of about 20 pics with each pic attached to one question which I can use the multiple choice componant for.

Any suggestions?

Please look here: http://www.sircuss.com/test/otcquiztest.swf

sircuss

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.

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.

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?

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 ?

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.

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.

Copyright © 2005-08 www.BigResource.com, All rights reserved