While the default geolocation sensor update interval may be just fine for most applications, what if we would like to speed up or slow down this interval for a specific purpose?
We will need to change the geolocation sensor update interval using methods included with the Geolocation
class:
1. First, import the following classes into your project:
import flash.display.Sprite; import flash.display.Stage; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.GeolocationEvent; import flash.events.TouchEvent; import flash.sensors.Geolocation; import flash.text.TextField; import flash.text.TextFormat; import flash.ui.Multitouch; import flash.ui.MultitouchInputMode;
2. We'll now declare a number of objects to use in the example. First, a
TextField
andTextFormat
object to allow visible output upon the device, along with anGeolocation
object.3. Then we will need to also employ a
Number
to keep track...