Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: Creating graphs using Flash/PHP or Flash/ASP
From: Helen Triolo
Date: Tue, 11 Apr 2000 16:19:45 +0100

Sorry to repost, but and hour after I sent it, this hasn't shown up on
the list. I'd amend the solution to say that setting the yscale of the
rectangle movieclip would probably be better than duplicating it, but it
would be the same idea--you'd use yscale=height of unit increment * 100
(since it's a percent). Or you could make the rectangle be as tall as
the absolute maximum, if you know that in advance, and then scale each
bar down accordingly.

Chris Stowell wrote:
>
> I'd like to produce a bar graph that has 5 bars on the x axis (for example)
> with each bar on the axis having a height that is dependant on a variable that
> is passed to the movie.
>
> Problem is I don't really know where to start with controlling the size of a
> rectangle.
>
> Any answers or pointers to existing resources?
>

Chris,

Off the top of my head, you should be able to make a rectangle that's as
wide as a bar and as tall as whatever increment you want to use in your
graph, convert it to a movie clip, and then duplicate it as many times
as the graph is tall. I did this kind of thing in the pie chart example
I posted yesterday (reads data via ASP from an Access database), only
the slice repeats rather than a rectangle. You can see it and download
the fla for some example actionscript code at
http://i-technica.com/whitestuff/piechart.html if you want.

Regards,
Helen
----------------------------------------
helen triolo · http://i-technica.com
designerati-technica [dot] com · 301-424-6037
----------------------------------------

flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the last 100 messages from the flasher list NOW
http://www.chinwag.com/flasher/last100.shtml

Flash books http://www.chinwag.com/flasher/books.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  FLASH: Creating graphs using Flash/PHP o, Chris Stowell

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]