Hello,
I am new to the group and to Flex/Flash. We have a mapping tool that we had created about a year back that uses flash 8. We want to move up to Flex 2 for a number of reasons. I am trying to create the mapping hello world application. We use a standard png image as the background for the map. I am trying to create a simple image in a panel that has a series of buttons to the left where I can zoom in/out and pan in all directions. The zoom in/out is working fine (although I have questions regarding that) but the pan is not working. My code is attached to the bottom of this email message. Logically the steps I need to go through to get this to work are: 1. Simple map - Image management Pan Zoom.... Possibly overview window similar to Google or Yahoo. 2. Create an object that is a member of that map. This object needs to be able to display itself as a number of different types (Images, dots, characters). After reading through tutorials, I can create my own object that descends from a sprite. My questions here are will the dot zoom and coordinate based on the zoom, pan of the background map? How can I make that happen? 3. More complex tooltips than the standard tooltips. I want a tooltip that displays about 5-10 lines of information and possibly links to other areas of the web site. Would you just create a separate window to act as a tooltip window and place whatever information in the window you need? 4. Incorporating effects to the movements of these objects. I've seen the component explorer, I want the movement of these items on the map to slide from one spot to the other. The demo app in the explorer works well. How would you combine multiple effects to happen at the same time? Any help would be greatly appreciated. Step 1 Source Code <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal"> <mx:Script> <![CDATA[ private function panUp():void { myMap.scrollRect.top -= 10; trace(myMap.scrollRect); if (myMap.scrollRect.top < 0) { myMap.scrollRect.top = 0; } } private function panDown():void { myMap.scrollRect.top += 10; trace(myMap.scrollRect); if (myMap.scrollRect.top < 0) { myMap.scrollRect.top = 0; } } private function panRight():void { myMap.scrollRect.left += 10; trace(myMap.scrollRect); if (myMap.scrollRect.left < 0) { myMap.scrollRect.left = 0; } } private function panLeft():void { myMap.scrollRect.left -= 10; trace(myMap.scrollRect); if (myMap.scrollRect.left < 0) { myMap.scrollRect.left = 0; } } private function zoomIn():void { myMap.scaleX += 0.1; myMap.scaleY += 0.1; } private function zoomOut():void { myMap.scaleX -= 0.1; myMap.scaleY -= 0.1; } ]]> </mx:Script> <mx:VBox height="100%"> <mx:Button label="Left" id="btnLeft" click="panLeft()"/> <mx:Button label="Right" id="btnRight" click="panRight()"/> <mx:Button label="Up" id="btnUp" click="panUp()"/> <mx:Button label="Down" id="btnDown" click="panDown()"/> <mx:Spacer/> <mx:Button label="Zoom In" id="btnZoomIn" click="zoomIn()"/> <mx:Button label="Zoom Out" id="btnZoomOut" click="zoomOut()"/> </mx:VBox> <mx:Panel width="100%" height="100%" layout="absolute" cornerRadius="33" backgroundColor="#c0c0c0" id="myPanel" title="Map Basics 101" fontFamily="Georgia" fontSize="16"> <mx:Image horizontalCenter="20" verticalCenter="20" width="504" height="601" source="SB memorial map.png" scaleContent="false" id="myMap"/> </mx:Panel> </mx:Application> -- 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/