Mailing List
Home
Forum Home
Flash Pro
Subjects
Subject: RE: Firework Effect
Web Service Results
Flash Interface with 10mb xml file
AW: [Flashcoders] Switch/Case vs If/else
AW: [Flashcoders] Switch/Case vs If/else
Flash MX 2004 Sucks
Reading and displaying RSS feeds in Flash MX
Flash and QuickTime VR
Textfield prototype question
XML to Object help
Order of events per frame
MX2004 Dataset itemClassName
memory management removeMovieClip /
Event Dispatcher between classes
Help: MX 2004 How to script a print button to print the entire sli
ScrollPane component doesn 't auto update
setInterval bug identified and fixed
setInterval bug identified and fixed
Listener Object 's best practice
 
Subject: Distances

Subject: Distances

2004-03-20       - By Harper, Chris

 Back
Reply:     1     2     3     4     5     6  

Thanks jayson.  Yeah, it works :)

-- --Original Message-- --
From: Jayson K Hanes [mailto:jayson@(protected)]
Sent: Saturday, March 20, 2004 1:08 PM
To: flashcomm@(protected)
Subject: RE: [FlashComm] Distances


A VERY simplified quick translation to AS.. (seems to work? I need to
test some coordinates next)..

lat1(;lon1?2.3;
lat2 ;lon2?0.0;
var miles;
var dlon;
var dlat;
var a;
var c;
var factor;
factor = (2*Math.PI)/180
lat1 = lat1 * factor;
lon1 = lon1 * factor;
lat2 = lat2 * factor;
lon2 = lon2 * factor;
dlon = lon2 - lon1;
dlat = lat2 - lat1;
a = (Math.sin(dlat/2))*(Math.sin(dlat/2)) + Math.cos(lat1) *
Math.cos(lat2) * (Math.sin(dlon/2))*(Math.sin(dlon/2));
c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a) );
miles =  3961 * c;
trace(miles);

....Jayson

  -- --Original Message-- --
  From: Harper, Chris [mailto:charper@(protected)]
  Sent: Sat 3/20/2004 1:12 PM
  To: flashcomm@(protected)
  Cc:
  Subject: RE: [FlashComm] Distances
 

 


-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Supported by Fig Leaf Software
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
Lower Prices for Certified Training! Check out new lower prices for
Certified Macromedia Training from Fig Leaf Software. Expand your
skill set with courses in ColdFusion, Flash, Rich Internet
Applications and .NET in the new year.  Fig Leaf Software provides
the highest caliber instruction at our training centers in Washington
D.C., Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at
your location.

Get the details at http://training.figleaf.com/
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: flashcomm-unsubscribe@(protected)
For additional commands, e-mail: flashcomm-help@(protected)