Hi, Where is it called a Shockwave control....can you give the exact location so we can get it fixed?
-David > -----Original Message----- > From: [email protected] > [mailto:[EMAIL PROTECTED] On Behalf Of JesterXL > Sent: Thursday, November 03, 2005 9:30 AM > To: Flexcoders > Subject: [flexcoders] Yahoo Maps Example > > For those who want to see a quick example, you can download > the SWC (stupidly called Shockave control on the site, that's > where the confusion came in), and use this code. Keep in > mind the sliders are NOT BACKWARDS! > Since I'm not a map geek, this was my first lesson in > latitude & longitude as applied to map movements. > > --JesterXL > > <?xml version="1.0" encoding="utf-8"?> > <mx:Application > xmlns:mx="http://www.macromedia.com/2003/mxml" > xmlns:yahoo="com.yahoo.maps.api.flex.*" > initialize="onMapInit()"> > > <mx:Script> > <![CDATA[ > > // import mx.managers.PopUpManager; > import mx.utils.Delegate; > > import com.yahoo.maps.LatLon; > import com.yahoo.maps.Marker; > import com.yahoo.maps.markers.CustomSWFMarker; > import com.yahoo.maps.markers.WaypointMarker; > import com.yahoo.maps.api.flex.YahooMap; > > public var latitude:Number = 37.771829; public var > longitude:Number = -122.401681; > > //private var debugWindow:DebugWindow; > > function onMapInit():Void > { > //debugWindow = DebugWindow(PopUpManager.createPopUp(this, > DebugWindow, false)); > //debugWindow.move(400, 400); > } > > function onYahooMapInit() > { > //d("start map lat: " + map_ym.latitude); > //d("start map long: " + map_ym.longitude); > //dProps(WaypointMarker); > lat_slider.value = latitude; > //d("long_slider.value: " + long_slider.value); > //d("longitude: " + longitude); > long_slider.value = longitude; > //d("long_slider.value: " + long_slider.value); > zoom_slider.value = map_ym.getZoomLevel(); > > var a:LatLon = new LatLon(latitude, longitude); > map_ym.setCenterByLatLon(a, 0, false); > > //var a:LatLon = new LatLon(latitude, longitude); > //var m = map_ym.addMarkerByLatLon(CustomSWFMarker, > map_ym.getCenter(), > {url: "bluebox.swf"}); > //m.addEventListener(YahooMap.MARKER_INITIALIZE, > Delegate.create(this, onMarker)); > //m.addEventListener("toolAdded", this); > //var rs = m.callCustomMethod("getMoo"); > //d("rs: " + rs); > //var m = map_ym.addMarkerByLatLon(WaypointMarker, > map_ym.getCenter()); > //d("m.isVisible: " + m.isVisible()); > //m.show(); > } > > function onMarker(o) > { > d("onMarker"); > } > > > function d(o) > { > //debugWindow.d(o); > } > > public function dProps(o) > { > for(var p in o) > { > d(p + ": " + o[p]); > } > } > > function updateCords():Void > { > //d("before lat: " + latitude); > //d("before long: " + longitude); > //d("before map lat: " + map_ym.latitude); > //d("before map long: " + map_ym.longitude); > latitude = lat_slider.value; > longitude = long_slider.value; > //d("after lat: " + latitude); > //d("after long: " + longitude); > > > var a:LatLon = new LatLon(latitude, longitude); > map_ym.setCenterByLatLon(a, 3000, false); > /* > d("a.lat: " + a.lat); > d("a.lon: " + a.lon); > d("after map lat: " + map_ym.latitude); > d("after map long: " + map_ym.longitude); > */ > } > > private function updateZoom() > { > map_ym.setZoomLevel(zoom_slider.value); > } > > > ]]> > </mx:Script> > > <mx:Canvas > width="100%" height="100%"> > > <yahoo:YahooMap > id="map_ym" > x="0" > y="0" > latitude="{latitude}" > longitude="{longitude}" > width="100%" > height="100%" > zoomLevel="5" > initialize="onYahooMapInit()" /> > > <mx:HSlider > id="lat_slider" > x="5" > y="206" > width="200" > liveDragging="false" > minimum="-200" maximum="200" > showToolTip="true" > thumbCount="1" > thumbReleased="updateCords()"/> > > <mx:VSlider > id="long_slider" > x="200" > y="6" > height="200" > liveDragging="false" > minimum="-200" maximum="200" > showToolTip="true" > thumbCount="1" > thumbReleased="updateCords()"/> > > <mx:HSlider > id="zoom_slider" > x="4" > y="0" > width="180" > liveDragging="false" > minimum="1" > maximum="17" > showToolTip="true" > thumbCount="1" > thumbReleased="updateZoom()" snapInterval="1" tickInterval="1" > height="22" /> > > > </mx:Canvas> > > </mx:Application> > > > > ------------------------ Yahoo! Groups Sponsor > --------------------~--> Get Bzzzy! (real tools to help you > find a job). Welcome to the Sweet Life. > http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/nhFolB/TM > -------------------------------------------------------------- > ------~-> > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: > http://www.mail-archive.com/flexcoders%40yahoogroups.com > Yahoo! Groups Links > > > > > > > ------------------------ Yahoo! Groups Sponsor --------------------~--> Fair play? Video games influencing politics. Click and talk back! http://us.click.yahoo.com/T8sf5C/tzNLAA/TtwFAA/nhFolB/TM --------------------------------------------------------------------~-> -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

