First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing!
Search tutorials

<- A "sine wave" (for the remainder of this tutorial I will refer to sine by it's common abbreviation "sin".

Well, Macromedia flash has this mathmatical function all nicely coded up for you (TRUST ME, we don't want to start working with the power series that is used in the calculation of sin). Sin works by taking in a parameter and giving back a number between -1 and 1. As we tell it where on the X-axis we want current Y. For math haters: this simply means we read the wave from left to right, each position has a particular number, at each given position, the sin function tells us where to put the ball.

So, let's lay out the dots. What we want to do first is actually graph out the sin wave. We can do this by asking the sin function how high (between -1 and 1) should each ball be. But between -1 and 1 is a small small graph! So let's scale it by a variable factor. This way we can increase the size at a whim.

Increment the x-axis value and then call the corrisponding Y axis value as the sin(someStartValue + x * PI/180).
You multiply by PI/180 to convert to radians.

This will give us the sin wave, made up of the balls we have supplied. If you don't know how to do duplication of movie clips, you must first get the hang of that, and basic flash programming before truly understanding this system in the code sense, but anyone should understand how it works in a hypothetical sense.

» Level Intermediate

Added: 2004-09-12
Rating: 4 Votes: 39
(10 being the highest)
» Author
Please visit my site and/or email me if you want more tutorials from me!
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!


  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: work2survive
» Title: Girl Walking 1kb
» Description: Walking girl, animation just takes 1kb, using high heels shoes, and fashion model attitude.
Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.