Made progress but have a new set if questions: 1. Within a sprite, is the best way to have part of the sprite drawing as text to have an internal label or text field object inside of the sprite class? Is there a way to do a graphics.Drawtext or TextOut?
2. Same for an image, if I have a sprite that has 2-4 different objects, shapes as part of it and one is an image, what is the best way to load that? Just an image control? 3. In a sprite, I seem to always have a square graphic (makes sense) but if I pass the graphic to DrawDropShadow, it works fine except it draws a square drop shadow. Let's say I have a circle and want a circle drop shadow, how can that be done? 4. Why no tooltips for sprites? Why no HTML tool tips? Both can be created I guess but they would seem to make sense. 5. General mem management question if I have a function that does : { var array1:Array = new Array [1,2,3] // do stuff } Does the array just dissappear with garbage collection in this instance? Do i need to set it to null? 6. when I add a label to my sprite, I have trouble setting the font and font size. I am use to something like label1.font.size or label1.fontsize. I try to access this and it does not work properly. 7. Back to my panning example. I have a image (lets say 2000x2000) and a view port that is 400x400 making part of the map visible. I want the map to slide in the background to another point. Is there an easy way to do this? 8. Simple flash stuff. How do I access variables passed in to control from HTML? --- In flexcoders@yahoogroups.com, "richmcgillicuddy" <[EMAIL PROTECTED]> wrote: > > 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/