Can you get the lat or lng of your objects?
On Feb 3, 2011 5:29 PM, "Thomas" <[email protected]> wrote:
> Hi,
>
> I'm currently trying to detect the distance between markers and a sprite.
> I'm trying to create a map with audio clips attached to the markers on the
> map. When the sprite is moved over them the audio clip plays. I've done
this
> but now I want the volume of the sound to be determined by how close the
> marker is to the center of the sprite. I've attempted to do this using
this
> method:
>
> if(marker1.foreground.hitTestObject(circle)) {
> sc1 = sound1.play();
> var ptMC6:Point = new Point(circle.x, circle.y);
> var pt6:Point = new Point(marker1.foreground.x, marker1.foreground.y);
> var diff6 = Point.distance(pt6, ptMC6);
> trace(diff6);
>
> var vol8:Number = 1 - (diff6/aura_slider.value);
> var st8:SoundTransform = new SoundTransform(vol8);
> sc1.soundTransform = st8;
> trace(marker1.foreground.x, marker1.foreground.y);
>
> "circle" is my sprite.
> "marker1" is my marker
> "sc1" is my soundchannel.
>
> The problem with this method is that the marker x,y coordinates return as
> 0,0.
> Is there anyway of retrieving real x,y coordinates using this method or am
I
> going the wrong way about this completely?
>
> Any help would be appreciated,
> Thomas
>
> --
> You received this message because you are subscribed to the Google Groups
"Google Maps API For Flash" group.
> To post to this group, send email to
[email protected].
> To unsubscribe from this group, send email to
[email protected].
> For more options, visit this group at
http://groups.google.com/group/google-maps-api-for-flash?hl=en.
>
--
You received this message because you are subscribed to the Google Groups
"Google Maps API For Flash" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-api-for-flash?hl=en.