A Flash Developer Resource Site














Internet Commerce

Partners & Affiliates














Developer Channel

internet.com


Featured Flash FLA
Gallery Downloads 11337 Flash Movies | 1 New Flash Movies Added
What's New | Top 100

Featured FLA

» Author: Bugra Ozden
» Title: Skatalog v9 - product catalog
» Description: Create your product catalog easly and publish on your website or Create your image gallery, documents list, portfolio. Fully XML Driven
» More by Bugra Ozden


Random FLAs | Add Flash Movie
Featured Flash Site
Gallery Downloads 5828 Flash Sites | 0 New Flash Links
What's New | Top 100 Flash Site

Featured Site

» Posted in the Flash Kit Links section
» Title: Creative DW Image Show PRO
» Description: Creative DW Image Show PRO is a Dreamweaver extension which enables the user to create multimedia presentations. It combines the features of the popular Creative DW Image Show with the ability to add professional text effects to slides (similar to After Effects). The product is very customizable: the user can choose the duration of the transition effects, the slide motion start and end position, zoom and panning type for both images and texts.


Random Links | Add your own Flash Related Links
Flash Tutorials 1280 Tutorials 7 New Tutorials Added!
What's New | Top100

» Make a Flash Slide Show Screen Saver
» Simple flash making tutorial for thanksgiving
» Create flash banner for website
» Create xml slideshow with free template
» How to Insert a Multilingual Subtitle Into Your Flash Video Studio
» How to Create Cool Halloween Slideshow
» Debugging flash using the Firebug console
» Create Flash Slideshow on Blogger
» FLASH TRICKS IN WEB ADVERTISING: FLASH BANNERS
» Unknown Tag: Title10
Random Tutorial | Add Site

Trading Customer Accounting (IL)
Next Step Systems
US-IL-Chicago

Justtechjobs.com Post A Job | Post A Resume


Tutorials Home What's New Top Rated Submit myTutes Random!

Search Tutorials


Tutorials Tutorials » Games

Categories Detecting the Mouse Angle
Author: Flash Junkie | Website: http://www.flashkit.com |

 
Page 2
«prev 1 2 3 4 5 6 7 next»

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/
.1045/.1219/.1392/.1564/.1736/.1908/.2079/.2250/.2419/.2588/.2756/.2924/
.3090/.3256/.3420/.3584/.3746/.3907/.4067/.4226/.4384/.4540/.4695/.4848/
.5000/.5150/.5299/.5446/.5592/.5736/.5878/.6018/.6157/.6428/.6561/.6691/
.6820/.6947/.7071/.7193/.7314/.7431/.7547/.7660/.7771/.7880/.7986/.8090/
.8192/.8290/.8387/.8480/.8572/.8660/.8746/.8829/.8910/.8988/.9063/.9135/
.9205/.9272/.9336/.9397/.9455/.9511/.9563/.9613/.9659/.9703/.9744/.9781/
.9816/.9848/.9877/.9903/.9925/.9945/.9962/.9976/.9986/.9994/.9998/1.000"

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 :

http://library.thinkquest.org/20991/home.html - Go here if you aren't up on trig.

«prev 1 2 3 4 5 6 7 next»

» Level Advanced

Added: : 2000-12-18
Rating: 6.29 Votes: 91
Hits: 7711
» 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.
Download (7 kb)
Get conversion and unzipping tools for PC and Mac here!

» Forums
More help? Search our boards for quick answers!

Please rate this tutorial, 10 is the top rating, you can also click the comments link to read/write a review.
10 9 8 7 6 5 4 3 2 1
Read or Post Comments
 
   
 

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs