[flexcoders] Flex 4.5 debugging issue
I am upgrading my projects from Flex 3 to Flashbuilder 4.5. The final swfs are part of a bigger web site that requires authentication. In Flex 3, I could open a IE browser window, log in, leave that window open, then when I debugged an SWF, it opened a new browser window but the authentication that created in the other window was valid for my debugging session. In FB 4.5, it looks like my authentication is lost which makes debugging very difficult or impossible. The authentication is stored in cookies in the browser, any ideas?
[flexcoders] Animating Grid Slowdown in Flex 3
Doing a simple resize of a grid from full screen to small list on the left. When I animated it, it looks great using a Resize object. I run this without any data in the grid. Incredibly fluid animation. I add about 700 records and run the exact same animation, and the animation doesn't work. It thinks about it for 3-5 seconds, then finally shows up in the final position. Is there something I need to do to lock the grid when I do this so that it can leave the data in the grid?
[flexcoders] Flex 3 Libraries - Copying into Flex Project Directory
In flex 3, if I have a flex project with a shared library in a source path (options - flex build path), sometimes the project will copy over everything below the flex project directory from the shared library. Where is this flag to stop this behavior? Rich
[flexcoders] Re: Catching graphics update on UIComponent
Alex, I tried this with Flex 2.01 and it did not work properly. Still the same number. The updated code looks like: currentNum += thisAmount; lblNumber.text = String(currentNum); this.validateNow(); Still get a grid of the same initial value. Rich --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: Try calling validateNow() before taking the snapshot Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of richmcgillicuddy Sent: Saturday, July 11, 2009 6:53 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Catching graphics update on UIComponent I have a UIComponent that is a component made up of a label and a background image. I am running a loop to update the component, change the label and copy the resulting bitmap to a standard image. My result is that I get the image without any updates. The add function just pushes the counter of the label up 1 and updates the .text field of the label. The code looks like... I know invalidatedisplaylist just adds a flag to a future update but how should this be built. var curX :int = 10; var curY : int = 70; var anImage : Image; var imageBitmapData:BitmapData ; while (curY this.height) { bbMain.add(1); if (curX this.width) { curX += 60; } else { curY += 60; curX = 10; } this.invalidateDisplayList(); // Copy into new image anImage = new Image(); anImage.width = 54 anImage.height = 54; anImage.x = curX; anImage.y = curY; this.addChild(anImage); imageBitmapData = ImageSnapshot.captureBitmapData(bbMain); anImage.source = new Bitmap(imageBitmapData); }
[flexcoders] Catching graphics update on UIComponent
I have a UIComponent that is a component made up of a label and a background image. I am running a loop to update the component, change the label and copy the resulting bitmap to a standard image. My result is that I get the image without any updates. The add function just pushes the counter of the label up 1 and updates the .text field of the label. The code looks like... I know invalidatedisplaylist just adds a flag to a future update but how should this be built. var curX :int = 10; var curY : int = 70; var anImage : Image; var imageBitmapData:BitmapData ; while (curY this.height) { bbMain.add(1); if (curX this.width) { curX += 60; } else { curY += 60; curX = 10; } this.invalidateDisplayList(); // Copy into new image anImage = new Image(); anImage.width = 54 anImage.height = 54; anImage.x = curX; anImage.y = curY; this.addChild(anImage); imageBitmapData = ImageSnapshot.captureBitmapData(bbMain); anImage.source = new Bitmap(imageBitmapData); }
[flexcoders] Chart tooltip issue
Using a standard line chart with a separate data tip renderer dataTipRenderer=SimpleDataPointTip. I don't currently move it or modify it at all except to place data in it. The problem is that the tooltip goes off the screen for the data points on the far right. Is there something I need to set in order to have the tooltip recognize it will not fit to the right of the datapoint and display it to the left so it doesn't get cut off? Rich
[flexcoders] Re: Hittest for polygon UI Component
Alex, The Polygon display object is called a MapZone. We've deconstructed the application and still see the same behavior directly on the application canvas. To create a MapZone and place it on the canvas, the following code does this: aZone = new MapZone(); aZone.zoneName = Test Area; aZone.toolTip = Test Area; aZone.setZoneCoordsString(124,249;198,249;198,316;124,316;); this.addChild(aZone); The mapZone extends a UIComponent and looks like: public class MapZone extends UIComponent { public function MapZone() { super(); ... } On processing the poly points, the location and size(height/width) of the mapZone is set properly. The drawing is in the UpdateDisplayList and looks like: override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { var nIndex : int; var xyString : String = new String(); var lastX : int = -1; var lastY : int = -1; super.updateDisplayList(unscaledWidth,unscaledHeight); graphics.clear(); // Set Fill Series of MoveTo's and LineTo's } Are there other things I need to set for a UIComponent. The behavior we are seeing is that some zones will display the tooltip and mouse events for a larger height than the zone actually is. We don't see this behavior in the Y direction. An example from a trace is Zone Roll Over - TestZone (49,99) - 707,125;786,125;786,192;707,192;--707,125--67,79 Where (49,99) is the X,Y of the mouseevent, 67,79 is the Height/Width of the MapZone and the polystring is provided. The mouse coordinates (localX, localY) are larger that either dimension of the mapobject and we double checked to see if we flip flopped any of the height/widths and it does not appear like we have. The only place we see this is a mapZone will think that it is taller than it really is. It displays correctly, the upper x,y work fine and the left/right work fine as well. Rich --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Show some code. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of richmcgillicuddy Sent: Tuesday, July 01, 2008 2:25 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Hittest for polygon UI Component Could be the containers I am using but that is not what I am seeing. Rich --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: The area drawn inside a UIComponent doesn't have to be rectangular, we just track everything by its bounding box. If you drew a circle in there, it would only get mouse events on the pixels in the circle, anything below would get the events in the non-drawn area. However, there is a hitTestPoint method. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of richmcgillicuddy Sent: Monday, June 30, 2008 7:20 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Hittest for polygon UI Component I have a series of objects that extend a UI Component and I correctly draw a list of polypoints in the UIcomponent. I use the UIComponent for the tooltips, mouse events and some other stuff. My probably is that ultimately UIComponent is a rectangle. is there a different base component I should use or is there a way for me to do a hittest on mouse events to say whether the mouse is in/out of the component? Rich
[flexcoders] Re: Hittest for polygon UI Component
Some more research. It happens on all zones that appear to be simple or close to simple rectangles. Whether it shows up or not is merely a z-order side effect. I do have one zone that is clearly not similar to a rectangle and it seems to work properly. Rich On your questions, scaleX,Y are 1, the EventTarget is the MapZone in question and I am looking at both the localX,Y and the StageX,Y so I fairly certain they look correct. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: The event.target and event.relatedObject of your mouse events are important, especially because localX/Y is relative to the event.target so you could just be reporting coordinates incorrectly. Verify your targets and position. Keep in mind that scaling can also affect the way graphics are drawn. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of richmcgillicuddy Sent: Tuesday, July 08, 2008 9:41 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Hittest for polygon UI Component Alex, The Polygon display object is called a MapZone. We've deconstructed the application and still see the same behavior directly on the application canvas. To create a MapZone and place it on the canvas, the following code does this: aZone = new MapZone(); aZone.zoneName = Test Area; aZone.toolTip = Test Area; aZone.setZoneCoordsString(124,249;198,249;198,316;124,316;); this.addChild(aZone); The mapZone extends a UIComponent and looks like: public class MapZone extends UIComponent { public function MapZone() { super(); ... } On processing the poly points, the location and size(height/width) of the mapZone is set properly. The drawing is in the UpdateDisplayList and looks like: override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { var nIndex : int; var xyString : String = new String(); var lastX : int = -1; var lastY : int = -1; super.updateDisplayList(unscaledWidth,unscaledHeight); graphics.clear(); // Set Fill Series of MoveTo's and LineTo's } Are there other things I need to set for a UIComponent. The behavior we are seeing is that some zones will display the tooltip and mouse events for a larger height than the zone actually is. We don't see this behavior in the Y direction. An example from a trace is Zone Roll Over - TestZone (49,99) - 707,125;786,125;786,192;707,192;--707,125--67,79 Where (49,99) is the X,Y of the mouseevent, 67,79 is the Height/Width of the MapZone and the polystring is provided. The mouse coordinates (localX, localY) are larger that either dimension of the mapobject and we double checked to see if we flip flopped any of the height/widths and it does not appear like we have. The only place we see this is a mapZone will think that it is taller than it really is. It displays correctly, the upper x,y work fine and the left/right work fine as well. Rich --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: Show some code. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of richmcgillicuddy Sent: Tuesday, July 01, 2008 2:25 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Hittest for polygon UI Component Could be the containers I am using but that is not what I am seeing. Rich --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: The area drawn inside a UIComponent doesn't have to be rectangular, we just track everything by its bounding box. If you drew a circle in there, it would only get mouse events on the pixels in the circle, anything below would get the events in the non-drawn area. However, there is a hitTestPoint method. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of richmcgillicuddy Sent: Monday, June 30, 2008 7:20 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Hittest for polygon UI Component I have a series of objects that extend a UI Component and I correctly draw a list of polypoints in the UIcomponent. I use the UIComponent for the tooltips, mouse events and some other stuff. My probably is that ultimately UIComponent is a rectangle. is there a different base component I should use or is there a way for me to do
[flexcoders] Re: Hittest for polygon UI Component
Could be the containers I am using but that is not what I am seeing. Rich --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: The area drawn inside a UIComponent doesn't have to be rectangular, we just track everything by its bounding box. If you drew a circle in there, it would only get mouse events on the pixels in the circle, anything below would get the events in the non-drawn area. However, there is a hitTestPoint method. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of richmcgillicuddy Sent: Monday, June 30, 2008 7:20 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Hittest for polygon UI Component I have a series of objects that extend a UI Component and I correctly draw a list of polypoints in the UIcomponent. I use the UIComponent for the tooltips, mouse events and some other stuff. My probably is that ultimately UIComponent is a rectangle. is there a different base component I should use or is there a way for me to do a hittest on mouse events to say whether the mouse is in/out of the component? Rich
[flexcoders] Hittest for polygon UI Component
I have a series of objects that extend a UI Component and I correctly draw a list of polypoints in the UIcomponent. I use the UIComponent for the tooltips, mouse events and some other stuff. My probably is that ultimately UIComponent is a rectangle. is there a different base component I should use or is there a way for me to do a hittest on mouse events to say whether the mouse is in/out of the component? Rich
[flexcoders] Flash 10 - Large Bitmap support does
Is there something 'special' I need to set in order to get Flash 10 to load large bitmaps. I have a simple application, that loads a png. Looks like: imgTest.source = largeimage.png Compiled with Flex 3, Run on Flash Player 10.0.1.218. I have an image larger than 2880x2880 (4050x3017 exactly) and the image never loads in a similar fashion to Flash 9 and bitmaps larger than 2880. I swap out images to something smaller than 2880 and the image loads fine. Is there a parameter or compiler setting I need to find in order to support large bitmaps? Does it work with png files? Rich
[flexcoders] Piechart toolTips not popping up
Using Flex 2.01, I have a standard piechart with 4-6 pies and the smaller pies will not pop up tooltips. We have a formatDataType function that just spits out some data but other than that, it is very generic. showDataTips=true. Is this a known issue or is there something I need to do differently. The PieChart is inside of a canvas which is inside of a tab. Any ideas? Rich
[flexcoders] URLLoader goes off on invalid URLRequest
Why does this occur Basic Logic: -- Create URLLoader (MyLoader) -- Setup Events for IOError and COMPLETE MyLoader.load(badURL); this floats off to nowhere
[flexcoders] Drag Drop Compiler Bug/Problem
I have a very (very) simple demo program that is listed below. I was having trouble dropping a tilelist item onto a canvas. I was able to get the drop to work only if I set the toolTip of the canvas. This seems very odd, like the canvas was not initialized yet. The drag operation starts OK enough but I get the cannot drop marker when I try to drop on the canvas, UNLESS I set the tooltip to something. Any ideas? Rich -- ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=onInit() mx:Script ![CDATA[ import mx.utils.ObjectProxy; import mx.collections.ArrayCollection; import mx.core.DragSource; import mx.managers.DragManager; import mx.events.*; var anArrayCollection : ArrayCollection = new ArrayCollection(); private function onInit() : void { var thisItem : ObjectProxy = new ObjectProxy(); thisItem.title = Item 1; anArrayCollection.addItem(thisItem); thisItem = new ObjectProxy(); thisItem.title = Item 2; anArrayCollection.addItem(thisItem); tlTest.dataProvider = anArrayCollection; cvsDropTarget.addEventListener(DragEvent.DRAG_ENTER, onSpaceDragEnter); cvsDropTarget.addEventListener(DragEvent.DRAG_DROP, onSpaceDragDrop); } private function onSpaceDragEnter(event : DragEvent) : void { var dropTarget: Canvas = Canvas(event.currentTarget); // Accept the drag only if the user is dragging data // identified by the 'color' format value. if (event.dragSource != null) { DragManager.acceptDragDrop(dropTarget); } } private function onSpaceDragDrop(event : DragEvent) : void { var thisItem : SimpleThumbnail = new SimpleThumbnail(); thisItem.lblName.text = Test; thisItem.x = event.localX; thisItem.y = event.localY; thisItem.width = 200; thisItem.height = 200; cvsDropTarget.addChild(thisItem); } ]] /mx:Script mx:Canvas id=cvsDropTarget x=0 y=0 width=100% height=100% toolTip= / mx:TileList id=tlTest x=0 y=0 width=140 height=100% itemRenderer=SimpleThumbnail dragEnabled=true allowMultipleSelection=false / /mx:Application --- // Simple Thumbnail ?xml version=1.0 encoding=utf-8? mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml; width=120 height=120 verticalAlign=middle cornerRadius=10 borderStyle=solid backgroundColor=#c0c0c0 mx:Label text={data.title} id=lblName fontSize=28 textAlign=center width=100%/ /mx:HBox
[flexcoders] DataGrid Editing issue
I have an ArrayCollection that is a data provider to a grid. This collection is updating a few rows every few seconds from a background polling process. There are 2-4 fields that are editable by the user in the data grid. Everytime an update comes through while the user is editing the dataset, the grid cell editor is closed. Is there a way around this? Rich
[flexcoders] Error loading CSS swf
When I try to load an swf at runtime, I get the following error Unable to load style(SWF is not a loadable module): ... I have 2.01 installed, tried this in a clean project and still get the same result. Is there some trick to getting the runtime CSS swf's to load? Rich
[flexcoders] URLRequest Timeout
Is there a way to set the timeout value of a URLRequest or URLLoader? We have a call that times out due to a slower server response. Any ideas on how to make the call wait a second or two? Rich
[flexcoders] Change Button Icon Programatically
is there a way to do this? Rich
[flexcoders] Flash 9/Linux support for the N800, N770 - Is it possible and when
Been watching the Nokia internet devices. Just announced the N800 at CES this week. Runs Opera on a linux OS and flash 7. Would it be possible to put flash 9 on this thing? Rich
[flexcoders] Lines in a TextArea
I have a TextArea and want to know how many lines the text is. Better yet, a simple height number on how much height the text (actually htmltext) takes up. Is there a way to do this? Rich
[flexcoders] Alpha of simple subcomponent
In creating a simple popup dialog based off a panel, when I show the dialog, it appears with an alpha of about .6 but is always semi-transparent. I can change the alpha of the various components in the application, or in the component dialog but it always appears semi-transparent. Any ideas? Rich McG
[flexcoders] TileList questions
Two questions on the tilelist. 1. Is there a way to change the alpha on the selected color or disable it completely to allow the item renderer to do whatever is needed on selected. 2. If I have a list of items in my tile list, is there a way to scroll and center on the selected item? Thanks, Rich
[flexcoders] Reason no id field for DataGridColumn
Any logical explanation for this
[flexcoders] Re: Some Thoughts and examples on making Custom Flex Charts simpler.
Nice examples Ely. You are a charting magician. A couple of small comments: 1. In the Basic Drawing API. If I move the right slider and then increment the Top spin edit box, it pops an error. 2. The comment screen is great but there is no close box. While I think it is great that you are providing these examples, I can see it generating even more questions (what I think your trying to slow down). Just the comment stuff alone, I can think of 10+ variations on what someone would want. Great work. --- In flexcoders@yahoogroups.com, Ely Greenfield [EMAIL PROTECTED] wrote: Someone pointed out to me that I stupidly had left the post password protected. The password has been removed, so if you tried to view it and weren't able, you should try again now. Ely. Hello exciting world of Flex Developers. I spend a lot of time on this list answering questions on the flex charts, and amidst an explosion of people asking about custom charting work last week, had some thoughts on how customizing charts might be made easier. Since the ideas (and prototype code) was driven by a number of questions that have been asked on this list over the past few weeks, I thought I'd post directly to flex coders and invite everyone to check it out. Interested? Read more about it here: http://www.quietlyscheming.com/blog/2006/12/04/some-thoughts-and-example s-on-making-custom-flex-charts-simpler/ http://www.quietlyscheming.com/blog/2006/12/04/some-thoughts-and-exampl es-on-making-custom-flex-charts-simpler/ Ely.
[flexcoders] Ely Landscape Zoomer Help
Ely, Quick question on your landscape zoomer. We are trying to add a mouse drag pan to it and it seems like something that should be pretty easy but we cannot get it to work reliably. What we ended up doing is some simple mouse down, mouse move, mouse up and with the zooming, it causes issues and we cannot get the _needs_immediate_update = true to work properly. Any ideas. Rich
[flexcoders] Deselecting all from a link bar
Is there an easy way to deselect all items from a link bar once one as been selected. I do not have it connected to a viewstack but instead a set of submenus and there are valid instances when no submenu should be selected. Also, there could be a different type of control that I need to use. If so, let me know. If I reset the control after I've already set the selectedIndex of the control I get: TypeError: Error #1034: Type Coercion failed: cannot convert mx.skins.halo::[EMAIL PROTECTED] to mx.controls.Button. at mx.controls::LinkBar/mx.controls:LinkBar::hiliteSelectedNavItem() at mx.controls::LinkBar/mx.controls:LinkBar::commitProperties() at mx.core::UIComponent/validateProperties() at mx.managers::LayoutManager/::validateProperties() at mx.managers::LayoutManager/::doPhasedInstantiation() at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/::callLaterDispatcher2() at mx.core::UIComponent/::callLaterDispatcher() Rich
[flexcoders] Glow Effect Sticking around
I have a glow effect, that I place on a button (See source below) - once completed, my button stays 'glowing' even after I invalidate the button. Any ideas? private function onGlowEnd(event: Event) { btnDrop.invalidateDisplayList(); } private function onBtnDropClick(): void { var myGlowFilter : Glow = new Glow(btnDrop); myGlowFilter.color = 0x00; myGlowFilter.blurXFrom = 10; myGlowFilter.blurYFrom = 10; myGlowFilter.blurXTo = 0; myGlowFilter.blurYTo = 0; myGlowFilter.alphaFrom = 0; myGlowFilter.alphaTo = 1; myGlowFilter.duration = 3500; myGlowFilter.strength = 25; myGlowFilter.addEventListener(EffectEvent.EFFECT_END, onGlowEnd); myGlowFilter.play(); }
[flexcoders] Re: Glow Effect Sticking around
OK, I just wanted to make sure I wasn't crazy. In some cases, I'll delete and reset the item but this was one case I could not. Rich --- In flexcoders@yahoogroups.com, jpc14_99 [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com, richmcgillicuddy rich@ wrote: I have a glow effect, that I place on a button (See source below) - once completed, my button stays 'glowing' even after I invalidate the button. Any ideas? What I've been doing it executing another glow effect on the button when i want it to stop glowing, something like: mx:Glow id=resetGlow duration=400 alphaTo=0.0 blurXTo=0.0 blurYTo=0.0 target={myButton}/ Seems to be working...
[flexcoders] Re: Custom Tooltips in actionscript - Correction
(); // Make the ToolTip invisible to the mouse so that it doesn't // interfere with the ToolTipManager's mouse-tracking. mouseEnabled = false; } public function getTipComponent():Object{ return this.classInstance; } public function setComponentClass(tipClass:Class):void{ this.tipClass = tipClass; } public function setComponentObject(objClass:Object):void{ this.classInstance = objClass; } public function setCoordinates(x:int,y:int):void{ this.tipX = x; this.tipY = y; } override protected function createChildren():void { super.createChildren(); classInstance.parentTip = this; classInstance.x = this.tipX; classInstance.y = this.tipY; classInstance.addEventListener(closeTip,destroyTip); addChild(DisplayObject(classInstance)); } public function destroyTip():void { WeatherToolTipManager.destroyToolTip(this); } } } richmcgillicuddy said the following: John, Searched through the docs and it doesn't quite answer my question. So I have a descendant of ITooltip that is a more complex toolTip with multiple pieces of information on it. I only want this complex tooltip to show up for certain types of objects, others I want the standard tooltip to show up. These objects get created and placed dynamically. I'll check the createToolTip event and see if that will override the standard event but the examples I saw so far all created this functionality using MXML which works great. I'd rather use the toolTip functionality than try to override everything on a rollover, rollout command. s via email: Switch delivery to Daily Digest mailto:[EMAIL PROTECTED]:%20Digest | Switch format to Traditional mailto:[EMAIL PROTECTED]:%20Traditional Visit Your Group http://groups.yahoo.com/group/flexcoders;_ylc=X3oDMTJlaWpycXBtBF9TAzk3MzU5NzE0BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDZnRyBHNsawNocGYEc3RpbWUDMTE2NDMzNDQ5Nw-- | Yahoo! Groups Terms of Use http://docs.yahoo.com/info/terms/ | Unsubscribe mailto:[EMAIL PROTECTED] . -- /Whether you think that you can, or that you can't, you are usually right./ - Henry Ford -- /Whether you think that you can, or that you can't, you are usually right./ - Henry Ford
[flexcoders] Re: Custom Tooltips in actionscript
John, Searched through the docs and it doesn't quite answer my question. So I have a descendant of ITooltip that is a more complex toolTip with multiple pieces of information on it. I only want this complex tooltip to show up for certain types of objects, others I want the standard tooltip to show up. These objects get created and placed dynamically. I'll check the createToolTip event and see if that will override the standard event but the examples I saw so far all created this functionality using MXML which works great. I'd rather use the toolTip functionality than try to override everything on a rollover, rollout command. Rich --- In flexcoders@yahoogroups.com, John Kirby [EMAIL PROTECTED] wrote: Rich - There is a good example in the Flex docs under Using the ToolTip Manager Basically you create an listener on the UIControl which catches the toolTipShow event and fires a callback method. Do what you need to do in the call back mx:button id=myButton toolTip= some default text / myButton.addEventListener(toolTipShow, myCallBack) private function myCallBack(event:ToolTipEvent):void{ ToolTipManager.currentToolTip.text = some custom text; // Do some more custom stuff } This will display some custom text when you hover over the button. You can take this even further by using the ToolTipManager.createToolTip() to really enhance the tip with fonts, styles, etc. There are examples of this in the Using the ToolTip Manager. If you want to add components to your tooltip... let me know. I have created some classes which extend toolTip so you can add panels, TitleWindows, etc to your tooltip. .j richmcgillicuddy said the following: I've looked at the various ways to create custom tooltips and they work great if the custom tooltip is defined in the MXML code with a format similar to: toolTip= toolTipCreate=event.toolTip=this.createTip() If I create an UIComponent via Actionscript and want to use the custom toolTip, how would I do this? How do I associate the toolTipCreate event in ActionScript? var myLabel : Label; myLabel.toolTipCreate = Any help would be greatly appreciated. Rich -- /Whether you think that you can, or that you can't, you are usually right./ - Henry Ford
[flexcoders] TileList ItemRenderer transition size
Is there a way to have a transition in a an ItemRenderer automatically resize an item in a TileList to edit it? My itemRenderer is not changing sizes when I change state of an item. Guessing this is not possible. State 1 | | X X X | | X X X | | X X X | | X X X | || - State 2 | | X X X | | X X X | | X --- X | | X X X | || - Rich -- 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/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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/
[flexcoders] Conversion from Array to XML
I have an array that my user is editing in a data grid. I want to be able to convert that back to an XML object. Is there a generic easy way to do this. My array has objects that look like: var myObject : ObjectProxy = new ObjectProxy(); myObject.f1 = 1; myObject.f2 = 2; myObject.f3 = 3; I want to convert that (generically by determining at runtime, which fields the object proxy has) to: Object f11/f1 f22/f2 f33/f3 /Object Object ... Is there a simple way to convert an array to an XML object or get an XML string representation of an array without hard coding this for each grid I'd want to do this for? Rich -- 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/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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/
[flexcoders] Library Help
I am trying to centralize code in a series of libraries and running into what would seem to be a simple problem. I have a set of components in AS nd MXML files. I create a new project and add a source directory to those components. In the MXML editor, I can access them if I create a namespace to them in the application definition. I go to the designer and I see the components from a source directory fine. Then I try to compile and get Could not resolve xx:comp to a component implementation. If I make a local copy of the library under the project, it works great. Am I missing something in importing libraries and components as source code and not SWC files? Rich -- 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/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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/
[flexcoders] Resizing Panel based on text are in client
I have a panel with a text area inside of the panel. The text is changing in the text area. I want to resize the height of the panel to accommodate the size of the text inside of the text area automatically up to a largest height and then modify the text area font to 'autofit' the text inside the max sized area. Is there a set of tools in the Text Area similar to windows textextent and width properties. To complicate things more, I am using the htmltext property of the text area. Any help would be greatly appreciated. Rich -- 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/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * 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/
[flexcoders] Finding an Object in ActionScript
How would I do the following in AS3. 1. Find an object by id, something like: psuedo code- foundobject = app.components.findbyID(lblText); foundobject.dostuff; 2. Similar, is there a app.components that I can cycle through that will list all application components/objects. psuedo code again for (i=0;icomponents.count-1; i++) { var thisObject:TObject = components[i]; thisObject.doStuff.. } Rich -- 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/
[flexcoders] Simple Date Stuff
With the DateField MXML component, how would I initialize the dates of 2 date components to today and 30 days ago. I've tried the following: var aDate :Date = new Date(); var aSecondDate : Date = new Date(); // Does not work below //aSecondDate -= 30; // Does not compile below dtStartDate.selectedDate = aSecondDate - Date(0, , 30); // Works but does not set the selected Date. Will set the Text field but // the SelectedDate is still null dtStartDate.selectedDate = aSecondDate; dtEndDate.selectedDate = aDate ; Is there a simple example of date arithmetic? Is the selectedDate field the best way to pull out the selectedDate from the DateField component? Is there a way to initialize these on startup? Will the display localize to the dateformat of the viewing browser for localization? Rich -- 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/
[flexcoders] Simple TextField Question
I have a simple app that I want to have text show up using a TextField. public function onTest() : void { var myText:TextField = new TextField(); myText.x = 100; myText.y = 100; myText.width = 75; myText.autoSize = TextFieldAutoSize.CENTER; myText.height = 50; myText.width = 200; myText.backgroundColor = 0x849383; myText.text = Test Test Test Test Test Test; var format1:TextFormat = new TextFormat(); format1.color = 0xFF; myText.setTextFormat(format1); addChild(myText); } I click on the button and get the error: TypeError: Error #1034: Type Coercion failed: cannot convert flash.text::[EMAIL PROTECTED] to mx.core.IUIComponent. at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::addingChild() at mx.core::Container/addChildAt() at mx.core::Container/addChild() at Step5/onTest() at Step5/___Button1_click() The addChild does not like that it is not a UIComponent. The addChild works for text, Label and other UIComponents. I cannot get the textField to show up. Eventually I want to have a component that includes one or two text areas that are read only to the user, what is the best way to do this? Rich -- 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/
[flexcoders] Changing a skin image in ActionScript
I have a component that has 4 different skin parts, I want to change the skin image of one of those parts in actionscript code. My code looks like: var tmpImage:Image = new Image(); tmpImage.load(/device/images/personnel.png); myUIComp.setStyle(bodyskin, tmpImage); I can change the image via CSS and it works great but if I run the above code, it does not seem to change the image. any ideas? Rich -- 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/
[flexcoders] Re: Changing a skin image in ActionScript
--- In flexcoders@yahoogroups.com, richmcgillicuddy [EMAIL PROTECTED] wrote: I have a component that has 4 different skin parts, I want to change the skin image of one of those parts in actionscript code. My code looks like: var tmpImage:Image = new Image(); tmpImage.load(/device/images/personnel.png); myUIComp.setStyle(bodyskin, tmpImage); I can change the image via CSS and it works great but if I run the above code, it does not seem to change the image. any ideas? Rich Additionally, I can setup style sheets in the format of: .builderSkin { BodySkin: Embed(source=/skins/builder_male.png); HatSkin: Embed(source=/skins/Builder_Hat.png); } and the above only works if I use the Embed function with the skin. What I would like is to be able to remotely update the available body and clothing skins and allow the user to select one for that item or for a police officer person to be able to dynamically pull the police officer form and uniform in case it changes. Are skins the right way to go here or having a UIComponent with a number of image variables that are loaded dynamically? Rrich -- 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/
[flexcoders] Extending Peter Ent Gauge component example
Hello, I was trying to extend the gauge component example that was made available via Peter Ent. I ran into a number of issues. I think most of the issues are just my lack of understanding of how the styles work for a component. I wanted to create 10 gauges at random locations, set their properties and then move them to another location. The code looks like: private function onAddTen(): void { var nIndex : int; for (nIndex = 0; nIndex 10; nIndex ++) { myGauge = new Gauge(); // This works myGauge.width = 75; myGauge.height = 75; // This works myGauge.x = getRandom(100, 1000); myGauge.y = getRandom(100, 1000); // This does not Work!, no Alphas are set myGauge.setStyle(coverAlpha, getRandom(40, 80)); myGauge.setStyle(borderAlpha, getRandom(40, 80)); myGauge.setStyle(needleAlpha, getRandom(40, 80)); myGauge.setStyle(coverColor, 0xf7f083); myGauge.setStyle(backgroundAlpha, getRandom(40, 80)/100); myGauge.setStyle(backgroundColor, 0x6185ed); // The image substitution does not work var tmpImage:Image = new Image(); tmpImage.load(/gauge/skins/graphic/BitmapFrame.png); myGauge.setStyle(frameskin, tmpImage); // This has no effect myGauge.alpha = 55; // Alpha comes back as NaN myGauge.toolTip = I have a tooltip, my location is + myGauge.x + , + myGauge.y + \n my alpha is + myGauge.getStyle(backgroundAlpha)*100; this.addChild(myGauge); // This works playMove(myGauge, getRandom(100, 1000), getRandom(100, 1000)); } } ]] My question is that many of the styles that I set do not get set. I've walked through the code and looks like they are getting set but when the tooltip is created, the values are not there and visually, the alphas do not get set. Also the setting the skin to an image does not work. Any ideas on what I am doing incorrectly? Thanks in advance, Rich -- 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/
[flexcoders] Re: Timer to run function every 30 min
From the docs: package { import flash.utils.Timer; import flash.events.TimerEvent; import flash.display.Sprite; public class TimerExample extends Sprite { public function TimerExample() { var myTimer:Timer = new Timer(1000, 2); myTimer.addEventListener(timer, timerHandler); myTimer.start(); } public function timerHandler(event:TimerEvent):void { trace(timerHandler: + event); } } } so your 'code' would look something like: // Using the suggestion from an earlier post, use the interval as the default // Also, make it public var so you can adjust it if you want, have a slider to offer more frequent updates or less frequent updates or turn off. This would be myTimer.delay = slider.value or something similar... var interval:Number = 60 * 30 * 1000; // Leave off second param here to make it go indefinitely var myTimer:Timer = new Timer(interval); public function initTimer: void { myTimer.addEventlistener(timer, timerHandler); myTimer.start(); } public function timerHandler(event:TimerEvent):void { trace(timerHandler: + event); // Lookup weather, update datasets, update display // Don't know yet if you need to turn off timer, then turn on at end in case update takes too long. } --- In flexcoders@yahoogroups.com, David Brown [EMAIL PROTECTED] wrote: Thank you for you're help. The timer event is the part I am having trouble with. I don't know how to write or where to start. Any suggestions would be great. David - Original Message - From: sinatosk To: flexcoders@yahoogroups.com Sent: Saturday, August 05, 2006 5:41 PM Subject: Re: [flexcoders] Timer to run function every 30 min 60 * 30 * 1000 60 seconds times 30 minutes times 1000 miliseconds equals 180 I recommend using 60 * 30 * 1000 instead of the 180 so it's easier for you to change/debug and then just add an event listener on timer event name along with the function you want it to call upon 30 minutes and then your done :p On 05/08/06, David Brown [EMAIL PROTECTED] wrote: Hello all, I could use some help. I have been livedocs.macromedia.com/flex/2docs looking for a way to create a timer function that would execute a function every 30 min. I found an example of mytimer and looked at a example for simple analog clock. But I am having a hard time understanding how it relates to my code. Below is a code snipet. I would like to run the InitApp() function every 30 min. That should refresh my two datagrids that inturn will update my screen. Any help would be great. Thank David mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute width=500 height=56 backgroundGradientColors=[#ff, #ff] creationComplete=initVars() horizontalAlign=center verticalAlign=middle borderColor=#ff backgroundColor=#ff borderStyle=solid borderThickness=1 mx:Script ![CDATA[ import mx.logging.LogEvent; /* import flash.events.MouseEvent; import mx.events.FlexEvent; */ import mx.styles.CSSStyleDeclaration; import mx.effects.*; import mx.events.*; import mx.rpc.events.*; import mx.controls.Alert; import mx.managers.PopUpManager; import flash.events.Event; import flash.events.TimerEvent; import flash.utils.Timer; import mx.controls.Alert; import mx.collections.*; import flash.net.*; import flash.display.Sprite; [Bindable] public var mylocID:String; // Assign values to new properties. private function initVars():void { InitApp(); } public function InitApp():void { // assign values passed from the html object flashvars mylocID = Application.application.parameters.mylocID; // if no value passed from the html object tag then assign value if (mylocID == null) { mylocID = 29223; } // get weather weatherSvc.qryCurrentWeather(mylocID); weatherSvc.qryExtendedWeather(mylocID); // set focus on the first row of the grids dgCurrentWeather.selectedIndex = 0; dgExtendedWeather.selectedIndex = 0; } ]] /mx:Script mx:RemoteObject id=weatherSvc destination=ColdFusion source=Widgets.cfc.widgets showBusyCursor=true / -- 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:
[flexcoders] Re: WebService Call
I'll try that and let you know what the results are. Rich --- In flexcoders@yahoogroups.com, Franck de Bruijn [EMAIL PROTECTED] wrote: Have you tried to access the wsdl and call the webservice operation from another webservice client than Flex? The tool I always use is: http://www.soapui.org/jnlp/1.5/soapui.jnlp (this is a webstart link; if you click it, and you have Java installed on your machine it should start automatically). Cheers, Franck _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of richmcgillicuddy Sent: Friday, July 28, 2006 9:43 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: WebService Call Yes, I see the definition but with most XML parse errors (not just flex), the error messages are difficult to track down. It is telling me that it cannot add the node . I'll get the exact error message and post it later tonight. I'd prefer to use a WebService rather than an Service. Rich --- In [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com, slangeberg slangeberg@ wrote: So when you point your browser to: http://localhost: http://localhost:9126/SOAP 9126/SOAP you are seeing the WSDL definition? Scott On 7/28/06, richmcgillicuddy rich@ wrote: Thanks for the pointers, they are really helpful. I have my own app server and can tell that the flex application calls it, tries to retrieve the wsdl file and then in flex it tells me that there is an XML parsing error in the wsdl file. It this point, I am leaning towards using simple XML since I can generate that if needed. Other than download and testing SOAP wsdl validators and making sure it is standard, i think the only other option is the straight XML. Rich --- In [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com flexcoders%40yahoogroups.com, slangeberg slangeberg@ wrote: Yeah, Try something more like (I'm not sure what your 'FlexData' object was supposed to refer to... ): mx:..sometag onComplete=wsTest.getData() mx:WebService id=wsTest wsdl=http://localhost: http://localhost:9126/SOAP 9126/SOAP fault={trace(-1);} result={trace(1);}/ /mx:...sometag On 7/26/06, richmcgillicuddy rich@ wrote: I have a simple web service calling a SOAP web service on my local machine. The call looks like: mx:WebService id=wsTest wsdl=http://localhost: http://localhost:9126/SOAP 9126/SOAP load=wsTest.FlexData.getData() fault=trace(-1); / It seems to hang waiting for localhost and if I let it wait long enough, it will give me the following error: ReferenceError: Error #1069: Property getData not found on mx.rpc.soap.mxml.Operation and there is no default value. at Step2/__wsTest_load() ... On the Web Server side, I am looking for client connects from flash and do not seem to get even the client connect. Any ideas? Is there anything that looks odd with the WebService statement? Rich -- : : ) Scott -- : : ) Scott -- 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/
[flexcoders] Re: WebService Call
Thanks for the pointers, they are really helpful. I have my own app server and can tell that the flex application calls it, tries to retrieve the wsdl file and then in flex it tells me that there is an XML parsing error in the wsdl file. It this point, I am leaning towards using simple XML since I can generate that if needed. Other than download and testing SOAP wsdl validators and making sure it is standard, i think the only other option is the straight XML. Rich --- In flexcoders@yahoogroups.com, slangeberg [EMAIL PROTECTED] wrote: Yeah, Try something more like (I'm not sure what your 'FlexData' object was supposed to refer to... ): mx:..sometag onComplete=wsTest.getData() mx:WebService id=wsTest wsdl=http://localhost:9126/SOAP; fault={trace(-1);} result={trace(1);}/ /mx:...sometag On 7/26/06, richmcgillicuddy [EMAIL PROTECTED] wrote: I have a simple web service calling a SOAP web service on my local machine. The call looks like: mx:WebService id=wsTest wsdl=http://localhost:9126/SOAP; load=wsTest.FlexData.getData() fault=trace(-1); / It seems to hang waiting for localhost and if I let it wait long enough, it will give me the following error: ReferenceError: Error #1069: Property getData not found on mx.rpc.soap.mxml.Operation and there is no default value. at Step2/__wsTest_load() ... On the Web Server side, I am looking for client connects from flash and do not seem to get even the client connect. Any ideas? Is there anything that looks odd with the WebService statement? Rich -- : : ) Scott -- 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/
[flexcoders] Sprite to buttonized look
Is there an example of how to take the contents of a sprite (image, shapes) and using the bevel and gradient filters make the sprite look like a small button/puck on the screen. Rich -- 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/
[flexcoders] Re: WebService Call
Yes, I see the definition but with most XML parse errors (not just flex), the error messages are difficult to track down. It is telling me that it cannot add the node . I'll get the exact error message and post it later tonight. I'd prefer to use a WebService rather than an Service. Rich --- In flexcoders@yahoogroups.com, slangeberg [EMAIL PROTECTED] wrote: So when you point your browser to: http://localhost:9126/SOAP you are seeing the WSDL definition? Scott On 7/28/06, richmcgillicuddy [EMAIL PROTECTED] wrote: Thanks for the pointers, they are really helpful. I have my own app server and can tell that the flex application calls it, tries to retrieve the wsdl file and then in flex it tells me that there is an XML parsing error in the wsdl file. It this point, I am leaning towards using simple XML since I can generate that if needed. Other than download and testing SOAP wsdl validators and making sure it is standard, i think the only other option is the straight XML. Rich --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, slangeberg slangeberg@ wrote: Yeah, Try something more like (I'm not sure what your 'FlexData' object was supposed to refer to... ): mx:..sometag onComplete=wsTest.getData() mx:WebService id=wsTest wsdl=http://localhost:9126/SOAP; fault={trace(-1);} result={trace(1);}/ /mx:...sometag On 7/26/06, richmcgillicuddy rich@ wrote: I have a simple web service calling a SOAP web service on my local machine. The call looks like: mx:WebService id=wsTest wsdl=http://localhost:9126/SOAP; load=wsTest.FlexData.getData() fault=trace(-1); / It seems to hang waiting for localhost and if I let it wait long enough, it will give me the following error: ReferenceError: Error #1069: Property getData not found on mx.rpc.soap.mxml.Operation and there is no default value. at Step2/__wsTest_load() ... On the Web Server side, I am looking for client connects from flash and do not seem to get even the client connect. Any ideas? Is there anything that looks odd with the WebService statement? Rich -- : : ) Scott -- : : ) Scott -- 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/
[flexcoders] New Questions
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
[flexcoders] HTTP Service Authentication capabilities
Can the HTTP Service work with a web server that requires digest authentication? Rich -- 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/
[flexcoders] Re: WebService Call
getData() is the operation. It takes no arguments and returns an array of data. After further investigation I think it is a wsdl file problem. Rich --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Don't Webservices require an operation? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of richmcgillicuddy Sent: Wednesday, July 26, 2006 7:58 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] WebService Call I have a simple web service calling a SOAP web service on my local machine. The call looks like: mx:WebService id=wsTest wsdl=http://localhost:9126/SOAP http://localhost:9126/SOAP load=wsTest.FlexData.getData() fault=trace(-1); / It seems to hang waiting for localhost and if I let it wait long enough, it will give me the following error: ReferenceError: Error #1069: Property getData not found on mx.rpc.soap.mxml.Operation and there is no default value. at Step2/__wsTest_load() ... On the Web Server side, I am looking for client connects from flash and do not seem to get even the client connect. Any ideas? Is there anything that looks odd with the WebService statement? Rich -- 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/
[flexcoders] Re: Image Pan - Step 1
OK, I have the slider demo working in flex2. I do still have one problem with that. The image only loads part of the image and sizes wierd inside of the Canvas. I can't really zoom, if I do, it just moves the image and makes it bigger inside of the canvas, the part I started with. I can never seem to get to other areas of the map with a zoom. The code looks like: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=horizontal initialize=setupVars() mx:Script ![CDATA[ var mouse:Point; var rect:Rectangle; var r_img:Rectangle; var r_mask:Rectangle; var xPos:int; var yPos:int; private function setupVars(): void { rect = new Rectangle(0, 0, 450, 350); mouse = new Point(0,0); myMap.load(SB memorial map.png); myMap.scrollRect = rect; myMap.x = 20; myMap.y = 20; myMap.cacheAsBitmap = true; addEventListener(mouseMove, handleMouseMove); r_img = new Rectangle(0, 0, myMap.width, myMap.height); r_mask = new Rectangle(myMap.x, myMap.y, rect.width, rect.height); } private function handleMouseMove(event:Event):void { if (!chkLockScroll.selected) { mouse.x = myMap.mouseX; mouse.y = myMap.mouseY; if (r_mask.containsPoint(mouse)) { yPos= ( (Math.abs(myMap.y - mouse.y)/rect.height)*(r_img.height - rect.height)); xPos= ( (Math.abs(myMap.x - mouse.x)/rect.width)*(r_img.width - rect.width)); } rect.x += (xPos - rect.x)/8; rect.y += (yPos - rect.y)/8; trace(rect); myMap.scrollRect = rect; } } private function panUp():void { rect.y -= 20; myMap.scrollRect = rect; trace(myMap.scrollRect); } private function panDown():void { rect.y += 20; myMap.scrollRect = rect; trace(myMap.scrollRect); } private function panRight():void { rect.x += 20; myMap.scrollRect = rect; trace(myMap.scrollRect); } private function panLeft():void { rect.x -= 20; myMap.scrollRect = rect; trace(myMap.scrollRect); } 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:CheckBox label=Scroll id=chkLockScroll selected=true/ /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:Canvas width=100% height=100% mx:Image width=100% height=100% id=myMap scaleContent=false/ /mx:Canvas /mx:Panel /mx:Application Any Ideas? Rich --- 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
[flexcoders] Re: Image Pan - Step 1
Figured out the partial image thing. If the Image component is inside of anything but a canvas and I set the height and width of the component to 100% it resizes the image and crops the rest of it. Rich --- 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/
[flexcoders] Re: Image Pan - Step 1
Last night, I was able to find a demo called SpriteArranger that showed addng different types of objects as children to a DisplayCanvas . This really helped in understanding the AddChild. I think I'll go with the displayobjects initially since we have a PC version written that uses the same approach. I still am having issues with panning an image left, right... Then the next things I need to figure out are: 1. Making an internal searchable list of children. I saw the AddChild function, but the displayobject does not have a Children Property. I need to research the different types of arrays and find one that I can have a key associated with the object so as data comes in, I can update sprite 47. Is there a HashArray or something similar. These maybe simple questions but I am brand new to this stuff. There seems to be tons of docs but few examples. 2. On the panning issue, lets say I have a map background that is 1000x1000. My viewport is 200X400, I need to understand how to control the viewport and panning. 3. Memory Management. As you mentioned, tons of objects will have issues, I need to get a feel for how many is too many, if the user switches maps, how to delete the children... Thanks for your help, Rich --- In flexcoders@yahoogroups.com, JesterXL [EMAIL PROTECTED] wrote: Base class is like DisplayObjectContainer, but that's an abstract class; both Sprite and MovieClip extend that. However, if you are using Flex, there is no point to utilize MovieClip since you don't have frames; Sprite's good. Also, the last line should be addChild(container), at least in an AS3 project. ...however, you have 2 choices here. DisplayObjects are nice because you can put all of your map data in one DisplayObject, and then move just that 1 Sprite, scale that 1 sprite, ect. It makes your code really concise, and flexible because you can put anything you want in it. Think how Yahoo Maps and Google Maps have like textures, directions, lines, markers, etc. all in theirs. ...but tons of obects, while better in Flash Player 9, are still slower than 1 bitmap. If you aren't planning of going all charting-style, you outta give thought to a blitting solution if you want her to scale hardcore. You basically draw everything to an offscreen bitmap, and then use a Rect to copyPixels into an on-screen bitmap. That way, you could add thousands of objects, and you're map would run really well. Harder to code and less flexible, though. Sprites and the DisplayObject really nice, so. - Original Message - From: richmcgillicuddy [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, July 25, 2006 8:29 PM Subject: [flexcoders] Re: Image Pan - Step 1 OK, just needed the right terms to search on. Found this in the help: import flash.display.Sprite; import flash.events.MouseEvent; var container:Sprite = new Sprite(); container.name = container; var circle:Sprite = new Sprite(); circle.name = circle; circle.graphics.beginFill(0xFFCC00); circle.graphics.drawCircle(40, 40, 40); container.addChild(circle); container.mouseChildren = false; container.addEventListener(MouseEvent.CLICK, clicked); function clicked(event:MouseEvent):void { trace(event.target.name); // container } Then, it states to add the container to the DisplayObject. This is where I get confused. What is the base container class for the DisplayList and how do I attach it? I don't think I need a movie clip becuase it says it basically is a sprite with a timeline. Rich --- In flexcoders@yahoogroups.com, JesterXL jesterxl@ wrote: 2. If they are children, they too will scale. Add them to the Sprite's displaylist. 3. We've done this successfully in Flex 1.5. In Flex 2, you can set the toolTipClass on the ToolTipManager class to utilize your own class. 4. To combine multiple effects at the same time, utilize the mx:Parrellel tag; it'll make all effects inside it happen at the same time (exluding their own startDelay attributes). Have you tried replacing x y with scrollRect? - Original Message - From: richmcgillicuddy rich@ To: flexcoders@yahoogroups.com Sent: Tuesday, July 25, 2006 3:02 PM Subject: [flexcoders] Image Pan - Step 1 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
[flexcoders] Re: Image Pan - Step 1
Thanks for the tips. I have a few days of work to get done (Both flex and non flex) with this stuff and I'll follow up and let you know how it goes. On the pan, I was able to find something that uses movie clips but and flash7/8 (so it won't work) but it is exactly what I was looking for. You can find it here (http://sephiroth.it/tutorials/flashPHP/scrollRect/). What would I need to do in order to convert this to the container/child image code in Flex 2? Rich --- In flexcoders@yahoogroups.com, JesterXL [EMAIL PROTECTED] wrote: 1. You could use the old skool Object (hash / associative array) approach, or the new Dictionary class. 2. set the scrollRect to 200x400, and then just move the sprite. So: myContainer = new Sprite(); myContainer.addChild(myMap); myContainer.scrollRect = new Rect(0, 0, 200, 400); addChild(myContainer); myMap.x += 100; Don't know 3. - Original Message - From: richmcgillicuddy [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Wednesday, July 26, 2006 9:13 AM Subject: [flexcoders] Re: Image Pan - Step 1 Last night, I was able to find a demo called SpriteArranger that showed addng different types of objects as children to a DisplayCanvas . This really helped in understanding the AddChild. I think I'll go with the displayobjects initially since we have a PC version written that uses the same approach. I still am having issues with panning an image left, right... Then the next things I need to figure out are: 1. Making an internal searchable list of children. I saw the AddChild function, but the displayobject does not have a Children Property. I need to research the different types of arrays and find one that I can have a key associated with the object so as data comes in, I can update sprite 47. Is there a HashArray or something similar. These maybe simple questions but I am brand new to this stuff. There seems to be tons of docs but few examples. 2. On the panning issue, lets say I have a map background that is 1000x1000. My viewport is 200X400, I need to understand how to control the viewport and panning. 3. Memory Management. As you mentioned, tons of objects will have issues, I need to get a feel for how many is too many, if the user switches maps, how to delete the children... Thanks for your help, Rich --- In flexcoders@yahoogroups.com, JesterXL jesterxl@ wrote: Base class is like DisplayObjectContainer, but that's an abstract class; both Sprite and MovieClip extend that. However, if you are using Flex, there is no point to utilize MovieClip since you don't have frames; Sprite's good. Also, the last line should be addChild(container), at least in an AS3 project. ...however, you have 2 choices here. DisplayObjects are nice because you can put all of your map data in one DisplayObject, and then move just that 1 Sprite, scale that 1 sprite, ect. It makes your code really concise, and flexible because you can put anything you want in it. Think how Yahoo Maps and Google Maps have like textures, directions, lines, markers, etc. all in theirs. ...but tons of obects, while better in Flash Player 9, are still slower than 1 bitmap. If you aren't planning of going all charting-style, you outta give thought to a blitting solution if you want her to scale hardcore. You basically draw everything to an offscreen bitmap, and then use a Rect to copyPixels into an on-screen bitmap. That way, you could add thousands of objects, and you're map would run really well. Harder to code and less flexible, though. Sprites and the DisplayObject really nice, so. - Original Message - From: richmcgillicuddy rich@ To: flexcoders@yahoogroups.com Sent: Tuesday, July 25, 2006 8:29 PM Subject: [flexcoders] Re: Image Pan - Step 1 OK, just needed the right terms to search on. Found this in the help: import flash.display.Sprite; import flash.events.MouseEvent; var container:Sprite = new Sprite(); container.name = container; var circle:Sprite = new Sprite(); circle.name = circle; circle.graphics.beginFill(0xFFCC00); circle.graphics.drawCircle(40, 40, 40); container.addChild(circle); container.mouseChildren = false; container.addEventListener(MouseEvent.CLICK, clicked); function clicked(event:MouseEvent):void { trace(event.target.name); // container } Then, it states to add the container to the DisplayObject. This is where I get confused. What is the base container class for the DisplayList and how do I attach it? I don't think I need a movie clip becuase it says it basically is a sprite with a timeline. Rich --- In flexcoders@yahoogroups.com, JesterXL jesterxl@ wrote: 2. If they are children, they too will scale. Add them to the Sprite's displaylist. 3. We've done this successfully in Flex 1.5. In Flex 2, you can set the toolTipClass
[flexcoders] WebService Call
I have a simple web service calling a SOAP web service on my local machine. The call looks like: mx:WebService id=wsTest wsdl=http://localhost:9126/SOAP; load=wsTest.FlexData.getData() fault=trace(-1); / It seems to hang waiting for localhost and if I let it wait long enough, it will give me the following error: ReferenceError: Error #1069: Property getData not found on mx.rpc.soap.mxml.Operation and there is no default value. at Step2/__wsTest_load() ... On the Web Server side, I am looking for client connects from flash and do not seem to get even the client connect. Any ideas? Is there anything that looks odd with the WebService statement? Rich -- 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/
[flexcoders] Image Pan - Step 1
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/
[flexcoders] Re: Image Pan - Step 1
Thanks for the pointers. I replaced myMap.scrollRect.Top with myMap.X and myMap.scrollRect.X, both had no effect. What should be my base container object? Right now I just have an image as the base container, is there a better choice. In our Flash 8 code, we have 3 different movie clips. On the children, where is the Sprite collection? Which container class has this as its display list. after rereading your sentence, are you saying that the base container should be a sprite and it has a display list? Thanks for your help, RIch --- In flexcoders@yahoogroups.com, JesterXL [EMAIL PROTECTED] wrote: 2. If they are children, they too will scale. Add them to the Sprite's displaylist. 3. We've done this successfully in Flex 1.5. In Flex 2, you can set the toolTipClass on the ToolTipManager class to utilize your own class. 4. To combine multiple effects at the same time, utilize the mx:Parrellel tag; it'll make all effects inside it happen at the same time (exluding their own startDelay attributes). Have you tried replacing x y with scrollRect? - Original Message - From: richmcgillicuddy [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, July 25, 2006 3:02 PM Subject: [flexcoders] Image Pan - Step 1 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
[flexcoders] Re: Image Pan - Step 1
OK, just needed the right terms to search on. Found this in the help: import flash.display.Sprite; import flash.events.MouseEvent; var container:Sprite = new Sprite(); container.name = container; var circle:Sprite = new Sprite(); circle.name = circle; circle.graphics.beginFill(0xFFCC00); circle.graphics.drawCircle(40, 40, 40); container.addChild(circle); container.mouseChildren = false; container.addEventListener(MouseEvent.CLICK, clicked); function clicked(event:MouseEvent):void { trace(event.target.name); // container } Then, it states to add the container to the DisplayObject. This is where I get confused. What is the base container class for the DisplayList and how do I attach it? I don't think I need a movie clip becuase it says it basically is a sprite with a timeline. Rich --- In flexcoders@yahoogroups.com, JesterXL [EMAIL PROTECTED] wrote: 2. If they are children, they too will scale. Add them to the Sprite's displaylist. 3. We've done this successfully in Flex 1.5. In Flex 2, you can set the toolTipClass on the ToolTipManager class to utilize your own class. 4. To combine multiple effects at the same time, utilize the mx:Parrellel tag; it'll make all effects inside it happen at the same time (exluding their own startDelay attributes). Have you tried replacing x y with scrollRect? - Original Message - From: richmcgillicuddy [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, July 25, 2006 3:02 PM Subject: [flexcoders] Image Pan - Step 1 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