Flasher Archive

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


Subject: RE: FLASH: Tool Check
From: Roxanne Tuton
Date: Thu, 10 Aug 2000 04:04:20 +0100

The scaling effect is pretty simple. Assume that you have 2 points and 1
line. You duplicate the line and set the X and Y coordinates of the line
equal to the x and y coordinates of the first points. Then set the xscale
equal to the x coordinate of the second point minus the x coordinate of the
first point. To make it stretch dynamically while you pull the points put
the actions in a looping movie clip. For example:

I have a movie named Duplicate:
The first frame looks like this....

Set Variable: "countdots" = 1
Loop While (countdots <= /:Total)
Duplicate Movie Clip ("/dot", countdots, (countdots+1)+1000)
If (Eval("/:x"&countdots) ne "")
Set Property ("/"&countdots, X Position) = Eval("/:x"&countdots)
Set Variable: "/:x"&countdots = ""
Else
Set Property ("/"&countdots, X Position) =
GetProperty("/"&(countdots-1),_x) + 25
End If
If (Eval("/:y"&countdots) ne "")
Set Property ("/"&countdots, Y Position) = Eval("/:y"&countdots)
Set Variable: "/:y"&countdots = ""
Else
Set Property ("/"&countdots, Y Position) = 10
End If
Set Variable: "countdots" = countdots+1
End Loop

This will make little sense as alot of it has to do with other parts of the
graph but basically, it creates a certain number of points and places them
according to certain x and y coords.

The second frame looks like this:

Set Variable: "x" = 1
Loop While (x<=/:Total-1)
Duplicate Movie Clip ("/line", "newLine"&x, (x+1)+5000)
Set Property ("/newLine"&x, X Position) = GetProperty("/"&x,_x)
Set Property ("/newLine"&x, Y Position) = GetProperty("/"&x,_y)
Set Property ("/newLine"&x, X Scale) =
GetProperty("/"&(x+1),_x)-GetProperty("/"&x,_x)
Set Property ("/newLine"&x, Y Scale) =
GetProperty("/"&(x+1),_y)-GetProperty("/"&x,_y)
Set Variable: "x" = x+1
End Loop

This is what attaches the line to the 2 dots.

and the final frame looks like this:

Go to and Play (2)

Self-explanatory. heh. Anyways, I built this for a couple reasons...I work
for an elearning company and it is something that I thought could be useful.
Also, the graph is set up to run by itself but if variables are passed to
it, it will plot out whatever points it is told to(text file, database,
whatever) and I plan on using it(as well as a bar graph and pie chart I am
building) to display site statistics for my site and other clients sites. I
might open source it(or something similar) on my site in about a month when
we launch our web site. It would be under tutorials or Flas or whatever we
choose to call the section. Go check out the site: http://www.flashpros.com

Not much there but you can sign the guestbook and I can email you when the
site is launched/updated.

Hope some of those tips/code help.

Scott

-----Original Message-----
From: owneratchinwag [dot] com [owneratchinwag [dot] com]On">mailto:owneratchinwag [dot] com]On Behalf Of Scott
Burkette
Sent: Wednesday, August 09, 2000 5:35 PM
To: flasheratchinwag [dot] com
Subject: Re: FLASH: Tool Check


Scott J.

I love the graphing tool that you have created. In using it I found
the interface intuitive, however, when I grabbed and moved a point
the pop up would only display the value of that point on the Y axis.
I would have liked to see the value of the point on both the X and Y
axis. I could not delete points with the delete key (on my G4). in
addition, when I scaled the X axis with the arrow slider my points,
which were at the very top of the Y axis, vanished.

I am very interested in how you accomplished the dynamic scaling and
rotation of the lines between the points. I do not know under what
conditions you created this, but I am wondering if you could share
some of your actionScript? Even friendly advice on this feat would
help me in my current project.


>I just wrote a graphing program in Flash. Can you guys check it out and
give
>it a good beta-testin'? There is a description of what it can do at the
>bottom of the page. The URL is:
>http://www.flashpros.com/GraphingTool/IOGraphTool.html
>
>Thanks for any comments.
>
>Scott Jeppesen
--
Scott Burkette, MS

LessonLink, Inc.
Head of Flash Development

sburketteatlessonlink [dot] com
Voice: (909) 676-7290
Fax: (909) 676-9753
Cell: (909) 533-0027

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Full flasher archive now available online at:
http://www.chinwag.com/flasher/archive.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Full flasher archive now available online at:
http://www.chinwag.com/flasher/archive.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  RE: FLASH: Tool Check, Scott Burkette

Replies
  Re: FLASH: Tool Check, Scott Burkette

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