First time here? First time here? Newsletter Signup Newsletter
Login | Register | 651326 Members and growing!
Search tutorials
Author: Flash Junkie | Website:

Trig Refresher

Ever want to go back and do some high school Trigonometry again? Oh boy is this the right place.

Comment: ----------------------------------------------
Comment:          Manually Set Movie Center
Comment: ----------------------------------------------
Comment: also set the origin of the line object movie clip to this number
Set Variable: "scr_ctr_x" = 200
Set Variable: "scr_ctr_y" = 200
Comment: ----------------------------------------------
Comment:     lookup table for sine values
Comment: ----------------------------------------------
Set Variable: "sine_lookup_table" = "0.000/.0175/.0349/.0523/.0698/.0872/

Above is the "variable" frame on the main timeline. In it, we need to set the 0,0 point of the effect. The reason is, Flash's 0,0 point is at the top left hand corner of the movieboard. Since my movie is 400x400 the point 200,200 is a convenient point to centre the effect on. The 0,0 point of the "pointer line" is also at 200,200. Notice the way that movie clip is built. You will see that the little "plus" sign (the origin) is at the point of the artwork around which the rotation will occur. We will use these variables later.

The other important thing you need is a sine lookup table. Why? You need to do some trig! Since Sin(Theta)=O/Hyp and since this relationship is always constant (in other words, it doesn't matter what length 'O' and 'Hyp' are, their proportions will always be the same when the angle between them is the same.) Hey. I may not be the best at explaining this stuff. I only re-learned it the other day from : - Go here if you aren't up on trig.

» Level Advanced

Added: 2000-12-18
Rating: 6 Votes: 92
(10 being the highest)
» Author
Flashjunkie is a self-professed obsessive addict of life. Due to the highly artistic nature required of an Art Director for an Ad agency, he took up Flash to add some math to his diet.
» 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: Inocreato
» Title: RaiseTheBlocks
» Description: Raise all the blocks to win the game
Featured Sound Loops
Image for equalize

Audio Player

» Author: TomCat Carty
» Title: The Wood
» Description: Just a little game ending or it can maybe be looped. Recorders with music box and percussion to give the feel of well, I don't know, the woods? Free to use, just credit me. thank you
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: Davisigner
» Description: Hmm... what to say about this one? It's reminiscent of the closing notes of the opening music from the Three Stooges done in a church organ style with a closing cymbal crash. I'll give this one away gratis, but feel free to check out my free loops and potential upcoming license-mandated ones over in the respective part of Flashkit.