RE: [flexcoders] Flex 2 Charting dynamic backgroundElements
Hi Ely, thank you for your detailed answer and the code examples. This was not exactly what I am looking for but gave me the hints to solve my problem. The key is that your backgroundElement extends ChartingElement. But now I have got the problem that the backgroundElement is in front of the PlotChart lines. How can I swap them? Again thanks a lot, Sönke _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ely Greenfield Sent: Monday, November 20, 2006 7:15 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Flex 2 Charting dynamic backgroundElements Hi Sonke (sorry, can't figure out how to type an umlaud (sp?) on an American keyboard ): It sounds like your problem is a prime candidate for a custom background element. If your shapes depend on the min max of the axes, that probably means you want to annotate/illustrate a particular data value/range, yes? Any time you're trying to draw data values, you should really be creating a chart element (that's pretty much what they're there for). That means a series, a backgroundElement, or an annotationElement. I've attached a simple example of a custom background element that takes a series of data values and draws matching bands in the background. It should give you a starting point for what you're trying to do. Ely. _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sönke Rohde Sent: Sunday, November 19, 2006 6:43 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex 2 Charting dynamic backgroundElements Hi, I have to draw shapes and lines into the background of a Plotchart. The size/position of the shapes and lines depends on the minimum and maximum of the horizontal and vertical linear axis. My first try was to use the backgroundElements to solve this problem. I created a shape, drawed a polygon on it and added it to the backgroundElements: var shape:Shape = new Shape(); var gr:Graphics = shape.graphics; gr.moveTo(0, 20); gr.beginFill(0xFF9900, 50); gr.lineTo(0, 0); gr.lineTo(100, 0); gr.lineTo(100, 100); gr.lineTo(0, 20); gr.endFill(); backgroundElements.reverse(); backgroundElements.push( shape ); I reversed the array to keep the GridLines in the front. The polygon is visible in the background but it is scaled to fit the size of the PlotChart. The shape has to keep its scaling. How do I know the width/height of the PlotChart content area? With this information and the min/max of the x/y axis I am able to do the drawing. Any hint is very appreciated. Cheers, Sönke
[flexcoders] Re: images, etc. off-screen
On 11/28/06, Paul Hastings [EMAIL PROTECTED] wrote: i need to burn a PDF from some stuff (images their vector children) that's represented on-screen. using andrew trice's nifty bitmap capture technique, works fine. but in some instances i need to re-do/rescale some of the images, etc. which i need to do off-screen (or wherever) as the user doesn't need to see this. oh boy i get to answer my own question ;-) it seems the image simply wasn't getting loaded fast enough, adding a COMPLETE event listener seems to have done the trick: newMapImage.addEventListener(flash.events.Event.COMPLETE,burnPDF);
RE: [flexcoders] lastResult.records.record.length=null when there's actually 1
When a result contains only 1 object Flex converts it to an Object not an ArrayCollection. Therefore your myListRequest.lastResult.records.record is an object and won't have the .length property. When you receive more than 1 record it will be an ArrayCollection of objects. You'll need to check the type of myListRequest.lastResult.records.record before you do any work with it. Hope that helps, Steve -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ben Marchbanks Sent: 27 November 2006 19:21 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] lastResult.records.record.length=null when there's actually 1 myRequest.event.result.length ?? Not sure I understand how to use event.result to get the count of the records returned. Tracy Spratt wrote: And avoid using lastResult except for binding. Instead use event.result. Tracy From: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com [mailto:[EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of Iko Knyphausen Sent: Friday, November 24, 2006 10:43 PM To: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com Subject: RE: [flexcoders] lastResult.records.record.length=null when there's actually 1 Does it behave the same if you use e4x as resultFormat? From: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com [mailto:[EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of pdflibpilot Sent: Friday, November 24, 2006 5:35 PM To: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com Subject: [flexcoders] lastResult.records.record.length=null when there's actually 1 I use the following to get a count of the records returned by HTTPService request. myListRequest.lastResult.records.record.length; When theres only 1 the result is null ? Otherwise the count is fine whenever it is 2 or more. Is this the expected result ??
Re: [flexcoders] Panel Title Embedded Font
I tried this it seems to work. If you want bold you'll have to embed a bold font and give the font weight bold. If you need bold as well as normal fonts you can create the same font name with both bold as well as normal font and it will take. -sam On 11/16/06, Bjorn Schultheiss [EMAIL PROTECTED] wrote: Hi, Is it possible to apply an embedded font to a Panel's title via CSS? Here's the simplest example I could create [Main (PanelTitleFontCSS.mxml)] mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute xmlns:my=* my:MyPanel / /mx:Application [Panel (MyPanel.mxml)] mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute title=Panel Title styleName=myFontStyle mx:Style source=MyStyle.css / mx:Label text=Some text / /mx:Panel [CSS (MyStyle.css)] @font-face { fontFamily: myMyriadProBlack; fontWeight: heavy; src:url(MYRIADPB.TTF); } .myFontStyle { fontFamily: myMyriadProBlack; fontWeight: heavy; fontSize: 26; } In this example the label within the panel has the font applied. The Panel header is TimesRoman or something :( Regards, Bjorn Schultheiss Senior Flash Developer QDC Personalised Communication Power Level 2, 31 Coventry St. South Melbourne 3205, VIC Australia T: +61 3 9674 7400 F: +61 3 9645 9160 W: http://www.qdc.net.au ((This transmission is confidential and intended solely for the person or organization to whom it is addressed. It may contain privileged and confidential information. If you are not the intended recipient, you should not copy, distribute or take any action in reliance on it. If you believe you received this transmission in error, please notify the sender.---))
[flexcoders] Cursor Position in RichTextEditor (textarea)
All, For the life of me I cannot seem to find the property/method to get the caret / cursor position in a textarea component via a RTE. Basically I need to be able tod rag a custom control onto the RTE and it insert some text at the current(previous before focus changed) cursor position. I can get it working fine if I just want to add the text onto the end, however I want to insert it at the current position. Any ideas? Ta, Steve
[flexcoders] Flex crashing @ compilation time
Hello. I've been using Flex 2 for 3 months now. There's around 40 mxml applications plus component, and actionscript files in the project and the compilation (building) time has considerably increased with time...taking up to 5-10 minutes at times. I've upgraded to Java 1.5.0.09 and changed the settings in the FlexBuilder configuration file and still no significant improvements have been noticed. Could anyone help me out with this issue. Deleting the Bin folder and re-compiling the whole project as well did not solve the problem. PC Specs: Pentium 4 HT (3.0 MHz, 1GB DDR2 Memory, Integrated graphic card) Thanks for your cooperation. Regards, Anoop
Re: [flexcoders] lastResult.records.record.length=null when there's actually 1
Thanks Steve for explaining exactly the root cause. What method would you recommend to test if the result is an array or an object ? Steve Cox wrote: When a result contains only 1 object Flex converts it to an Object not an ArrayCollection. Therefore your myListRequest.lastResult.records.record is an object and won't have the .length property. When you receive more than 1 record it will be an ArrayCollection of objects. You'll need to check the type of myListRequest.lastResult.records.record before you do any work with it. Hope that helps, Steve -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ben Marchbanks Sent: 27 November 2006 19:21 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] lastResult.records.record.length=null when there's actually 1 myRequest.event.result.length ?? Not sure I understand how to use event.result to get the count of the records returned. Tracy Spratt wrote: And avoid using lastResult except for binding. Instead use event.result. Tracy From: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com [mailto:[EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of Iko Knyphausen Sent: Friday, November 24, 2006 10:43 PM To: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com Subject: RE: [flexcoders] lastResult.records.record.length=null when there's actually 1 Does it behave the same if you use e4x as resultFormat? From: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com [mailto:[EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of pdflibpilot Sent: Friday, November 24, 2006 5:35 PM To: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com Subject: [flexcoders] lastResult.records.record.length=null when there's actually 1 I use the following to get a count of the records returned by HTTPService request. myListRequest.lastResult.records.record.length; When theres only 1 the result is null ? Otherwise the count is fine whenever it is 2 or more. Is this the expected result ??
[flexcoders] Firing an event when clicking on a DataGridColumn
Hi, Is it possible to fire an event every time a user clicks on a new row in a DataGrid. So that I can populate a form with a new record everytime the row in the DataGrid is selected.
RE: [flexcoders] lastResult.records.record.length=null when there's actually 1
Try something like the following (I'm using result here instead of lastResult, but see what works for you: var acResults : ArrayCollection; if (myListRequest.lastResult.records.record is ArrayCollection) { acResults = myListRequest.lastResult.records.record; } else { acResults = new ArrayCollection(); acResults.addItem(myListRequest.lastResult.records.record); } Alert.show(acResults.length.toString()); HTH, Steve -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ben Marchbanks Sent: 28 November 2006 11:29 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] lastResult.records.record.length=null when there's actually 1 Thanks Steve for explaining exactly the root cause. What method would you recommend to test if the result is an array or an object ? Steve Cox wrote: When a result contains only 1 object Flex converts it to an Object not an ArrayCollection. Therefore your myListRequest.lastResult.records.record is an object and won't have the .length property. When you receive more than 1 record it will be an ArrayCollection of objects. You'll need to check the type of myListRequest.lastResult.records.record before you do any work with it. Hope that helps, Steve -Original Message- From: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com [mailto:[EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of Ben Marchbanks Sent: 27 November 2006 19:21 To: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com Subject: Re: [flexcoders] lastResult.records.record.length=null when there's actually 1 myRequest.event.result.length ?? Not sure I understand how to use event.result to get the count of the records returned. Tracy Spratt wrote: And avoid using lastResult except for binding. Instead use event.result. Tracy From: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com [mailto:[EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of Iko Knyphausen Sent: Friday, November 24, 2006 10:43 PM To: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com Subject: RE: [flexcoders] lastResult.records.record.length=null when there's actually 1 Does it behave the same if you use e4x as resultFormat? From: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com [mailto:[EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of pdflibpilot Sent: Friday, November 24, 2006 5:35 PM To: [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com Subject: [flexcoders] lastResult.records.record.length=null when there's actually 1 I use the following to get a count of the records returned by HTTPService request. myListRequest.lastResult.records.record.length; When theres only 1 the result is null ? Otherwise the count is fine whenever it is 2 or more. Is this the expected result ??
Re: [flexcoders] lastResult.records.record.length=null when there's actually 1
Look at ArrayUtil.toArray method that trasforms an object to an array. I'd think something like that would work: var arrayCollection : ArrayCollection= new ArrayCollection ( ArrayUtil.toArray(myListRequest. lastResult. records.record) ); HTH, Valy - Original Message From: Steve Cox [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, November 28, 2006 6:46:34 AM Subject: RE: [flexcoders] lastResult.records.record.length=null when there's actually 1 Try something like the following (I’m using result here instead of lastResult, but see what works for you: var acResults : ArrayCollection; if (myListRequest. lastResult. records.record is ArrayCollection) { acResults = myListRequest. lastResult. records.record; } else { acResults = new ArrayCollection(); acResults.addItem(myListRequest. lastResult. records.record); } Alert.show(acResults.length. toString()); HTH, Steve -Original Message- From: [EMAIL PROTECTED] ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Ben Marchbanks Sent: 28 November 2006 11:29 To: [EMAIL PROTECTED] ups.com Subject: Re: [flexcoders] lastResult.records. record.length= null when there's actually 1 Thanks Steve for explaining exactly the root cause. What method would you recommend to test if the result is an array or an object ? Steve Cox wrote: When a result contains only 1 object Flex converts it to an Object not an ArrayCollection. Therefore your myListRequest. lastResult. records.record is an object and won't have the .length property. When you receive more than 1 record it will be an ArrayCollection of objects. You'll need to check the type of myListRequest. lastResult. records.record before you do any work with it. Hope that helps, Steve -Original Message- From: [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com] On Behalf Of Ben Marchbanks Sent: 27 November 2006 19:21 To: [EMAIL PROTECTED] ups.com Subject: Re: [flexcoders] lastResult.records. record.length= null when there's actually 1 myRequest.event. result.length ?? Not sure I understand how to use event.result to get the count of the records returned. Tracy Spratt wrote: And avoid using lastResult except for binding. Instead use event.result. Tracy _ _ __ From: [EMAIL PROTECTED] mailto:flexcoders% 40yahoogroups. com ups.com [mailto:flexcoders@ yahoogro mailto:flexcoders% 40yahoogroups. com ups.com] On Behalf Of Iko Knyphausen Sent: Friday, November 24, 2006 10:43 PM To: [EMAIL PROTECTED] mailto:flexcoders% 40yahoogroups. com ups.com Subject: RE: [flexcoders] lastResult.records. record.length= null when there's actually 1 Does it behave the same if you use e4x as resultFormat? _ _ __ From: [EMAIL PROTECTED] mailto:flexcoders% 40yahoogroups. com ups.com [mailto:flexcoders@ yahoogro mailto:flexcoders% 40yahoogroups. com ups.com] On Behalf Of pdflibpilot Sent: Friday, November 24, 2006 5:35 PM To: [EMAIL PROTECTED] mailto:flexcoders% 40yahoogroups. com ups.com Subject: [flexcoders] lastResult.records. record.length= null when there's actually 1 I use the following to get a count of the records returned by HTTPService request. myListRequest. lastResult. records.record. length; When theres only 1 the result is null ? Otherwise the count is fine whenever it is 2 or more. Is this the expected result ?? !-- #ygrp-mlmsg {font-size:13px;font-family:arial,helvetica,clean,sans-serif;} #ygrp-mlmsg table {font-size:inherit;font:100%;} #ygrp-mlmsg select, input, textarea {font:99% arial,helvetica,clean,sans-serif;} #ygrp-mlmsg pre, code {font:115% monospace;} #ygrp-mlmsg * {line-height:1.22em;} #ygrp-text{ font-family:Georgia; } #ygrp-text p{ margin:0 0 1em 0; } #ygrp-tpmsgs{ font-family:Arial; clear:both; } #ygrp-vitnav{ padding-top:10px; font-family:Verdana; font-size:77%; margin:0; } #ygrp-vitnav a{ padding:0 1px; } #ygrp-actbar{ clear:both; margin:25px 0; white-space:nowrap; color:#666; text-align:right; } #ygrp-actbar .left{ float:left; white-space:nowrap; } .bld{font-weight:bold;} #ygrp-grft{ font-family:Verdana; font-size:77%; padding:15px 0; } #ygrp-ft{ font-family:verdana; font-size:77%; border-top:1px solid #666; padding:5px 0; } #ygrp-mlmsg #logo{ padding-bottom:10px; } #ygrp-vital{ background-color:#e0ecee; margin-bottom:20px; padding:2px 0 8px 8px; } #ygrp-vital #vithd{ font-size:77%; font-family:Verdana; font-weight:bold; color:#333; text-transform:uppercase; } #ygrp-vital ul{ padding:0; margin:2px 0; } #ygrp-vital ul li{ list-style-type:none; clear:both; border:1px solid #e0ecee; } #ygrp-vital ul li
Re: [flexcoders] FDS and AMFPHP
Philippe, I don't use PHP but have been collecting interesting links in case I start. :-) I suspect that one or more of them will help: http://www.brightworks.com/technology/adobe_flex/with_php.html Douglas - Douglas McCarroll CairngormDocs.org Webmaster http://www.CairngormDocs.org Flex Developer http://www.brightworks.com 617.459.3840 - Philippe wrote: Hi, Is it possible to use Flex Data Services 2 with AMFPHP ? And do someone know examples and/or tutorials ? (I m ok with AMFPHP but completely new with FDS) Thanks Phil
[flexcoders] Chart annotation and panning
Is there an easy way to add an annotation to a chart in the local coordinate of the chart ? So,if the min,max of the vertical or horizontal axis is changed,the location of the annotation will be also changed.The type of annotations that I would like to add are instances of the flash.display.shape class. Thank you. Regards Claude Hussenet - Everyone is raving about the all-new Yahoo! Mail beta.
[flexcoders] MOD: posts not showing up quickly
Hello, Can a moderator please enable my email address for instaPOST (tm) as currently they are delayed... Thanks, Adam
[flexcoders] Re: Firing an event when clicking on a DataGridColumn
http://livedocs.macromedia.com/flex/2/langref/mx/controls/DataGrid.html#eventSummary --- In flexcoders@yahoogroups.com, stephen50232 [EMAIL PROTECTED] wrote: Hi, Is it possible to fire an event every time a user clicks on a new row in a DataGrid. So that I can populate a form with a new record everytime the row in the DataGrid is selected.
Re: [flexcoders] Flex crashing @ compilation time
I guess you need RAM. The more, the better. Cheers, Ralf. On 11/28/06, The Crow [EMAIL PROTECTED] wrote: Hello. I've been using Flex 2 for 3 months now. There's around 40 mxml applications plus component, and actionscript files in the project and the compilation (building) time has considerably increased with time...taking up to 5-10 minutes at times. I've upgraded to Java 1.5.0.09 and changed the settings in the FlexBuilder configuration file and still no significant improvements have been noticed. Could anyone help me out with this issue. Deleting the Bin folder and re-compiling the whole project as well did not solve the problem. PC Specs: Pentium 4 HT (3.0 MHz, 1GB DDR2 Memory, Integrated graphic card) Thanks for your cooperation. Regards, Anoop -- Ralf Bokelberg [EMAIL PROTECTED] Flex Flash Consultant based in Cologne/Germany
Re: [flexcoders] Newie : calling a function when setting selected index
I ran into the same issue a while back, but it's actually expected functionality. The change event is only triggered upon user interaction, not scripting. Matt Chotin's reply was: --- The valueCommit event will fire in this case, change is only when it was user-interaction that caused the selection, not programmatic changes. --- I didn't want to have two separate event handlers to handle each of these events, so I manually dispatched an event from the datagrid. Here is an example of working code. The special line of code is the one after /** DISPATCH CHANGE EVENT **/ Cheers, Adam ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=horizontal mx:Script ![CDATA[ public function captureDatagridKey(event:KeyboardEvent):void { var a:Array,i:Number; if (event.ctrlKey event.keyCode == 65){ var num:Number = event.target.dataProvider.length as Number; a = []; for (i=0;inum;i++) a[i] = i; event.target.selectedIndices = a; /** DISPATCH CHANGE EVENT **/ event.target.dispatchEvent(new Event(change)); } } public function captureChangeEvent(event:Event):void { eventLog.text += Change event captured\n; } ]] /mx:Script mx:XMLList id=employees employee nameChristina Coenraets/name phone555-219-2270/phone email[EMAIL PROTECTED]/email activetrue/active /employee employee nameJoanne Wall/name phone555-219-2012/phone email[EMAIL PROTECTED]/email activetrue/active /employee employee nameMaurice Smith/name phone555-219-2012/phone email[EMAIL PROTECTED]/email activefalse/active /employee employee nameMary Jones/name phone555-219-2000/phone email[EMAIL PROTECTED]/email activetrue/active /employee /mx:XMLList mx:DataGrid keyDown=captureDatagridKey(event) change=captureChangeEvent(event) id=dg width=100% height=200 dataProvider={employees} mx:columns mx:DataGridColumn dataField=name headerText=Name/ mx:DataGridColumn dataField=phone headerText=Phone/ mx:DataGridColumn dataField=email headerText=Email/ /mx:columns /mx:DataGrid mx:TextArea id=eventLog width=100% height=300 / /mx:Application - Original Message - From: Joe To: flexcoders@yahoogroups.com Sent: Tuesday, November 28, 2006 9:09 AM Subject: [flexcoders] Newie : calling a function when setting selected index I have a datagrid with about 25 rows of employees names. On click or change I am calling a remote object that updated information based on the employee that you clicked. The row that was selected the disapears. I would like to know if it is possible to this with out using a click or change event. Can it automatically highlight a row and call the function and then go on to the next row and do the same. I know I can set the selected index, but it does seem to call the function. Any advice would be helpfull. Thank you.
[flexcoders] [Flex2]Where is the internal bitmap ? form cacheAsBitmap at DisplayObject;
[flexcoders] displaying an array result as a pop up dialog
I have built a simple mail application that allows the user to send a message to multiple users. once the message is successfully sent it returns a message i.e the message has been sent to the following recipients [EMAIL PROTECTED], [EMAIL PROTECTED] e.t.c the issue is that this data is returned as an array on this function in which i am using a textbox to display the results, however i would like to use an alert box to display the results instead. public function onSendResult(result:Array):void{ var str:String = result.toString(); string_res.htmlText= str; } how would i go about doing this?
Re: [flexcoders] Flex and CF (or how ActionScript is making me want to cry)
Thank greg, that 2nd link was exactly what I needed, just couldn't find it. Thanks again. On 11/27/06, greg h [EMAIL PROTECTED] wrote: Eric, Just add an id= property on the mx:RemoteObject tag. The value on the id property is the instance name that you can then reference in your AS code. You can find a code fragment example of hybrid MXML and AS referencing a RemoteObject in this post by Mike Nimer: www.mikenimer.com/index.cfm/2006/7/19/Flex-Data-Server-and-CF-Flash-Remoting-together btw ... you can also do it all in AS. Sample here from the docs: http://livedocs.macromedia.com/flex/2/docs/1140.html#263224 hth, g On 11/27/06, Eric Fleming [EMAIL PROTECTED] wrote: A bit of a change of subject, but how would I call the remoteobject tag in actionscript? mx:RemoteObject method=myMethod result=myMethodResult(event) fault=Alert.show(event.fault.message) / In AS3? -- Eric Fleming [EMAIL PROTECTED]
[flexcoders] rotating MovieClip
Hi all, I want to rotate a MovieClip on some axis..I saw there is a effect called Rotate in Flex 2.I tried using it.It has properties called originX and originY which clearly states that any object will rotate on that axis.I want to achiever similar feature in AS 3.When i tried using it, it was not working..Where am i goin wrong..Can anyone post me a link regarding that..Here is the sample code i am tryin to achieve var rot: Rotate = new Rotate; rot.angleFrom = 0; rot.angleFrom = 45; rot.duration = 2000; rot.originX = 100; rot.originY = 100; rot.target = 'id of the component i want to pass'; This code works fine with any mxml component passed to it..But its not working with any MovieClip passed to it.. Can anyone help me out in that.. Thanks
[flexcoders] E4x and the xml defaul namespace xml
Hello! I need to set an xml:lang attribute in XML file, and I have trouble doing so. If I just use the xml-prefix it won't work, so I need to add a namespace declaration. But then that namespace declaration is visible in the xml output, like this: lom xmlns=[[ims metadata namepsace]] xmlns:xml=[[xmlnamespace]]langstring xml:lang=de//lom The xml validator then tells me that the file is invalid, because i must not declare the default xml namespace. Right now I just remove the xml namespace by converting the xml to a string and then just replace xmlns:xml. Is there a more elegant way to do it or am i missing something? thanks, Markus
RE: [flexcoders] Bit Off topic: Microsoft Vista VS Apollo/Flex/Flash
FYI, Apollo will have application signing From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of John C. Bland II Sent: Sunday, November 26, 2006 8:43 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Bit Off topic: Microsoft Vista VS Apollo/Flex/Flash Vista isn't -vs- Apollo/Flex/Flash. Here's the breakdown: WPF vs Apollo (and swf wrappers) WPF/E vs Flex/Flash I didn't read your entire post but I wanted to add that clarification. The Expression family isn't the whole round trip. You build WPF apps, most of the time at least, with Visual Studio. Expression has GREAT integration between the products. You start as a designer creating the interface (with full XAML code exported), move to Interactive Designer and add a few mod's (maybe even some code), then use the same code in Visual Studio to tie in data and everything else. Graphics and everything are all in code. Very nicely done...seriously. My opinion as to how they compare: WPF -vs- Apollo * WPF will probably blow Apollo out of the water in terms of system integration. Apollo has a few things that integrate into the OS but being cross platform somewhat prevents it from fully integrating like WPF. Keep in mind...WPF is .NET so you have great control over Windows. * Apollo easily wins at cross platform. * Apollo wins at ease of use/creation. WPF isn't terribly difficult but for normal .NET developers not used to control over the UI that WPF gives, it can be a bit daunting. * The power of WPF apps wins. Native database support, app signing (which I don't think Apollo will have), etc. WPF/E -vs- Flash/Flex * No argument...WPF/E has a LONG way to go. Flash/Flex wins without a doubt. Nothing further here. :-) On 11/26/06, Sebastian Zarzycki [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: camlinaeizerous wrote: Microsoft Expressions a new development tool reminded a lot of people of flash studio and it seems like a copy of flash with A Microsoft label on top. Although I didn't get to see a lot of the under working just a quick over view, essentially by default the time line is on the bottom drawing tools on the right and library on the left. It seemed so similar during the overview I heard people actually laughing saying it looked like flash. however looking at the code that was generated and the movements and transitions were basically generated with java. Actually, Microsoft Expression is new Microsoft Platform for artistic development. It consist of three tools : Web Designer (codename Quartz) - which is a replacement for Office Front Page (there's no FrontPage in Office 2007)., Graphic Designer (codename Acrylic), and Interactive Designer (codename Sparkle). You were talking about the last one, I guess. I'm checking expression's website for a year, to get some data for flex and apollo comparisions. Been playing around with Sparkle few hours. There are definitely some cool things about it, but I, for instance, don't like the incoherent (but nice) interface and I fail to understand how to build RIA using old timeline concept. Sparkle is meant to be a tool for designers, not coders. Let's see how they will cooperate in future. Today, as a developer from java world, I can quickly learn how to build an working and functional app in Flex. I have great troubles with achieving the same with Sparkle. -- | Sebastian Zarzycki / rat[tkin] | [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] | i'm a little lost in this postmodern space | gg:#2692696 / icq:#264185739 irc :#tool #ot-oa / skype:rattkin -- John C. Bland II Chief Geek Katapult Media, Inc. - www.katapultmedia.com http://www.katapultmedia.com --- Biz Blog - http://blogs.katapultmedia.com/jb2 http://blogs.katapultmedia.com/jb2 Personal Blog - http://blog.blandfamilyonline.com http://blog.blandfamilyonline.com http://www.lifthimhigh.com http://www.lifthimhigh.com - Christian Products for Those Bold Enough to Wear Them Home of FMUG.az - http://www.gotoandstop.org http://www.gotoandstop.org Home of AZCFUG - http://www.azcfug.org http://www.azcfug.org
[flexcoders] Re: datagrid dataprovider Flex 2.0
This does work. Thanks Tracy --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: It sounds like the Categoris information is in an object nested within the Items object. If so, you will need to us a labelFunction. You can only define a datField if the data is in a top level property of the item object. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sunilpatel_10 Sent: Monday, November 27, 2006 2:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] datagrid dataprovider Flex 2.0 - I have two tables - Categoris and a child table called Items as follows Categories - Code, Description Items - Code, Description, Categories_id - I hava a hibernate named query all.items that gets me all the ITEM table records and corresponding categories in myRecArray arraycollection - A datagrid with the source as myRecArray has been created. For the first column, I specified the dataField as code and it shows item code correctly. Quetsion is, how do I specify categories.code as the dataField for second column in the grid? - If I check the data for myRecArray, I do see correct categories for each item e.g. myRecArray[0].categories.code - I tried specifying the dataFields as categories.code but this doesn't show any data
Re: [flexcoders] Flex JavaScript
Are you using the flash javascript toolkit located at http://weblogs.macromedia.com/flashjavascript/ Claude kribot [EMAIL PROTECTED] wrote: Hi, I'm trying to mix Flex JavaScript, I'm using Flex Builder and I would ask if someone already try to do that, I'm putting JavaScript in my project html file but all the time I'm saving a new features in an AS File for example it is reloading my project html file ... I don't get it ! By the way, the JavaScript I put in my html file doesn't work. Is there something I should do before use JavaScript ? Thx in avdance :) -- krib Regards Claude Hussenet - Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.
[flexcoders] EventDispatching Listening
I'm using bubbling, or at least i think i am to capture an event... I've extended the event class to make my own event mechanism. the events are being dispatched, however the problem is, that I'm adding an event listener to my custom mxml component to receive the events and nothing happens. I've probably got something backwards... Doesn't bubbling set to true allow the event to be captured by any component in the order that they are created? my code is as follows: var evt:MeEvent = new MeEvent(MeEvent.REMOTE,true); dispatchEvent(evt); --- package com.me { import flash.events.Event; public class MeEvent extends Event { public static const REMOTE:String = remote; public var realTarget:*; public function MeEvent(type:String, bubbles:Boolean=true, cancelable:Boolean=false) { super(type, bubbles, cancelable); } } } -- And inside my custom component this is the event listener. private function init():void{ this.addEventListener(MeEvent.REMOTE, handleEvent); } Thanks for your time, Patrick
[flexcoders] Re: FLEX.war and PROJECT.war
Thanks for your quick response... I have tried it but after integrating it when I start my exisiting application, It is failed to load even the first page. I am sure, I am doing some mistakes while making entries in web.xml. Could you please help me out which entries should I make for this integration? I have got the integration with Flex 1.5 from: http://livedocs.macromedia.com/flex/15/flex_docs_en/wwhelp/wwhimpl/co mmon/html/wwhelp.htm?context=Flex_Documentationfile=0903.htm but didnt get for flex 2. Pleease help. Thanks Sanjay --- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote: It's usually better to have the WARs combined if you can. Make sure that the web.xml from the flex.war gets integrated correctly. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sanjaypmg Sent: Monday, November 27, 2006 4:51 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] FLEX.war and PROJECT.war Hey.. I have my flex project under Flex.war folder and another java project under Project.war folder. while I am trying to call my mxml file from my java project I am facing an error.. could anyone please help me? Thanks Sanjay
[flexcoders] how to choose an image
hi, i'm a neewbie in flex programming. How can i choose an image anywhere in my computer and show it in a mx image control? i'm trying trying to use FileReference.Browse but i only get the name of the selected file and not the all path. Can someone help me? Thanks in advance Nuno
Re: [flexcoders] 3 questions: Context menu, graphing component and XmlRpc
With the context menu example you gave below, it would be easy enough to replicate the functionality. Most of the trickery is in the HTML of the page the swf is hosted in, intercepting the right mouse click and executing a function in the swf. I'm not sure how stable the JS code is, and if it supports all browsers - might want to test/tweak this. function onNsRightClick(e){ if(e.which == 3){ Test9.openRightClick(); e.stopPropagation(); } return false; } function onIeRightClick(e){ if(event.button 1){ Test9.openRightClick(); parent.frames.location.replace('javascript: parent.falseframe'); } return false; } If you look further down the HTML source, you'll find that Test9 is the name of the Flash movie being embedded. So obviously, in those functions listed above, you would just have a function in the swf that responds to openRightClick() and shows your menu. It won't work in the same fashion as the current context menu, you'd have to customise that a bit. I was wondering how something like this could be done a while back, so thanks for the example. If I end up writing the code before you do, I'll share it, but you'll prob need it before then. Cheers, Adam - Original Message - From: chuvakgu To: flexcoders@yahoogroups.com Sent: Tuesday, November 28, 2006 5:22 AM Subject: [flexcoders] 3 questions: Context menu, graphing component and XmlRpc Hi all, I am new to Flex 2, and I have looked for answers to these but haven't found much. Here they are: 1. Context menu (right-click) - I am looking for a way to kill the actual flash context menu and have my own. Kind of like the one shown at http://www.flex-flex.net/flex/RightClickMenu/RightClick.html, but of course :) there's no right-click show source code. It is discussed at http://www.flex-flex.net/blog/article.asp?id=12, but only says code later, and comments are full of spam (I guess I am just showing that I've done some homework here). 2. Open-source graph component - by this I mean not graphs like pie charts, but creation of graphs with nodes, edges, layouts (ideally - drag/drop/snapping support). I've only dug out http://mark-shepherd.com/blog/springgraph-flex-component/, but this is a bit too much (plus it's non-directional). I guess it's worth hacking if I don't dig up something more along the lines of http://www.mxgraph.com/pages/en/index.html. 3. Finally, for an XmlRpc way to talk to the server (I already have a server that serves that:). I've been able to find http://sourceforge.net/projects/xmlrpcflash and http://probertson.com/projects/xmlrpc/, both for AS 2.0. I am guessing it shouldn't be hard to make it work with 3.0, but which one would you recommend?
[flexcoders] Flex 2 and Flourine with amf 3
Hello to all, I just called hello world asp.net code in flex 2 with flourine.net remoting ,and it just give me Greeting in flex from .net the example as they have said flourine supports amf 3 ..so i want to work on that :) Could any one tell scope of flourine with flex 2? and plz let me knoww how to send datatable from .net to flex 2 , I have written fllowing code but its flex showing null to me but that table object have data which could be view in datagrid of .net I am bit confused with .net code which is chnage from flash remoting dll ??? My ASp Code If parameters Is Nothing Then Throw New Exception(No arguments recieved) Me.Context.Items(flash.result) = No Parameters| Else Me.Context.Items(flash.result) = Table1 ' it has datainside but in flex its showing me nulll how to send it End If Flex Code public function onResult( result : Object ) { output.text= Result+result; } public function onFault( fault : Object ) { output.text =Error+ fault.valueOf(); } public function initApplication() { gateway = new RemotingConnection( http://localhost/TestingFlexs/gateway.aspx; ); gateway.call( TestingFlexs.WebForm1,respomd, hello world); } Plz let me know how to get DataTable in it Thanks in advance - Everyone is raving about the all-new Yahoo! Mail beta.
RE: [flexcoders] how to choose an image
Unfortunately this isn't as straight forward as you would think. FileReference, for some reason, will not allow you to access the data of the file you have located. Therefore the only way that I am aware of to do what you want would be to upload this file to a server first, then load it into flex using swfloader or an image control. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of nchumbo Sent: 28 November 2006 13:05 To: flexcoders@yahoogroups.com Subject: [flexcoders] how to choose an image hi, i'm a neewbie in flex programming. How can i choose an image anywhere in my computer and show it in a mx image control? i'm trying trying to use FileReference.Browse but i only get the name of the selected file and not the all path. Can someone help me? Thanks in advance Nuno
[flexcoders] Right mouse button with Flex 2
Is there a way to add an event listener with Flex 2 on the right mouse button as it's possible for the left button ? Thank you Regards Claude Hussenet - Cheap Talk? Check out Yahoo! Messenger's low PC-to-Phone call rates.
[flexcoders] Chart annotation and panning
Is there an easy way to add an annotation to a chart in the local coordinate of the chart ? So,if the min,max of the vertical or horizontal axis is changed,the location of the annotation will be also changed.The type of annotations that I would like to addare instances of the flash.display.shape class. Thank you. Regards Claude Hussenet - Everyone is raving about the all-new Yahoo! Mail beta. Regards Claude Hussenet - Everyone is raving about the all-new Yahoo! Mail beta.
[flexcoders] Binding to a custom method: possible?
There was a similar question asked here recently but my needs are different so I am starting a new thread. My needs are as follows: I have a ComboBox whose enabled state needs to be determined by several factors, thus the need for a custom method. The problem is that this doesn't seem to work, no matter how I try it. Am I missing something or is this just not possible (meaning I have to set a property and bind to that)? Fake sample code below: [Bindable] private function isEnabled():Boolean { if(conditionA) { if(conditionB) { return true; } else { return false; } } } mx:ComboBox id=cb enabled={isEnabled()}/ Thanks, Ben
RE: [flexcoders] Right mouse button with Flex 2
Yes there is check out the contextmenuitemclick event .I think this is what you are looking for. To be more precise ContextMenuEvent.MENU_ITEM_SELECT. Thanks Kumar _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Claude Hussenet Sent: Tuesday, November 28, 2006 6:53 AM To: flexcoders@yahoogroups.com; flashcoders@chattyfig.figleaf.com Subject: [flexcoders] Right mouse button with Flex 2 Is there a way to add an event listener with Flex 2 on the right mouse button as it's possible for the left button ? Thank you Regards Claude Hussenet _ Cheap Talk? Check http://us.rd.yahoo.com/mail_us/taglines/postman8/*http:/us.rd.yahoo.com/evt =39663/*http:/voice.yahoo.com out Yahoo! Messenger's low PC-to-Phone call rates.
Re: [flexcoders] Re: adding Bitmap to a container
as you have said, you can't add a bitmap to a container, if the class doesn't implement UICompoenent. You can the bitmap to a UIComponent which can be added to a Container. Also, you can do directly draw the bitmap on the container using Graphics.beginBitmapFill(), but this creates a fair a amount of limitations on what you can (easily) do with the bitmap after it has been added so that might not be the right approach. The documentation is correct that you can add DisplayObjects to DisplayObjectContainers, but Container overrides addChild/addChildAt so that it will only accept a UIComponents. So the documentation is correct, but a little confusing in this respect. - Dan On 11/28/06, Mark Piller [EMAIL PROTECTED] wrote: Patrick, But what if myComponent type has to be Bitmap? How can I add it then to my container? Thanks, Mark --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, {reduxdj} [EMAIL PROTECTED] wrote: Mark: Instantiate a new UIComponent then try: import mx.controls.UIComponent; ... var myComponent:UIComponent = new UIComponent(); (blah blah blah - Your code here then don't forget to add that component to the display list) addChild(myComponent); This should fix your problem, hope this helps, Patrick Mark Piller wrote: I am experiencing a difficulting adding a Bitmap to a container using the addChild() method. The error i get is: TypeError: Error #1034: Type Coercion failed: cannot convert flash.display::[EMAIL PROTECTED] to mx.core.IUIComponent. The error actually makes sense since flash.display.Bitmap does not implement IUIComponent, which aparently is required, since the doc for mx.core.Container.addChild says: Note: While the child argument to the method is specified as of type DisplayObject, the argument must implement the IUIComponent interface to be added as a child of a container. All Flex components implement this interface. However, the documentation for the Bitmap class states the following: The Bitmap() constructor allows you to create a Bitmap object that contains a reference to a BitmapData object. After you create a Bitmap object, use the addChild() or addChildAt() method of the parent DisplayObjectContainer instance to place the bitmap on the display list. Anyone has any idea what's going on with this? Is the documentation incorrect? Has anyone been able to add Bitmap to the display list? Thanks, Mark
[flexcoders] Problems binding the event.result to an object
Hi, I'm still getting use to Flex, and I'm having a bit of trouble Binding the results of an event to a Object. I have a AS page called Stafftbluser.as, which represents a CFC of mine called tblUserBean.cfc. I also have a function which gets the details of a user from a RemoteObject call and then should bind the results to a object of type Stafftbluser, but when I display the even.result in an Alert (using Alert.show()) I can see the returned results, but in the object I'm binding to when I display this in a Alert it is null. I'm first creating a Stafftbluser object, like this: private function initComponent():void { this.detailObject = new StafftblUser(); } Then in my result handler I'm trying to set the event.result to a variable which I then set to this.detailObject. private function get_result(event:ResultEvent):void { Alert.show( event + ObjectUtil.toString(event.result) ); var detail = event.result as StafftblUser; Alert.show( Detail + ObjectUtil.toString(detailObject) ); this.detailObject = detail; } Then in a form in my Flex page I'm trying to bind the properties of detailObject: mx:FormItem width=100% label=Firstname required=true cfComponents:TextInputMask id=tblUser_Firstname text={this.detailObject.Firstname} width=100% / /mx:FormItem Some of this was written using the CF/Flex application wizard, but I think this have complicated things. So what's the easiest and quickest way to bind results from a RemoteObject call to a ActionScript class and display the results? Thanks Stephen
RE: [flexcoders] Chart annotation and panning
We use a PlotSeries with a custom ItemRenderer for this purpose. Seems to work well, but it'd be nice if there was a more explicit way to add annotations. Sam _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Claude Hussenet Sent: Monday, November 27, 2006 9:59 PM To: flexcoders@yahoogroups.com; flashcoders@chattyfig.figleaf.com Subject: [flexcoders] Chart annotation and panning Is there an easy way to add an annotation to a chart in the local coordinate of the chart ? So,if the min,max of the vertical or horizontal axis is changed,the location of the annotation will be also changed.The type of annotations that I would like to addare instances of the flash.display.shape class. Thank you. Regards Claude Hussenet
[flexcoders] Major bug: External interface doesn't work when inside form
Hi all, I've spent most of the day trying to track down a nasty bug with Flex (or Flash) in ASP.NET. I've not yet tried in Firefox, but it's present in IE6 and IE7. ASP.NET wraps pretty much the entire page in form/form tags. Unfortunately, either Flex or the Flashplayer includes javascript that relies on the movie not being inside forms, when you use ExternalInterface. Eg. Create a new flex project like this: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=initApp(); mx:Script ![CDATA[ public function initApp():void { // Add interface so Javascript can call our setData method ExternalInterface.addCallback(setData, setData); } public function setData(sXml:String):void { // Do nothing } ]] /mx:Script /mx:Application It simply registers a method than be called in javascript. If you run this, you'll just get a blank flex app. Now open the index.template.html file, and add form tags immediately inside the body tag: body form // rest of page // /form /body Now try running it again. You'll get a javascript error to the effect of 'FormTestProject' is undefined. It comes from this code (I don't know if this comes form Flex or the FP) which gets loaded into the document: function __flash_unloadHandler() { FormTestProject.style.display = 'none'; // Snip } Note that FormTestProject is not wrapped in document.getElementById(). This seems to work by fluke when the object is in the main page, but when inside a form, it doesn't. I can't find anyone else having this issue on flexcoders (though searching for form returns anything containing formatting, etc. etc.!), which kinda surprises me, given it's a big show stopper for anyone using asp.net and ExternalInterface. Anyone else hit this problem? Any workarounds? Thanks, Danny The information contained in this e-mail and/or any attachments is confidential and intended only for the individual(s) to which it is addressed. If you are not named as an addressee you must not disclose, copy or take any action in reliance of this transmission. This e-mail and its attachments have been scanned for viruses by MessageLabs Ltd. __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __
[flexcoders] Help with Deleting Tree Node---I've tried everything!
Howdy all I've been searching and reading and trying just about every example I can find to delete a tree node, but nothing seems to work. I've looked at Peter Ent's code, but couldn't get that to work. There was also a posting on the Adobe forums where someone was doing something very similir to what I'm using and eventually got their to work, but never posted how. I'm using a modified version of the custom ITreeDataDescriptor example that looks for items instead of children. My tree is being populated with a highly nested arraycollection. When it execute the removeChildAt function, it's using Splice and is supposed to remove the 1st item after the index parameter, but nothing happens. The tree dataprovider remains the same. If someone can give me a hand and tell me what I'm doing wrong, I would be most appreciative! Below is the code I'm using: public class ItemAsChildTreeRender implements ITreeDataDescriptor //public class ItemAsChildTreeRender extends TreeItemRenderer { // The getChildren method requires the node to be an Object // with a children field. // If the field contains an ArrayCollection, it returns the field // Otherwise, it wraps the field in an ArrayCollection. public function getChildren(node:Object, model:Object=null):ICollectionView { try { if (node is Object) { if(node.item is ArrayCollection){ return node.item; }else{ var ac:ArrayCollection=new ArrayCollection(mx.utils.ArrayUtil.toArray(node.item)) ; //return new ArrayCollection(node.item as Array); return ac } } } catch (e:Error) { trace([Descriptor] exception checking for getChildren); trace (error: + e.message); } return null; } // The isBranch method simply returns true if the node is an // Object with a children field. // It does not support empty branches, but does support null children // fields. public function isBranch(node:Object, model:Object=null):Boolean { try { if (node is Object) { if (node.item != null) { return true; } } } catch (e:Error) { trace([Descriptor] exception checking for isBranch); } return false; } // The hasChildren method Returns true if the node actually has children. public function hasChildren(node:Object, model:Object=null):Boolean { if (node == null) return false; var children:ICollectionView = getChildren(node, model); try { if (children.length 0) return true; } catch (e:Error) { } return false; } // The getData method simply returns the node as an Object. public function getData(node:Object, model:Object=null):Object { try { return node; } catch (e:Error) { } return null; } // The addChildAt method does the following: // If the parent parameter is null or undefined, inserts // the child parameter as the first child of the model parameter. // If the parent parameter is an Object and has a children field, // adds the child parameter to it at the index parameter location. // It does not add a child to a terminal node if it does not have // a children field. public function addChildAt(parent:Object, child:Object, index:int, model:Object=null):Boolean { var event:CollectionEvent = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); event.kind = CollectionEventKind.ADD; event.items = [child]; event.location = index; if (!parent) { var iterator:IViewCursor = model.createCursor(); iterator.seek(CursorBookmark.FIRST, index); iterator.insert(child); } else if (parent is Object) { if (parent.item != null) { if(parent.item is ArrayCollection) { parent.item.addItemAt(child, index); if (model){ model.dispatchEvent(event); model.itemUpdated(parent); } return true; } else { parent.item.splice(index, 0, child); if (model) model.dispatchEvent(event); return true; } } } return false; } // The removeChildAt method does the following: // If the parent parameter is null or undefined, removes // the child at the specified index in the model. // If the parent parameter is an Object and has a children field, // removes the child at the index parameter location in the parent. public function removeChildAt(parent:Object, child:Object, index:int, model:Object=null):Boolean { //super.removeChildAt(parent,child,index,model); var event:CollectionEvent = new CollectionEvent(CollectionEvent.COLLECTION_CHANGE); event.kind = CollectionEventKind.REMOVE; event.items = [child]; event.location = index; //handle top level where there is no parent if (!parent) { var iterator:IViewCursor = model.createCursor(); iterator.seek(CursorBookmark.FIRST, index); iterator.remove(); if (model) model.dispatchEvent(event); return true; } else if (parent is Object) { if (parent.hasOwnProperty(item) parent.item != undefined) { parent.item.splice(index, 1); if (model) model.dispatchEvent(event); return true; } } return false; } } My MXML is as follows: mx:Tree id=printTree change=publicTreeChanged(event) dataDescriptor={new util.ItemAsChildTreeRender()} dropEnabled=true labelField=name width=100% height=100%/ mx:Button
[flexcoders] Re: Calendar...visually show selection for related data?
Never really found an answer to this. Anyone know where I can find more primers on extending Components? I've gone through a few, but none of them seem to really apply to this particular dilemma. - Chris --- In flexcoders@yahoogroups.com, qnotemedia [EMAIL PROTECTED] wrote: Sorry - posted this in the wrong thread!! So how about this? If you CTRL-Click on a default Datechooser in MXML, you get the built-in DateChooser.as. I'm particularly interested in the section on the showToday property, which of course has its own style for a specific date. I would think that maybe this could perhaps be edited to accept an array of dates instead of a single date? I just don't quite know enough yet on exactly how to do something that simple... - Chris --- In flexcoders@yahoogroups.com, Andrew D. Goodfellow agoodfellow@ wrote: Yeah, I've been trying to figure this one out in my spare time as well. selectedRanges is definitely not what you want. I haven't dug into sub classing the DateChooser yet, but I am sure that will be required. Can anyone from Adobe shed some more light on this components rendering grid? -Andy On 11/9/06, qnotemedia qnotemedia@ wrote: Nah, not selectedRanges - cause, I'd like to highlight specific dates randomly, not consecutive ones. Though I haven't used selectedRanges...can you specify the same date as the range? Will look into that... Anyone use Outlook's Calendar? i.e. when you look at the whole month, numbers (dates) that have meetings are bolded. That's what I'd like to accomplish. I figured this would clearly require extending the DateChooser class and passing the data to it as a property. However, I'm not sure how to selectively apply a bold style or something to a specific date. What part of the DateChooser is rendering the dates? - Chris --- In flexcoders@yahoogroups.com flexcoders% 40yahoogroups.com, Tom Chiverton tom.chiverton@ wrote: set selectedRanges ? -- Tom Chiverton Helping to administratively harvest internet appliances This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at St James's Court Brown Street Manchester M2 2JF. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law Society. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 8008. For more information about Halliwells LLP visit www.halliwells.com.
[flexcoders] Re: Major bug: External interface doesn't work when inside form- WORKAROUND
Here's a workaround. Just before the /script tag, define a page-level variable with the expected name, that references the actual object. I've not tested this well, but at first glance, it seems to work. var ${application} = document.getElementById('${application}'); If you're using SWFObject (like us), you put it just after the .write() code: var so = new SWFObject('Flash/DashboardRadarChart.swf', 'radarChart', 700, 350, 9, '#FF'); so.write('flashWrapper'); var radarChart = document.getElementById('radarChart'); If there's a bug tracker or somewhere I can raise this, let me know and I'll go file it. Danny The information contained in this e-mail and/or any attachments is confidential and intended only for the individual(s) to which it is addressed. If you are not named as an addressee you must not disclose, copy or take any action in reliance of this transmission. This e-mail and its attachments have been scanned for viruses by MessageLabs Ltd. __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __
RE: [flexcoders] Problems binding the event.result to an object
Stephen, If you are returning a CFQuery I find it easy to type it as an ArrayCollection. Flex is case sensitive, and more than likely your event.result should be all caps for the field name ( this.detailObject.FIRSTNAME ). You can verify this by setting a breakpoint in your function where assign your event.result to your detailObject and look at the variables. If you have an empty event.result, then it's a communication issue with the server. Brian.. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of stephen50232 Sent: Tuesday, November 28, 2006 8:01 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Problems binding the event.result to an object Hi, I'm still getting use to Flex, and I'm having a bit of trouble Binding the results of an event to a Object. I have a AS page called Stafftbluser.as, which represents a CFC of mine called tblUserBean.cfc. I also have a function which gets the details of a user from a RemoteObject call and then should bind the results to a object of type Stafftbluser, but when I display the even.result in an Alert (using Alert.show()) I can see the returned results, but in the object I'm binding to when I display this in a Alert it is null. I'm first creating a Stafftbluser object, like this: private function initComponent():void { this.detailObject = new StafftblUser(); } Then in my result handler I'm trying to set the event.result to a variable which I then set to this.detailObject. private function get_result(event:ResultEvent):void { Alert.show( event + ObjectUtil.toString(event.result) ); var detail = event.result as StafftblUser; Alert.show( Detail + ObjectUtil.toString(detailObject) ); this.detailObject = detail; } Then in a form in my Flex page I'm trying to bind the properties of detailObject: mx:FormItem width=100% label=Firstname required=true cfComponents:TextInputMask id=tblUser_Firstname text={this.detailObject.Firstname} width=100% / /mx:FormItem Some of this was written using the CF/Flex application wizard, but I think this have complicated things. So what's the easiest and quickest way to bind results from a RemoteObject call to a ActionScript class and display the results? Thanks Stephen -- 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 *** The information in this e-mail is confidential and intended solely for the individual or entity to whom it is addressed. If you have received this e-mail in error please notify the sender by return e-mail delete this e-mail and refrain from any disclosure or action based on the information. ***
[flexcoders] Re: Flex and CF (or how ActionScript is making me want to cry)
--- In flexcoders@yahoogroups.com, Ben Densmore [EMAIL PROTECTED] wrote: Hi Stephen, you pretty much have it. Steps 1 and 2 can be done in any order. You can do your Flex layout first if you want and then write your CF code or vice versa, that part doesn't really matter. I'm not sure what your trying to bind your data to but say you had a datagrid that you wanted to populate from data returned from a CFC. There are several ways to do this but the easiest way I found is to use a mx:RemoteObject tag with your method name and a result to return your data to: mx:RemoteObject method=myMethod result=myMethodResult(event) fault=Alert.show(event.fault.message) / Now you can either pass arguments into that RemoteObject or just call it as is. In your ActionScript code you need to have your results method to populate your grid. First you need to declare a Bindable variable so that your grid has something to bind to. [Bindable] public var myResult:Object; public function myMethodResult(event:ResultEvent):void { myResult = event.result; } One warning I would give is- if you need to do any type of Array functions this method will not allow that. You would need to either use the mx:ArrayCollection to convert it to an ArrayCollection or return your query results as an array and set your variable to an ArrayCollection datatype. Now to populate your datagrid you would just do: mx:DataGrid dataProvider={myResult} mx:columns mx:Array mx:DataGridColumn headerText=Column1 dataField=column1/ mx:DataGridColumn headerText=Column 2 dataField=column2/ mx:DataGridColumn headerText=Column 3 dataField=column2/ /mx:Array /mx:columns /mx:DataGrid This way may not be best practice but to get you up and running this should help. If you need anymore help just let me know. Ben - Original Message From: Stephen Adams [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Monday, November 27, 2006 10:32:29 AM Subject: [flexcoders] Flex and CF (or how ActionScript is making me want to cry) Hi, I'm trying to get my head around using Flex with ColdFusion, but I'm really getting stuck with how Flex works with CF. I'm trying to create a application which has several forms in which the user enters, save and update user details, simple stuff really. I can create the CF code (using DAO's, gateways and Beans. But linking the methods in my CF to Flex is melting my brain. Every example I've seen says it easy, and then uses tons of ActionScript, which I get lost in. SO what's the basic steps in linking CF and Flex, are they: Create your CF code (DAO's, Bean's and Gateways) Create your flex layout Call the CF Gateway using mx:RemoteObject Then link the results of the methods to the layout (this is the bit I'm lost at, passing data back and forth to CF methods) Any help will be great and stop me running down the road screaming. Thanks Stephen !-- #ygrp-mlmsg {font-size:13px;font-family:arial,helvetica,clean,sans-serif;} #ygrp-mlmsg table {font-size:inherit;font:100%;} #ygrp-mlmsg select, input, textarea {font:99% arial,helvetica,clean,sans-serif;} #ygrp-mlmsg pre, code {font:115% monospace;} #ygrp-mlmsg * {line-height:1.22em;} #ygrp-text{ font-family:Georgia; } #ygrp-text p{ margin:0 0 1em 0; } #ygrp-tpmsgs{ font-family:Arial; clear:both; } #ygrp-vitnav{ padding-top:10px; font-family:Verdana; font-size:77%; margin:0; } #ygrp-vitnav a{ padding:0 1px; } #ygrp-actbar{ clear:both; margin:25px 0; white-space:nowrap; color:#666; text-align:right; } #ygrp-actbar .left{ float:left; white-space:nowrap; } .bld{font-weight:bold;} #ygrp-grft{ font-family:Verdana; font-size:77%; padding:15px 0; } #ygrp-ft{ font-family:verdana; font-size:77%; border-top:1px solid #666; padding:5px 0; } #ygrp-mlmsg #logo{ padding-bottom:10px; } #ygrp-vital{ background-color:#e0ecee; margin-bottom:20px; padding:2px 0 8px 8px; } #ygrp-vital #vithd{ font-size:77%; font-family:Verdana; font-weight:bold; color:#333; text-transform:uppercase; } #ygrp-vital ul{ padding:0; margin:2px 0; } #ygrp-vital ul li{ list-style-type:none; clear:both; border:1px solid #e0ecee; } #ygrp-vital ul li .ct{ font-weight:bold; color:#ff7900; float:right; width:2em; text-align:right; padding-right:.5em; } #ygrp-vital ul li .cat{ font-weight:bold; } #ygrp-vital a { text-decoration:none; } #ygrp-vital a:hover{ text-decoration:underline; } #ygrp-sponsor #hd{ color:#999; font-size:77%; } #ygrp-sponsor #ov{ padding:6px 13px;
[flexcoders] Problems with a DateField as an itemRenderer/editor
I'm having an issue with DataGridEvent (onItemEnd) and the DateField class. Basically, I've developed a framework that uses onItemEnd from the datagrid. I have components like the combobox for example... onChange calls onItemEnd which takes the data of the combobox and puts it in the dataField of the datagrid, then makes a service call to update to the database. I've gotten this to work great with many components but the dateField I'm having a horrible time with. when I dispatchEvent (onitemend) for example, I use event.currentTarget.editedItemRenderer to get the value from event.target.itemEditorInstance. Which both don't exist when I dispatchEvent from the calendar select date (onClose) event handler. This works when I have the dateField as an Editor only and using the default renderer. This is an issue becuase it creates another click for the user. I think the root of my problem is that when you click on the datefield to open the calendar, it doesn't invoke it as an editor in the datagrid. Is there a way to force this? Any help would be appreciated. Thanks in advance. Louie Penaflor Web Software Developer World Council of Credit Unions, Inc. Ph: (608)231-7932 This is a transmission from World Council of Credit Unions, Inc. and contains information that is confidential. If you are not the intended addressee or authorized to receive for the addressee, then any disclosure, copying, distribution, or use of the contents of this message is prohibited. If you have received this transmission in error, please destroy it and notify the sender immediately at the transmitting e-mail address. If you are the intended recipient, please be advised that this e-mail transmission is not encrypted or otherwise protected from potential misappropriation or misuse. World Council of Credit Unions, Inc. expressly disclaims any and all liability for harm resulting from the misappropriation, interception or misuse of the information contained in this transmission.
[flexcoders] accordion, load ALL
i have an acoordion box, and when sth is clicked inside one canvas, another is opened and a function in the component included in the opened tab is called. but in the first click, because the canvas objects are not preloaded, i cannot call the function... how can i say the accordion component to load all of it's content not only the first tab? Want to start your own business? Learn how on Yahoo! Small Business. http://smallbusiness.yahoo.com/r-index
[flexcoders] many-to-many managed association in Hibernate destination
Hi All, This is essentially a repost of my How to implement Lazy Hibernate? question. I'm still completely stuck. Here's the error message I'm getting: [RPC Fault faultString=Page request made for item with id = '{filmId=null}'. The item was not in the cache and the adapter's get method failed to return the item for destination = film.hibernate that is expected to be in the requested page. faultCode=Server.Processing faultDetail=null] Here's the big picture: I'm attempting to create a Cairngorm/FDMS/Hibernate/MySQL example program. I have three tables. 'actor' and 'film' have a many-to-many relationship so they're connected by a link table 'film_actor'. I've used HibernateTools to create .java and .hbm.xml classes by reverse engineering the DB. I assume the HibernateTools knows what it is doing so I'm assuming that the generated code is correct. And I've successfully implemented .as classes and data-management-config.xml and displayed data. I can click on an actor and display the films that s/he's in. This all works through a single destination that uses my Actor.java class. This uses the 'hierarchical values' approach to managing hierarchical collections, i.e. just using the 'actor' destination. This approach is problematic because there are circular references between Actor and Film objects. It seems to me that the obvious solution is lazy loading. I don't see anything in the docs explaining how to do this with the hierarchical values approach, so I'm attempting to use a 'lazy' managed associations approach. But I get the above error. Someone who knows FDMS might be able to look at my code and fairly easily point me in the right direction. I've zipped up the entire project - plus a .sql file you can use to create my MySQL DB - and put them up for download: http://www.brightworks.com/technology/tech_questions/hibernate_lazy_associations/Bw_005.zip Or, you can just look at the code here: http://www.brightworks.com/technology/tech_questions/hibernate_lazy_associations/code.txt The DB's schema is here: http://www.brightworks.com/technology/tech_questions/hibernate_lazy_associations/index.html And here's a lovely variables view of the circular references I'm trying to avoid :-) : http://www.brightworks.com/technology/tech_questions/hibernate_lazy_associations/deeply_nested_actors_and_films.jpg Help? Douglas
RE: [flexcoders] Chart annotation and panning
Hi Claude. The answer, for now, is to create a custom chart element that does the transformations from data to pixel coordinates to decide where to place a shape. I've posted numerous examples of this recently in this newsgroup and on my blog, at http://www.quietlyscheming.com/. I'm working on a utility that will make this a slightly easier thing to do...stay tuned. Ely. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Claude Hussenet Sent: Monday, November 27, 2006 4:45 PM To: flexcoders@yahoogroups.com Cc: Ely Greenfield Subject: [flexcoders] Chart annotation and panning Is there an easy way to add an annotation to a chart in the local coordinate of the chart ? So,if the min,max of the vertical or horizontal axis is changed,the location of the annotation will be also changed.The type of annotations that I would like to add are instances of the flash.display.shape class. Thank you. Regards Claude Hussenet Everyone is raving about the all-new Yahoo! Mail beta. http://us.rd.yahoo.com/evt=45083/*http://advision.webevents.yahoo.com/m ailbeta
Re: [flexcoders] Flex help on IRC
Great idea Louie! I've been using this channel for about a day now and I'm finding it very useful. I'd definitely encourage everyone on the list to come and participate, or at least lurk. :o) -Andy On 11/27/06, Louie Penaflor [EMAIL PROTECTED] wrote: Hey everyone, For those of you who would like to attempt a different way of getting help, we have started a flex channel on IRC Chat called #flex. It's on efnet. Hope to see you there. Louie
[flexcoders] To Adobe - new release improvements??
Hey Adobe guys, Is it possible for you to address some of the major (or non-major) improvements in the coming Flex release? In particular, I am keen to know if there were significant improvements made to Flexbuilder itself. Stuff like increased compiler performance, ease of use with relative paths, etc would be of interest to me. A close second would be roughly the number of bugs fixed in the actually Flex UI framework. As my project continues to grow, I am definitely getting antsy for a new release! Thanks, -Daniel
[flexcoders] Flex Builder Debugger behavior + Firefox
Is there a way in eclipse to specify the browser to be used without changing the system default browser? When I set my default browser to IE and debug in flex, stopping the debugger closes the IE window that was opened when the debug session started. In Firefox, the tab remains opened (likely from the TabMixPlus plugin to keep everything in 1 single firefox instance), not a huge PITA really.. but would be nice to get the same effect without having to change the tab behaviors I've also found that if I set my default browser to IE then load Flex Builder, then reset default back to Firefox, Flex builder will still debug in IE, so thats my current work around, but if I could hardcode this somewhere that'd be nice Any ideas? Thanks!
[flexcoders] application structure and proper practice
i am in the middle of developing an application with several popup windows that a user can populate and send to a db, i am wondering what the best practice is here in regards to my webservice calls. is it best to keep all of my REQUESTES TIED TO THE WEBSERVICE STORED IN THE PARENT DOCUMENT AND USE FUNCTIONS to interact with the service or should i initate new webservice calls within the pop up window? thanks for any direction on the correct practice to follow
RE: [flexcoders] accordion, load ALL
Well the *easy* answer is to set creationPolicy=all on the accordion. But use this carefully, because there are performance impacts on doing this. Karl From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Yiðit Boyar Sent: Tuesday, November 28, 2006 5:04 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] accordion, load ALL i have an acoordion box, and when sth is clicked inside one canvas, another is opened and a function in the component included in the opened tab is called. but in the first click, because the canvas objects are not preloaded, i cannot call the function... how can i say the accordion component to load all of it's content not only the first tab? Cheap Talk? Check out http://us.rd.yahoo.com/mail_us/taglines/postman8/*http://us.rd.yahoo.com/evt=39663/*http://voice.yahoo.com Yahoo! Messenger's low PC-to-Phone call rates.
[flexcoders] Re: totaling items in datagrid
No one has an answer to this? Or suggestions? --- In flexcoders@yahoogroups.com, nall_daniel [EMAIL PROTECTED] wrote: I am using the CF/Flex Application Wizard to generate a basic form based application. I have a Master datagrid that list all the purchase requests a user has submitted and a Detail form for editing a request or submitting a new request. The detail form has a datagrid as a subform. I pass the mx:model the wizard created of the subform's data to this function: [Bindable] public var purchaseTotal:Number; private function grandTotal(myArray:Array):void { purchaseTotal = 0; var length:int = myArray.length; for (var i:int = 0; i length; i++) { purchaseTotal += Number(myArray[i].Quantity * myArray[i].UnitCost) } } I assign purchaseTotal variable to the text property of a label and run the function on the subform's datagrid.itemFocusOut event. Now when a user is editing a purchase request, the grand total updates when the user changes either the Quantity or the UnitCost. Couple of problems with what I'm doing: 1. No grand total in the label until the user tabs or clicks through the datagrid subform. How can I get my function to run after the mx:model is created and populated with data? 2. New requests never show a grand total. Where's the model's data? My apologies for being so long winded but I wanted to make sure what I was doing is clear. Cheers, Dan
[flexcoders] role based security vs session based security with a servlet container
I am trying to figure out the best way of implementing security authentication. I am using tomcat, and FDS at the moment for remoting. My server side code is obviously in java. A while back, role base security was recommended as the way to implement security. The idea being that if someone did not have the right credentials that they would be prevented from gaining access to the flex app. But my problem with this is that I want to do my authentication UI *in* flex, so I can't prevent people from getting to it before I have had a chance to authenticate. Another problem with the role based stuff is that, as I understand it, roles are maintained by the container. I am not clear how to use my account database (JDBC/Mysql) in this process. What seems easier to me is using sessions, because I can, from any server side function, request the current session of the given user. I can look to see if their session is valid, how long they have been logged on, etc. And using this methodology, I can do login in the flex application, which just sends a login message to the server, the server adds a record to my session record that indicates that I am logged in and when I logged in. This second approach seems like the best approach and the one that gives me the most flexibility. But I am looking for validation regarding my approach here. Am I doing something wrong here? Are there some reasons that the role based security would be better? Any insight from people better versed in security than I am would be greatly appreciated. Hank
RE: [flexcoders] accessing variables through events
i is a local var of the tracePath() method; it can't be accessed outside this method, and it doesn't even exist after tracePath() has finished executing. What you are trying to do is dynamically create N instances of a UIComponent, and when you click one of them, you want to know whether it is the 1st, 2nd, ... one that you created. (Actually, I suspect that what you really want to get when you click is the 'results' data, because otherwise I don't know why you calculated it.) The best way to do this is to write a trivial subclass of UIComponent which can store 'i' and/or 'results' as an instance var of each UIComponent that you create: public class MyComponent extends UIComponent { public class MyComponent() { super(); } public var i:int; public var results:XMLList; } Inside tracePath(), create instances of MyComponent and set 'i' and/or 'results' on each one: var myUIComponent:MyComponent = new MyComponent(); myUIComponent.i = i; myUIComponent.results = results; myUIComponent.graphics... Then inside mouseClickHandler() you can access 'i' and 'results' as event.currentTarget.i and event.currentTarget.results. You can't access them as this.i and this.results because 'this' is always whatever component or application your mx:Script is inside of; it isn't the object that dispatched or listened to the MouseEvent. BTW, you could probably accomplish of all this more easily by using the mx:Repeater tag, but that's another topic. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Tooley Sent: Monday, November 27, 2006 7:46 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] accessing variables through events Quick question regarding accessing variables. I have the following code public function tracePath():void { for (var i:int = 0; i photoFeed.menu.submenu.length(); i++) { trace([EMAIL PROTECTED]) var results:XMLList = [EMAIL PROTECTED]; trace(results); trace (i); var myUIComponent:UIComponent = new UIComponent(); myUIComponent.graphics.beginFill(0xFFCC00); myUIComponent.graphics.drawCircle(60*i, 30, 30); myUIComponent.buttonMode = true; myUIComponent.useHandCursor = true; myUIComponent.addEventListener(MouseEvent.CLICK, mouseClickHandler); this.addChild(myUIComponent); } trace(photoFeed.menu.submenu.length() +hello); } and I access using this function public function mouseClickHandler(event:MouseEvent):void{ trace(this.i); } My question is... how do I access the i variable from within the mouseClickHandler() function so I could find out certain properties. The above code does not seem to find the i based on the dynamically created component. I really want to be able to find out the list collection based on click. Thanks Jeremy
Re: [flexcoders] Re: Hands-on charts
I'm trying out your suggested approach and ran into a conceptual problem. I can get the mouse coordinates and convert them to data on the mouseDown event - but then how do I track the mouse movement, since that uses a different event (mouseMove), and the function I'm working with is already tied to the mouseDown? The movement tracking seems necessary to get the new coordinates. - Tom Ely Greenfield wrote: It depends on just how much data you're trying to show in the chart, but chances are good that it will be very responsive. Ely. *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *tom24569 *Sent:* Monday, November 27, 2006 12:08 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: Hands-on charts Would this happen fast enough that the chart would seem to be responding to the mouse movement? - Tom --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com, Ely Greenfield [EMAIL PROTECTED] wrote: Hi Tom. There's no interative modelling built in, but this should be pretty easy to do: 1) listen for itemMouseDown events. 2) track the mouse position 3) convert the mouse position into data coordinates using the chart.localToData() function. 4) write the new data coordinates into your dataProvider Ely. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com] On Behalf Of Tom Fitzpatrick Sent: Monday, November 27, 2006 6:34 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Hands-on charts Flex charts work beautifully responding to dynamic changes in data. Using the current components, is there any way to use Flex charts to change data? As a conceptual model, I'm thinking of the way parametric equalizers work in some audio programs, where it's possible to drag nodes on a line graph vertically or horizontally to change the parametric data. - Tom
[flexcoders] Re: Flex Builder Debugger behavior + Firefox
Window - Preferences - General - Web Browser HTH, Ben --- In flexcoders@yahoogroups.com, Rick Schmitty [EMAIL PROTECTED] wrote: Is there a way in eclipse to specify the browser to be used without changing the system default browser? When I set my default browser to IE and debug in flex, stopping the debugger closes the IE window that was opened when the debug session started. In Firefox, the tab remains opened (likely from the TabMixPlus plugin to keep everything in 1 single firefox instance), not a huge PITA really.. but would be nice to get the same effect without having to change the tab behaviors I've also found that if I set my default browser to IE then load Flex Builder, then reset default back to Firefox, Flex builder will still debug in IE, so thats my current work around, but if I could hardcode this somewhere that'd be nice Any ideas? Thanks!
Re: [flexcoders] Flex Builder Debugger behavior + Firefox
Ever considered using IE tab in Firefox? It's a free extension you can download and gives you the additional capability of changing your renderer (current tab and window) on top of deploying IE within a mozilla tab (showing the same page of course). --- Rick Schmitty [EMAIL PROTECTED] wrote: Is there a way in eclipse to specify the browser to be used without changing the system default browser? When I set my default browser to IE and debug in flex, stopping the debugger closes the IE window that was opened when the debug session started. In Firefox, the tab remains opened (likely from the TabMixPlus plugin to keep everything in 1 single firefox instance), not a huge PITA really.. but would be nice to get the same effect without having to change the tab behaviors I've also found that if I set my default browser to IE then load Flex Builder, then reset default back to Firefox, Flex builder will still debug in IE, so thats my current work around, but if I could hardcode this somewhere that'd be nice Any ideas? Thanks! Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com
Re: [flexcoders] Re: FLEX.war and PROJECT.war
It may help you to reference a few Ant build files that do this: http://flexapps.cvs.sourceforge.net/flexapps/flexpaint/build.xml?revision=1.1.1.1view=markup http://flexapps.cvs.sourceforge.net/flexapps/census/build.xml?revision=1.9view=markup -James On Tue, 2006-11-28 at 05:22 +, sanjaypmg wrote: Thanks for your quick response... I have tried it but after integrating it when I start my exisiting application, It is failed to load even the first page. I am sure, I am doing some mistakes while making entries in web.xml. Could you please help me out which entries should I make for this integration? I have got the integration with Flex 1.5 from: http://livedocs.macromedia.com/flex/15/flex_docs_en/wwhelp/wwhimpl/co mmon/html/wwhelp.htm?context=Flex_Documentationfile=0903.htm but didnt get for flex 2. Pleease help. Thanks Sanjay --- In flexcoders@yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote: It's usually better to have the WARs combined if you can. Make sure that the web.xml from the flex.war gets integrated correctly. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sanjaypmg Sent: Monday, November 27, 2006 4:51 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] FLEX.war and PROJECT.war Hey.. I have my flex project under Flex.war folder and another java project under Project.war folder. while I am trying to call my mxml file from my java project I am facing an error.. could anyone please help me? Thanks Sanjay
Re: [flexcoders] Flex Builder Debugger behavior + Firefox
Window Preferences General Web Browser regards, Muzak - Original Message - From: Rick Schmitty [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, November 28, 2006 6:35 PM Subject: [flexcoders] Flex Builder Debugger behavior + Firefox Is there a way in eclipse to specify the browser to be used without changing the system default browser? When I set my default browser to IE and debug in flex, stopping the debugger closes the IE window that was opened when the debug session started. In Firefox, the tab remains opened (likely from the TabMixPlus plugin to keep everything in 1 single firefox instance), not a huge PITA really.. but would be nice to get the same effect without having to change the tab behaviors I've also found that if I set my default browser to IE then load Flex Builder, then reset default back to Firefox, Flex builder will still debug in IE, so thats my current work around, but if I could hardcode this somewhere that'd be nice Any ideas? Thanks!
RE: [flexcoders] Re: Hands-on charts
Yup. To do mouse tracking, you generally need a mouse down, mouse move, and mouse up handler. Almost all of my code that does mouse tracking looks like this: someComponent mouseDown=startTracking(event); / private function startTracking(e:MouseEvent):void { // listen to the systemManager so we get mouse move/up events even when the mouse moves outside the component. // listen on capture so we can cancel move/rollover events going to other components. systemManager.addEventListener(MouseEvent.MOUSE_MOVE,track,true); systemManager.addEventListener(MouseEvent.MOUSE_UP,endTracking,true); track(e); } private function track(e:MouseEvent):void { // update your data/UI here. } private function endTracking(e:MouseEvent):void { track(e); // remove the event listeners until we need to track again. systemManager.removeEventListener(MouseEvent.MOUSE_MOVE,track,true); systemManager.removeEventListener(MouseEvent.MOUSE_UP,endTracking,true); } From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tom Fitzpatrick Sent: Tuesday, November 28, 2006 9:37 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Hands-on charts I'm trying out your suggested approach and ran into a conceptual problem. I can get the mouse coordinates and convert them to data on the mouseDown event - but then how do I track the mouse movement, since that uses a different event (mouseMove), and the function I'm working with is already tied to the mouseDown? The movement tracking seems necessary to get the new coordinates. - Tom Ely Greenfield wrote: It depends on just how much data you're trying to show in the chart, but chances are good that it will be very responsive. Ely. -- *From:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] *On Behalf Of *tom24569 *Sent:* Monday, November 27, 2006 12:08 PM *To:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com *Subject:* [flexcoders] Re: Hands-on charts Would this happen fast enough that the chart would seem to be responding to the mouse movement? - Tom --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com, Ely Greenfield [EMAIL PROTECTED] wrote: Hi Tom. There's no interative modelling built in, but this should be pretty easy to do: 1) listen for itemMouseDown events. 2) track the mouse position 3) convert the mouse position into data coordinates using the chart.localToData() function. 4) write the new data coordinates into your dataProvider Ely. 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 Tom Fitzpatrick Sent: Monday, November 27, 2006 6:34 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Hands-on charts Flex charts work beautifully responding to dynamic changes in data. Using the current components, is there any way to use Flex charts to change data? As a conceptual model, I'm thinking of the way parametric equalizers work in some audio programs, where it's possible to drag nodes on a line graph vertically or horizontally to change the parametric data. - Tom
Re: [flexcoders] To Adobe - new release improvements??
Im not from Adobe but thanks to Matt CHotin, I have been given the oppportunity to play with the prerelease 2.01 update... They say it's not a major release but for me, the inclusion of the mx:module support/framework is one big help... think of the capability of 'breaking apart' your big apps into modular ones which the user will only have to download once on demand - all that while having the framework take care of most of the communication between the modules and the shell application or other modules. On top of that, you can still leverage on using RSL's, externs, fzip and any other file size/download time management methods adn tehcniques. And oh yeah, they have several bugs fixed already. Again thans Matt. Id' say but Numberous bugs have been fixed --- Daniel Wabyick [EMAIL PROTECTED] wrote: Hey Adobe guys, Is it possible for you to address some of the major (or non-major) improvements in the coming Flex release? In particular, I am keen to know if there were significant improvements made to Flexbuilder itself. Stuff like increased compiler performance, ease of use with relative paths, etc would be of interest to me. A close second would be roughly the number of bugs fixed in the actually Flex UI framework. As my project continues to grow, I am definitely getting antsy for a new release! Thanks, -Daniel Cheap talk? Check out Yahoo! Messenger's low PC-to-Phone call rates. http://voice.yahoo.com
[flexcoders] Vertical Scroll bar not showing up
Hi, I am placing titlewindow's in a manner which beyond screen coordinates, however, scrollbars are not showing. I have the scrollbar set to auto but its still not showing.. where to? Thanks in advance.
[flexcoders] Managing server-side exceptions when not using flex proxy
Any C#/.NET user, any advice on catching and showing user-friendly messages when a FaultEvent rises on a Webservice call, being those coded in C#? The only message i get is Unable to connect to endpoint ... Thanks in advance! Pablo Gustavo Apanasionek
Re: [flexcoders] many-to-many managed association in Hibernate destination
I'm not currently using Flex, but I don't believe it's possible to map ActionScript classes to lazily-loaded Hibernate classes because of all the hibernate proxy stuff. I was under the impression that you have to use DTOs, rather than mapping your client classes to your domain objects. Am I wrong? - Richard On 11/28/06, Douglas McCarroll [EMAIL PROTECTED] wrote: Hi All, This is essentially a repost of my How to implement Lazy Hibernate? question. I'm still completely stuck. Here's the error message I'm getting: [RPC Fault faultString=Page request made for item with id = '{filmId=null}'. The item was not in the cache and the adapter's get method failed to return the item for destination = film.hibernate that is expected to be in the requested page. faultCode=Server.Processing faultDetail=null] Here's the big picture: I'm attempting to create a Cairngorm/FDMS/Hibernate/MySQL example program. I have three tables. 'actor' and 'film' have a many-to-many relationship so they're connected by a link table 'film_actor'. I've used HibernateTools to create .java and .hbm.xml classes by reverse engineering the DB. I assume the HibernateTools knows what it is doing so I'm assuming that the generated code is correct. And I've successfully implemented .as classes and data-management-config.xml and displayed data. I can click on an actor and display the films that s/he's in. This all works through a single destination that uses my Actor.java class. This uses the 'hierarchical values' approach to managing hierarchical collections, i.e. just using the 'actor' destination. This approach is problematic because there are circular references between Actor and Film objects. It seems to me that the obvious solution is lazy loading. I don't see anything in the docs explaining how to do this with the hierarchical values approach, so I'm attempting to use a 'lazy' managed associations approach. But I get the above error. Someone who knows FDMS might be able to look at my code and fairly easily point me in the right direction. I've zipped up the entire project - plus a .sql file you can use to create my MySQL DB - and put them up for download: http://www.brightworks.com/technology/tech_questions/hibernate_lazy_associations/Bw_005.zip Or, you can just look at the code here: http://www.brightworks.com/technology/tech_questions/hibernate_lazy_associations/code.txt The DB's schema is here: http://www.brightworks.com/technology/tech_questions/hibernate_lazy_associations/index.html And here's a lovely variables view of the circular references I'm trying to avoid :-) : http://www.brightworks.com/technology/tech_questions/hibernate_lazy_associations/deeply_nested_actors_and_films.jpg Help? Douglas
[flexcoders] Webservices fault message when not using proxy
I've checked the livedocs regarding fault events on WebService calls, but I haven't found anything regarding this: When not using the proxy (useProxy=false), the fault message raised by the server seem to be choked by a black hole while returning to the SWF file, making it impossible to show a friendly message to the user if an exception (whether system or business) comes up in the middle. I've debugged the request/response and the error is coming back correctly, but the SWF seems to dismiss it. This doesn't happen when using the proxy. Did I miss any docs or something? TIA, -Pablo Gustavo Apanasionek
[flexcoders] Re: totaling items in datagrid
a labelfunction will do the calculations as you tab through the fields or as change rows on the grid. I use this to do some calculations and it works great. private function calcAdjAmount(item:Object,column:DataGridColumn):String { var adjustedAmt:Number; var emptyField:String = ; if (item['Num_Cases_Claimed'] != null) { adjustedAmt = item['Num_Cases_Claimed'] * Number(removeFormatting.format(item['Net_Promo_Amt'])); return basicCurrencyFormat.format(adjustedAmt.toString()); } else { return emptyField; } } Ben --- In flexcoders@yahoogroups.com, nall_daniel [EMAIL PROTECTED] wrote: No one has an answer to this? Or suggestions? --- In flexcoders@yahoogroups.com, nall_daniel daniel.nall.ctr@ wrote: I am using the CF/Flex Application Wizard to generate a basic form based application. I have a Master datagrid that list all the purchase requests a user has submitted and a Detail form for editing a request or submitting a new request. The detail form has a datagrid as a subform. I pass the mx:model the wizard created of the subform's data to this function: [Bindable] public var purchaseTotal:Number; private function grandTotal(myArray:Array):void { purchaseTotal = 0; var length:int = myArray.length; for (var i:int = 0; i length; i++) { purchaseTotal += Number(myArray[i].Quantity * myArray[i].UnitCost) } } I assign purchaseTotal variable to the text property of a label and run the function on the subform's datagrid.itemFocusOut event. Now when a user is editing a purchase request, the grand total updates when the user changes either the Quantity or the UnitCost. Couple of problems with what I'm doing: 1. No grand total in the label until the user tabs or clicks through the datagrid subform. How can I get my function to run after the mx:model is created and populated with data? 2. New requests never show a grand total. Where's the model's data? My apologies for being so long winded but I wanted to make sure what I was doing is clear. Cheers, Dan
RE: [flexcoders] Flex 2 Charting dynamic backgroundElements
You mean it's in front of the gridlines? The gridlines that appear in charts by default is really just another backgroundElement. by default, each chart creates a single instance of the mx.charts.GridLines class, and inserts it into the backgroundElements array. If you set your own background elements, you end up overriding the default. But if you still want Gridlines, you can explicitly create your own gridlines instance in the backgroundElements: ColumnChart backgroundElements MyCustomBackgroundElement / Gridlines ... / /backgroundElements ... You can put it in front or behind your other background elements by changing the order in the array (i.e., in the MXML). Ely. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sönke Rohde Sent: Tuesday, November 28, 2006 12:09 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Flex 2 Charting dynamic backgroundElements Hi Ely, thank you for your detailed answer and the code examples. This was not exactly what I am looking for but gave me the hints to solve my problem. The key is that your backgroundElement extends ChartingElement. But now I have got the problem that the backgroundElement is in front of the PlotChart lines. How can I swap them? Again thanks a lot, Sönke From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ely Greenfield Sent: Monday, November 20, 2006 7:15 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Flex 2 Charting dynamic backgroundElements Hi Sonke (sorry, can't figure out how to type an umlaud (sp?) on an American keyboard ): It sounds like your problem is a prime candidate for a custom background element. If your shapes depend on the min max of the axes, that probably means you want to annotate/illustrate a particular data value/range, yes? Any time you're trying to draw data values, you should really be creating a chart element (that's pretty much what they're there for). That means a series, a backgroundElement, or an annotationElement. I've attached a simple example of a custom background element that takes a series of data values and draws matching bands in the background. It should give you a starting point for what you're trying to do. Ely. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Sönke Rohde Sent: Sunday, November 19, 2006 6:43 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex 2 Charting dynamic backgroundElements Hi, I have to draw shapes and lines into the background of a Plotchart. The size/position of the shapes and lines depends on the minimum and maximum of the horizontal and vertical linear axis. My first try was to use the backgroundElements to solve this problem. I created a shape, drawed a polygon on it and added it to the backgroundElements: var shape:Shape = new Shape(); var gr:Graphics = shape.graphics; gr.moveTo(0, 20); gr.beginFill(0xFF9900, 50); gr.lineTo(0, 0); gr.lineTo(100, 0); gr.lineTo(100, 100); gr.lineTo(0, 20); gr.endFill(); backgroundElements.reverse(); backgroundElements.push( shape ); I reversed the array to keep the GridLines in the front. The polygon is visible in the background but it is scaled to fit the size of the PlotChart. The shape has to keep its scaling. How do I know the width/height of the PlotChart content area? With this information and the min/max of the x/y axis I am able to do the drawing. Any hint is very appreciated. Cheers, Sönke
[flexcoders] Webservices fault message when not using proxy
I've checked the livedocs regarding fault events on WebService calls, but I haven't found anything regarding this: When not using the proxy (useProxy=false), the fault message raised by the server seem to be choked by a black hole while returning to the SWF file, making it impossible to show a friendly message to the user if an exception (whether system or business) comes up in the middle. I've debugged the request/response and the error is coming back correctly, but the SWF seems to dismiss it. This doesn't happen when using the proxy. Did I miss any docs or something? TIA, -Pablo Gustavo Apanasionek
[flexcoders] WebService in Firefox not working properly
Im using a very simple Cairngorm example found in Internet. I attached it to a Web Service that I generated in Java (which is working perfectly) Surprisingly when I run my application in Firefox, it just doesn't work but in Internet Explorer works just fine. The error Im getting is the following: TypeError: Error #1009: No se puede acceder a una propiedad o a un método de una referencia a un objeto nulo. at com.adobe.cairngorm.samples.addcontact.business::Services/__addcontactService_fault() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractService/dispatchEvent() at mx.rpc.soap.mxml::WebService/dispatchEvent() at mx.rpc.soap::WebService/http://www.adobe.com/2006/flex/mx/internal::wsdlFaultHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc.soap::WSDLParser/dispatchEvent() at mx.rpc.soap::WSDLParser/::dispatchFault() at mx.rpc.soap::WSDLParser/http://www.adobe.com/2006/flex/mx/internal::httpFaultHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler() at mx.rpc::Responder/fault() at mx.rpc::AsyncRequest/fault() at ::DirectHTTPMessageResponder/securityErrorHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/flash.net:URLLoader::redirectEvent() I really need some opinions on this issue. If anyone needs the code please mail me and I'll be glad to send it back. Thanks in advance.
Re: [flexcoders] Flex Builder Debugger behavior + Firefox
under preferences - general - web browser you can choose which to launch in. On 11/28/06, Rick Schmitty [EMAIL PROTECTED] wrote: Is there a way in eclipse to specify the browser to be used without changing the system default browser? When I set my default browser to IE and debug in flex, stopping the debugger closes the IE window that was opened when the debug session started. In Firefox, the tab remains opened (likely from the TabMixPlus plugin to keep everything in 1 single firefox instance), not a huge PITA really.. but would be nice to get the same effect without having to change the tab behaviors I've also found that if I set my default browser to IE then load Flex Builder, then reset default back to Firefox, Flex builder will still debug in IE, so thats my current work around, but if I could hardcode this somewhere that'd be nice Any ideas? Thanks!
RE: [flexcoders] Webservices fault message when not using proxy
That's correct. This is a well known issue. The problem is that certain browser won't allow the plugin to access the returned content when the http status code is 500 - a requirement for web service faults. You can work around this by suppressing the 500 and changing it to a 200. What are your web services implemented in? If Java, I can send some classes and web.xml config to work around this changing the http status code to 200 only when invoked by the flash player. Carson Carson Hager Cynergy Systems, Inc. http://www.cynergysystems.com http://www.cynergysystems.com/ Email: [EMAIL PROTECTED] Office: 866-CYNERGY Mobile: 1.703.489.6466 From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Pablo Apanasionek Sent: Friday, November 10, 2006 7:56 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Webservices fault message when not using proxy I've checked the livedocs regarding fault events on WebService calls, but I haven't found anything regarding this: When not using the proxy (useProxy=false), the fault message raised by the server seem to be choked by a black hole while returning to the SWF file, making it impossible to show a friendly message to the user if an exception (whether system or business) comes up in the middle. I've debugged the request/response and the error is coming back correctly, but the SWF seems to dismiss it. This doesn't happen when using the proxy. Did I miss any docs or something? TIA, -Pablo Gustavo Apanasionek
[flexcoders] FDS - possible bug???
Hello, everyone I am using FDS Java Adapter and Assembler approach. I am currently in the process of making fill() methods more smart and started playing with autoRefreshFill() and refreshFill() methods. I have discovered the following issue Looks like autoRefreshFill() not being executed. @Override public boolean autoRefreshFill(List params) { System.out.println( auto refresh fill: + params); return super.autoRefreshFill(params); } refreshFill(List params, Object item, boolean isCreate) { int res; ... System.out.println(refresh fill: + params); return res; } The above snippet generates no output in regards to autoRefreshFill to the console whenever I add/remove/update items to the DS while refresh fill messages do show up. Therefore I can conclude that my implementation of autoRefreshFill is never called. Am I missing something?
RE: [flexcoders] WebService in Firefox not working properly
Start by determining which line of your code is attempting to access the null object, and then which object that is. We could guess at what is different between IE and FF, but that's all. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Sent: Tuesday, November 28, 2006 2:30 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] WebService in Firefox not working properly Im using a very simple Cairngorm example found in Internet. I attached it to a Web Service that I generated in Java (which is working perfectly) Surprisingly when I run my application in Firefox, it just doesn't work but in Internet Explorer works just fine. The error Im getting is the following: TypeError: Error #1009: No se puede acceder a una propiedad o a un método de una referencia a un objeto nulo. at com.adobe.cairngorm.samples.addcontact.business::Services/__addcontactService_fault() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractService/dispatchEvent() at mx.rpc.soap.mxml::WebService/dispatchEvent() at mx.rpc.soap::WebService/http://www.adobe.com/2006/flex/mx/internal::wsdlFaultHandler http://www.adobe.com/2006/flex/mx/internal::wsdlFaultHandler () at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc.soap::WSDLParser/dispatchEvent() at mx.rpc.soap::WSDLParser/::dispatchFault() at mx.rpc.soap::WSDLParser/http://www.adobe.com/2006/flex/mx/internal::httpFaultHandler http://www.adobe.com/2006/flex/mx/internal::httpFaultHandler () at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent () at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler http://www.adobe.com/2006/flex/mx/internal::faultHandler () at mx.rpc::Responder/fault() at mx.rpc::AsyncRequest/fault() at ::DirectHTTPMessageResponder/securityErrorHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/flash.net:URLLoader::redirectEvent() I really need some opinions on this issue. If anyone needs the code please mail me and I'll be glad to send it back. Thanks in advance.
[flexcoders] Re: Hands-on charts
Tom, I'm not sure if you are stuck on using charts to do this, but I think I accomplished a similar effect to what you want a while back by using the graphics package to draw a rectangle around a slider. I listened for slider events and would then clear and re-run the drawRect on each move. It was very little code and the effect was quite seamless. -Mark --- In flexcoders@yahoogroups.com, Ely Greenfield [EMAIL PROTECTED] wrote: Yup. To do mouse tracking, you generally need a mouse down, mouse move, and mouse up handler. Almost all of my code that does mouse tracking looks like this: someComponent mouseDown=startTracking(event); / private function startTracking(e:MouseEvent):void { // listen to the systemManager so we get mouse move/up events even when the mouse moves outside the component. // listen on capture so we can cancel move/rollover events going to other components. systemManager.addEventListener(MouseEvent.MOUSE_MOVE,track,true); systemManager.addEventListener(MouseEvent.MOUSE_UP,endTracking,true); track(e); } private function track(e:MouseEvent):void { // update your data/UI here. } private function endTracking(e:MouseEvent):void { track(e); // remove the event listeners until we need to track again. systemManager.removeEventListener(MouseEvent.MOUSE_MOVE,track,true); systemManager.removeEventListener(MouseEvent.MOUSE_UP,endTracking,true); } From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tom Fitzpatrick Sent: Tuesday, November 28, 2006 9:37 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Hands-on charts I'm trying out your suggested approach and ran into a conceptual problem. I can get the mouse coordinates and convert them to data on the mouseDown event - but then how do I track the mouse movement, since that uses a different event (mouseMove), and the function I'm working with is already tied to the mouseDown? The movement tracking seems necessary to get the new coordinates. - Tom Ely Greenfield wrote: It depends on just how much data you're trying to show in the chart, but chances are good that it will be very responsive. Ely. -- *From:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] *On Behalf Of *tom24569 *Sent:* Monday, November 27, 2006 12:08 PM *To:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com *Subject:* [flexcoders] Re: Hands-on charts Would this happen fast enough that the chart would seem to be responding to the mouse movement? - Tom --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com, Ely Greenfield egreenfi@ wrote: Hi Tom. There's no interative modelling built in, but this should be pretty easy to do: 1) listen for itemMouseDown events. 2) track the mouse position 3) convert the mouse position into data coordinates using the chart.localToData() function. 4) write the new data coordinates into your dataProvider Ely. 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 Tom Fitzpatrick Sent: Monday, November 27, 2006 6:34 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Hands-on charts Flex charts work beautifully responding to dynamic changes in data. Using the current components, is there any way to use Flex charts to change data? As a conceptual model, I'm thinking of the way parametric equalizers work in some audio programs, where it's possible to drag nodes on a line graph vertically or horizontally to change the parametric data. - Tom
[flexcoders] Populating Form with Many-to-Many Relationship Data?
Hi all, I'm pretty sure that any answers for this one will help a lot of people, since the basis of it crosses many complex business applications. I have existing CF apps (Purchase Requests, Travel Requests, Request Approvals, etc.) that contain many-to-many relationships, such as PR Number Charge Strings Item/Costs, wherein the PR contains one or more charge strings, and each charge string can have one or more items. I am prototyping Flex versions, but I have come across a little (ha) bit of a situation where I am not sure of the best method to proceed. I have a actionscript form for creating a _new_ request, allowing the user to add charge strings and associated items dynamically (stripped version included below in case someone needs/wants to see how I did this). Textually, a request being updated might look like this: Request 1001 Charge String 1: CS: (combobox) Item 1: Type (combobox) Cost (Number)...etc. Item 2: Type (combobox) Cost (Number)...etc. Item 3: Type (combobox) Cost (Number)...etc. Charge String 2: (combobox) Item 1: Type (combobox) Cost (Number)...etc. Item 2: Type (combobox) Cost (Number)...etc. Charge String 3: (combobox) Item 1: Type (combobox) Cost (Number)...etc. Note that Charge Strings and Items have unique IDs and there is a relation between items and charge strings as well as items and the request. However, a request also has to be available for updates, since they can remain in draft status before being submitted for approvals. The situation is this: Because of the possible many-to-many relationship between charge strings and related items within a request, I'm not quite sure of the best method of populating the form for updates. Additionally, the user may add, remove or update items or an existing charge string, and add new charge strings with new items In CF, I only have to make 1 query to get the primary data I need, and I can do a nested loop to create the form easily by checking for a change in the charge string to know when to display the CS combobox and when to display it's associated items. On update, we archive the old charge string and item data and insert new rows into SQL Server, rather than trying to determine which charge strings and/or items were updated. This is for processing speed and the ability to recreate a request at any point in time (using version numbers), the latter being necessary for auditing the approval/rejection history of a request. I am not sure if looping is the best method to use in Flex -- particularly since the containers are dynamic out of necessity -- nor am I positive about the manner in which I should do this, in particular the data population/combobox selected items. (Btw, I started doing this with components, but actionscript was faster for me to get it to work...I'll end up going back to that just for code reuse but I like to see things work first :-) - charge string with estimated cost items code module (improvements or hints appreciated as well) - ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=addCS(); mx:Script ![CDATA[ import mx.controls.Alert; import mx.controls.TextInput; import mx.containers.HBox; import mx.controls.ComboBox; import flash.events.Event; import flash.events.MouseEvent; import mx.collections.ArrayCollection; import mx.utils.ArrayUtil; //sample data for charge string combobox; would normally come from an RO call [Bindable] public var CSCollection:ArrayCollection = new ArrayCollection([{csUID: 1000, label: CS1000},{csUID: 1001, label: CS1001},{csUID: 1002, label: CS1002}]); //sample data for estimate type combobox; would normally come from an RO call [Bindable] public var ETCollection:ArrayCollection = new ArrayCollection([{etUID: 1000, label: 'Airfare'},{etUID: 1001, label: 'Meals'},{etUID: 1002, label: 'Other'}]); public function addCS():void{ var newVBox:VBox = new VBox(); newVBox.setStyle( borderColor, #00 ); newVBox.setStyle( borderStyle, solid ); newVBox.setStyle(paddingBottom, 5); newVBox.setStyle(paddingRight, 5); newVBox.setStyle(paddingLeft, 5); newVBox.setStyle(paddingTop, 5); newVBox.percentWidth = 100; var newCS:ComboBox = new ComboBox(); newCS.percentWidth = 100; newCS.dataProvider = CSCollection; var csCloseBtn:Button = new Button(); var csAddEstBtn:Button = new Button(); csCloseBtn.label = Delete this Charge String and Associated Estimates; csCloseBtn.addEventListener(MouseEvent.CLICK,csCloseBtnClickListener); csAddEstBtn.label = Add Another Estimate to this Charge String; csAddEstBtn.addEventListener(MouseEvent.CLICK,csAddEstBtnClickListener); var newbtnHbox3:HBox = new HBox(); newbtnHbox3.addChild(newCS);
Re: [flexcoders] Problems with a DateField as an itemRenderer/editor
Is onItemEnd a custom event listener? or do you mean onItemEditEnd? I dont recall having an 'onItemEnd' associated with Datagrid listener in any way.. please correct me if im wrong. When you use a datefield as item renderer or item editor a list control (or any drop-in item renderer/item editor), make sure that the data provider of that list control has a field of type Date (or the expected data type of the drop-in item renderer you used). Since Data Grid is derived from List base, this means it applies to it as well. Have you considered that? --- Louie Penaflor [EMAIL PROTECTED] wrote: I'm having an issue with DataGridEvent (onItemEnd) and the DateField class. Basically, I've developed a framework that uses onItemEnd from the datagrid. I have components like the combobox for example... onChange calls onItemEnd which takes the data of the combobox and puts it in the dataField of the datagrid, then makes a service call to update to the database. I've gotten this to work great with many components but the dateField I'm having a horrible time with. when I dispatchEvent (onitemend) for example, I use event.currentTarget.editedItemRenderer to get the value from event.target.itemEditorInstance. Which both don't exist when I dispatchEvent from the calendar select date (onClose) event handler. This works when I have the dateField as an Editor only and using the default renderer. This is an issue becuase it creates another click for the user. I think the root of my problem is that when you click on the datefield to open the calendar, it doesn't invoke it as an editor in the datagrid. Is there a way to force this? Any help would be appreciated. Thanks in advance. Louie Penaflor Web Software Developer World Council of Credit Unions, Inc. Ph: (608)231-7932 This is a transmission from World Council of Credit Unions, Inc. and contains information that is confidential. If you are not the intended addressee or authorized to receive for the addressee, then any disclosure, copying, distribution, or use of the contents of this message is prohibited. If you have received this transmission in error, please destroy it and notify the sender immediately at the transmitting e-mail address. If you are the intended recipient, please be advised that this e-mail transmission is not encrypted or otherwise protected from potential misappropriation or misuse. World Council of Credit Unions, Inc. expressly disclaims any and all liability for harm resulting from the misappropriation, interception or misuse of the information contained in this transmission. Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com
[flexcoders] Re: Binding to a custom method: possible?
Anyone? --- In flexcoders@yahoogroups.com, ben.clinkinbeard [EMAIL PROTECTED] wrote: There was a similar question asked here recently but my needs are different so I am starting a new thread. My needs are as follows: I have a ComboBox whose enabled state needs to be determined by several factors, thus the need for a custom method. The problem is that this doesn't seem to work, no matter how I try it. Am I missing something or is this just not possible (meaning I have to set a property and bind to that)? Fake sample code below: [Bindable] private function isEnabled():Boolean { if(conditionA) { if(conditionB) { return true; } else { return false; } } } mx:ComboBox id=cb enabled={isEnabled()}/ Thanks, Ben
[flexcoders] ItemRenderer implemented as ActionScript class
Does anyone have an example of ItemRenderer implemented as an ActionScript class instead of mxml component. I would like to change dynamically the structure of rendered items based on the data property. Reagrds, Dusan
Re: [flexcoders] Binding to a custom method: possible?
In this case, your function is not referencing anything Bindable. Something like this may work, but please clarify - if this is not what you're looking for: [Bindable] private var bindableProp:String; private function isEnabled( s:String ):Boolean { ... } mx:ComboBox id=cb enabled={isEnabled( bindableProp )}/ On 11/28/06, ben.clinkinbeard [EMAIL PROTECTED] wrote: There was a similar question asked here recently but my needs are different so I am starting a new thread. My needs are as follows: I have a ComboBox whose enabled state needs to be determined by several factors, thus the need for a custom method. The problem is that this doesn't seem to work, no matter how I try it. Am I missing something or is this just not possible (meaning I have to set a property and bind to that)? Fake sample code below: [Bindable] private function isEnabled():Boolean { if(conditionA) { if(conditionB) { return true; } else { return false; } } } mx:ComboBox id=cb enabled={isEnabled()}/ Thanks, Ben -- : : ) Scott
RE: [flexcoders] Re: Binding to a custom method: possible?
I had a similar problem and while somewhat unrelated this may help. I wanted to set an image inside an itemRenderer (for a Listbox) depending on the data for the current row. I came up with this, thanks to Tink for the idea: ?xml version=1.0 encoding=utf-8? mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml; height=22 horizontalAlign=left verticalAlign=middle horizontalScrollPolicy=off verticalScrollPolicy=off mx:Script ![CDATA[ [Bindable] private var _data:Object; [Bindable] private var _imgIcon:String; [Bindable] override public function get data():Object { return _data; } override public function set data( value:Object ):void { if (value) _data = value; if (_data.gender == male) { _imgIcon = assets/male.png; } else { _imgIcon = assets/female.png; } } ]] /mx:Script mx:Image source={_imgIcon} / mx:Text text={_data.username} selectable=false fontSize=13 fontWeight=bold/ mx:Spacer width=100% height=100%/ /mx:HBox Basically I overwrote the setter and getter for data (the data object is what the itemRenderer feeds off). Combobox is list based so this approach should work for you. Stefan _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of ben.clinkinbeard Sent: 28 November 2006 20:30 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Binding to a custom method: possible? Anyone? --- In [EMAIL PROTECTED] mailto:flexcoders%40yahoogroups.com ups.com, ben.clinkinbeard [EMAIL PROTECTED] wrote: There was a similar question asked here recently but my needs are different so I am starting a new thread. My needs are as follows: I have a ComboBox whose enabled state needs to be determined by several factors, thus the need for a custom method. The problem is that this doesn't seem to work, no matter how I try it. Am I missing something or is this just not possible (meaning I have to set a property and bind to that)? Fake sample code below: [Bindable] private function isEnabled():Boolean { if(conditionA) { if(conditionB) { return true; } else { return false; } } } mx:ComboBox id=cb enabled={isEnabled()}/ Thanks, Ben
[flexcoders] Re: waiting for the debugger
You say it sometimes does that? Hmm. I don't know what's happening in your specific case, but I can tell you, in general, how Flex Builder connects to the debugger. When you click Debug, Flex Builder launches your browser, pointing it at the HTML wrapper for the debug version of the app, e.g. C:\MyProject\bin\MyApp-debug.html. Flex Builder then starts listening on a socket, waiting for the Flash Player to contact it. FB waits for two minutes, after which it times out. In your browser, if the debug version of the Flash player is installed, and a debuggable movie (e.g. MyApp-debug.swf) is loaded into it, then the flash player will attempt to connect to the same localhost socket that Flex Builder is listening on. If the flash player can't find something to connect to at that socket, it displays the Where is the debugger dialog. Things that can go wrong: - You might not have the debug version of the Flash player installed. However, please note that before Flex Builder launches your browser, it checks to see what Flash player is installed in your browser. If it's the release version, it warns you. - You might be pointing to a release swf, not a debug swf. Again, Flex Builder warns you about that; but the check for a debug swf is not foolproof, especially if you have customized the html template, or are launching a custom URL. Double-check to make sure the swf you opening is the *-debug one. - Maybe you have some sort of firewall installed that is blocking Flash from connecting to Flex Builder. I did hear one report once of that happening to someone; I think that person was using Zone Alarm. Try opening access to port 7935. --- In flexcoders@yahoogroups.com, Diego Guebel [EMAIL PROTECTED] wrote: Hi there, I'm just wondering why when I try to debug my app sometimes it takes a while trying to reach to debug player, saying: waiting for flash player to connect to debugger and then it fires a timeout. I have the debug player installed, I tried installing it again. But it still can reach the debug player. Any clue? is there any method to address the debug to the debug location? Just in case, I'm using eclipse 3.2 Thanks, Diego.
[flexcoders] Re: Binding to a custom method: possible?
Hi Ben, Have you tried a getter function? [Bindable] private function get isEnabled() : Boolean { ... } mx:ComboBox id=cb enabled={isEnabled}/ --- In flexcoders@yahoogroups.com, ben.clinkinbeard [EMAIL PROTECTED] wrote: Anyone? --- In flexcoders@yahoogroups.com, ben.clinkinbeard ben.clinkinbeard@ wrote: There was a similar question asked here recently but my needs are different so I am starting a new thread. My needs are as follows: I have a ComboBox whose enabled state needs to be determined by several factors, thus the need for a custom method. The problem is that this doesn't seem to work, no matter how I try it. Am I missing something or is this just not possible (meaning I have to set a property and bind to that)? Fake sample code below: [Bindable] private function isEnabled():Boolean { if(conditionA) { if(conditionB) { return true; } else { return false; } } } mx:ComboBox id=cb enabled={isEnabled()}/ Thanks, Ben
[flexcoders] Built-in way to determine the number of XML elements
I'm trying to see if a response from the server is empty. So, in one case I end up with: root matches/ /root And in the other, I get: root matches match ... / /matches /root Using this fancy E4X, how do I test for the different conditions? I always seem to be getting back an XMLList, be it empty or not. I can't imagine I have to iterate this and check that it's zero at the end, but length doesn't do it, and I can't check for null because I'm always getting an XMLList. Thanks, -DT
[flexcoders] Re: Text instance does not calculate its height properly when in scrollable Box
Any suggestions?.. On 11/27/06, Sergey Kovalyov [EMAIL PROTECTED] wrote: Hi All! When Text instance is in scrollable Box and user scrolls vertical scrollbar to the bottommost position, bottom edge of the Text remains invisible (cut by mask). How to fix it? Look at the example below that reproduces this behavior: ?xml version=1.0? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% horizontalAlign=center verticalAlign=middle mx:Box width=300 height=300 mx:Text width=100% condenseWhite=true mx:htmlText ![CDATA[ pLorem ipsum dolor sit amet, consectetuer adipiscing elit. Ut facilisis adipiscing lectus. Nam placerat. Sed sodales, erat vitae commodo malesuada, erat erat ultrices erat, eu eleifend risus magna quis nulla. Sed elementum tempor sem. Donec gravida aliquet tellus. Aenean vel sapien. Maecenas ullamcorper urna ut neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nunc nisl lectus, condimentum non, rutrum eu, dapibus vel, turpis. Sed lacus quam, aliquam ac, mattis at, scelerisque sed, odio. Curabitur arcu ipsum, bibendum eget, porta non, aliquam lobortis, felis. Nulla eget velit et urna pulvinar cursus. Morbi ornare./pbr / pFusce porta ultrices magna. Morbi et mauris. Mauris vel felis. Vestibulum tortor lectus, fermentum sit amet, tempus a, dapibus eu, sem. Proin id nulla eu odio lobortis dictum. Sed faucibus facilisis massa. Quisque blandit posuere eros. Mauris tempus erat vel quam. Nulla purus nulla, imperdiet ut, tincidunt id, pharetra in, pede. Proin luctus diam sed erat. Vivamus mi. Morbi sodales libero vel tortor. Integer et dolor. Praesent semper facilisis orci./pbr / pCurabitur vel augue. Nunc ac odio sed justo convallis cursus. Morbi eget sapien. Vestibulum euismod, lacus auctor ultrices volutpat, sem pede hendrerit enim, non condimentum lectus lorem quis risus. Vivamus dictum iaculis sem. Quisque vel nibh. Ut nisl dolor, fringilla quis, commodo vel, iaculis quis, ligula. Aenean eleifend. Duis vitae quam non massa malesuada bibendum. Integer a urna. Suspendisse fringilla sapien sit amet tellus. Vestibulum condimentum auctor nisl./pbr / pAenean cursus pellentesque nibh. Phasellus fermentum, pede quis molestie sagittis, lectus orci bibendum odio, eu ullamcorper velit eros id urna. In feugiat, ante sit amet molestie ultricies, massa elit iaculis dolor, porttitor cursus mauris lorem luctus diam. Ut eu felis. Etiam quis metus. Nullam tincidunt justo. Maecenas id tellus sit amet risus tempor vulputate. Morbi mauris enim, nonummy quis, laoreet at, adipiscing sit amet, justo. Cras tincidunt dignissim sem. Fusce ultrices tellus sit amet elit. Vivamus blandit velit vel mi. Curabitur tellus. Vestibulum mattis, dolor vel commodo condimentum, diam nunc venenatis ligula, ac lobortis ipsum sem a lectus. Curabitur eu lorem eu dui egestas accumsan. Vestibulum dignissim pede nec ipsum. Etiam quis risus nec tortor ornare pretium. Nulla ipsum felis, sagittis in, aliquam ut, tempor in, ante. Mauris tempor turpis eget urna. Phasellus urna nulla, blandit id, ultrices non, viverra at, ante./pbr / pProin feugiat dui interdum urna. Nulla vel sem sit amet velit imperdiet euismod. Aenean nunc. Maecenas posuere. Donec elit augue, sodales et, vulputate fermentum, venenatis eu, purus. Aenean risus. Integer feugiat. Nam volutpat urna vitae diam. In turpis magna, malesuada a, cursus eu, facilisis at, augue. Fusce rhoncus commodo augue. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nam in odio. Quisque eget est. Donec congue justo a dui./p ]] /mx:htmlText /mx:Text /mx:Box /mx:Application Sergey.
RE: [flexcoders] EventDispatching Listening
I believe only DisplayObjects have a bubbling phase. Does you component extend Sprite or UIComponent? -Stace From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of patricklemiuex Sent: Monday, November 27, 2006 7:05 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] EventDispatching Listening I'm using bubbling, or at least i think i am to capture an event... I've extended the event class to make my own event mechanism. the events are being dispatched, however the problem is, that I'm adding an event listener to my custom mxml component to receive the events and nothing happens. I've probably got something backwards... Doesn't bubbling set to true allow the event to be captured by any component in the order that they are created? my code is as follows: var evt:MeEvent = new MeEvent(MeEvent.REMOTE,true); dispatchEvent(evt); --- package com.me { import flash.events.Event; public class MeEvent extends Event { public static const REMOTE:String = remote; public var realTarget:*; public function MeEvent(type:String, bubbles:Boolean=true, cancelable:Boolean=false) { super(type, bubbles, cancelable); } } } -- And inside my custom component this is the event listener. private function init():void{ this.addEventListener(MeEvent.REMOTE, handleEvent); } Thanks for your time, Patrick
Re: [flexcoders] WebService in Firefox not working properly
You may want to check which point versions of the Flash Player you are running. It appears the latest for Firefox is 9,0,28. Its a longshot, but worth checking. Cheers, -D Daniel wrote: Im using a very simple Cairngorm example found in Internet. I attached it to a Web Service that I generated in Java (which is working perfectly) Surprisingly when I run my application in Firefox, it just doesn't work but in Internet Explorer works just fine. The error Im getting is the following: TypeError: Error #1009: No se puede acceder a una propiedad o a un método de una referencia a un objeto nulo. at com.adobe.cairngorm.samples.addcontact.business::Services/__addcontactService_fault() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractService/dispatchEvent() at mx.rpc.soap.mxml::WebService/dispatchEvent() at mx.rpc.soap::WebService/http://www.adobe.com/2006/flex/mx/internal::wsdlFaultHandler http://www.adobe.com/2006/flex/mx/internal::wsdlFaultHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc.soap::WSDLParser/dispatchEvent() at mx.rpc.soap::WSDLParser/::dispatchFault() at mx.rpc.soap::WSDLParser/http://www.adobe.com/2006/flex/mx/internal::httpFaultHandler http://www.adobe.com/2006/flex/mx/internal::httpFaultHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent() at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::faultHandler http://www.adobe.com/2006/flex/mx/internal::faultHandler() at mx.rpc::Responder/fault() at mx.rpc::AsyncRequest/fault() at ::DirectHTTPMessageResponder/securityErrorHandler() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at flash.net::URLLoader/flash.net:URLLoader::redirectEvent() I really need some opinions on this issue. If anyone needs the code please mail me and I'll be glad to send it back. Thanks in advance.
Re: [flexcoders] Re: Hands-on charts
I'm trying to use a chart to do this because the data are currently displayed in charts, so that seemed the most appropriate control to use for making data changes. That said, I'd be very interested in seeing how you implemented this. Any chance of sharing your code? - Tom mark_g_wales wrote: Tom, I'm not sure if you are stuck on using charts to do this, but I think I accomplished a similar effect to what you want a while back by using the graphics package to draw a rectangle around a slider. I listened for slider events and would then clear and re-run the drawRect on each move. It was very little code and the effect was quite seamless. -Mark --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com, Ely Greenfield [EMAIL PROTECTED] wrote: Yup. To do mouse tracking, you generally need a mouse down, mouse move, and mouse up handler. Almost all of my code that does mouse tracking looks like this: someComponent mouseDown=startTracking(event); / private function startTracking(e:MouseEvent):void { // listen to the systemManager so we get mouse move/up events even when the mouse moves outside the component. // listen on capture so we can cancel move/rollover events going to other components. systemManager.addEventListener(MouseEvent.MOUSE_MOVE,track,true); systemManager.addEventListener(MouseEvent.MOUSE_UP,endTracking,true); track(e); } private function track(e:MouseEvent):void { // update your data/UI here. } private function endTracking(e:MouseEvent):void { track(e); // remove the event listeners until we need to track again. systemManager.removeEventListener(MouseEvent.MOUSE_MOVE,track,true); systemManager.removeEventListener(MouseEvent.MOUSE_UP,endTracking,true); } From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com] On Behalf Of Tom Fitzpatrick Sent: Tuesday, November 28, 2006 9:37 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: Re: [flexcoders] Re: Hands-on charts I'm trying out your suggested approach and ran into a conceptual problem. I can get the mouse coordinates and convert them to data on the mouseDown event - but then how do I track the mouse movement, since that uses a different event (mouseMove), and the function I'm working with is already tied to the mouseDown? The movement tracking seems necessary to get the new coordinates. - Tom Ely Greenfield wrote: It depends on just how much data you're trying to show in the chart, but chances are good that it will be very responsive. Ely. -- *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 *tom24569 *Sent:* Monday, November 27, 2006 12:08 PM *To:* flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com *Subject:* [flexcoders] Re: Hands-on charts Would this happen fast enough that the chart would seem to be responding to the mouse movement? - Tom --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com, Ely Greenfield egreenfi@ wrote: Hi Tom. There's no interative modelling built in, but this should be pretty easy to do: 1) listen for itemMouseDown events. 2) track the mouse position 3) convert the mouse position into data coordinates using the chart.localToData() function. 4) write the new data coordinates into your dataProvider Ely. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com] On Behalf Of Tom Fitzpatrick Sent: Monday, November 27, 2006 6:34 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Hands-on charts Flex charts work beautifully responding to dynamic changes in data. Using the current components, is there any way to use Flex charts to change data? As a conceptual model, I'm thinking of the way parametric equalizers work in some audio programs, where it's possible to drag nodes on a line graph vertically or horizontally to change the
RE: [flexcoders] accessing variables through events
Thank you Gordon, That worked great. I guess I wasnt too clear on what I wanted but you nailed it. I was trying to add myUIComponent.i = i without extending the UIComponent in a subclass. I came to the same conclusion by appending the vars to an existing property already there and realized I had to do it your way. I was doing this at one point myUIComponent.name = i.toString(); and I could see it coming back. Thanks you so much.. saved me many more hours of foolishness. Jeremy i is a local var of the tracePath() method; it can't be accessed outside this method, and it doesn't even exist after tracePath() has finished executing. What you are trying to do is dynamically create N instances of a UIComponent, and when you click one of them, you want to know whether it is the 1st, 2nd, ... one that you created. (Actually, I suspect that what you really want to get when you click is the 'results' data, because otherwise I don't know why you calculated it.) The best way to do this is to write a trivial subclass of UIComponent which can store 'i' and/or 'results' as an instance var of each UIComponent that you create: public class MyComponent extends UIComponent { public class MyComponent() { super(); } public var i:int; public var results:XMLList; } Inside tracePath(), create instances of MyComponent and set 'i' and/or 'results' on each one: var myUIComponent:MyComponent = new MyComponent(); myUIComponent.i = i; myUIComponent.results = results; myUIComponent.graphics... Then inside mouseClickHandler() you can access 'i' and 'results' as event.currentTarget.i and event.currentTarget.results. You can't access them as this.i and this.results because 'this' is always whatever component or application your mx:Script is inside of; it isn't the object that dispatched or listened to the MouseEvent. BTW, you could probably accomplish of all this more easily by using the mx:Repeater tag, but that's another topic. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Tooley Sent: Monday, November 27, 2006 7:46 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] accessing variables through events Quick question regarding accessing variables. I have the following code public function tracePath():void { for (var i:int = 0; i photoFeed.menu.submenu.length(); i++) { trace([EMAIL PROTECTED]) var results:XMLList = [EMAIL PROTECTED]; trace(results); trace (i); var myUIComponent:UIComponent = new UIComponent(); myUIComponent.graphics.beginFill(0xFFCC00); myUIComponent.graphics.drawCircle(60*i, 30, 30); myUIComponent.buttonMode = true; myUIComponent.useHandCursor = true; myUIComponent.addEventListener(MouseEvent.CLICK, mouseClickHandler); this.addChild(myUIComponent); } trace(photoFeed.menu.submenu.length() +hello); } and I access using this function public function mouseClickHandler(event:MouseEvent):void{ trace(this.i); } My question is... how do I access the i variable from within the mouseClickHandler() function so I could find out certain properties. The above code does not seem to find the i based on the dynamically created component. I really want to be able to find out the list collection based on click. Thanks Jeremy Jeremy Tooley Creative Director We Made That Design Group Inc. [EMAIL PROTECTED] http://www.wemadethat.com p: 403.668.0857 c: 403.836.3048
[flexcoders] Re: Data binding nested data -- UPDATED
All, I came up with alternative to using a label function. Use an inline itemRenderer: then reference it as data.name.first where data is the dataprovider's list item. Note: To reference the the selected item; use: myGrid.selectedItem.name.first eg: mx:TextArea x=10 y=302 width=289 height=89 text={myGrid.selectedItem.name.first}/ mx:itemRenderer mx:Component mx:Text text={data.name.first}/ /mx:Component /mx:itemRenderer Full snip for Datagrid: mx:DataGrid x=307 y=10 dataProvider={myEmployee} mx:columns mx:DataGridColumn headerText=First Name mx:itemRenderer mx:Component mx:Text text={data.name.first}/ /mx:Component /mx:itemRenderer /mx:DataGridColumn mx:DataGridColumn headerText=Last Name mx:itemRenderer mx:Component mx:Text text={data.name.last}/ /mx:Component /mx:itemRenderer /mx:DataGridColumn mx:DataGridColumn headerText=Department dataField=department/ mx:DataGridColumn headerText=Email dataField=email/ /mx:columns /mx:DataGrid --- In flexcoders@yahoogroups.com, dzeitman [EMAIL PROTECTED] wrote: All, Does anyone understand why this databinding doesn't work. It seems like this is a significant bug. Example shows a form with several fields, a data model, bindings, a grid and a second form to echo the data. Clearly the bindings work as the second form echos the first, the top level objects, email and description also work, it's the nested objects that don't work on the grid. This the datagrid does work as I would I would expect: Any thoughts would be appreciated. !-- Example-- ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute !-- Form contains user input controls. -- mx:Form label=Employee Information mx:FormItem label=First Name mx:TextInput id=firstName/ /mx:FormItem mx:FormItem label=Last Name mx:TextInput id=lastName/ /mx:FormItem mx:FormItem label=Department mx:TextInput id=department/ /mx:FormItem mx:FormItem label=Email Address mx:TextInput id=email/ /mx:FormItem /mx:Form !-- The myEmployee data model. -- mx:Model id=myEmployee Employee name first/ last/ /name department/ email/ /Employee /mx:Model mx:Binding source=firstName.text destination=myEmployee.name.first/ mx:Binding source=lastName.text destination=myEmployee.name.last/ mx:Binding source=department.text destination=myEmployee.department/ mx:Binding source=email.text destination=myEmployee.email/ mx:DataGrid x=394 y=0 dataProvider={myEmployee} mx:columns mx:DataGridColumn headerText=First Name dataField=name.first/ mx:DataGridColumn headerText=Last Name dataField=name.last/ mx:DataGridColumn headerText=Department dataField=department/ mx:DataGridColumn headerText=Email dataField=email/ /mx:columns /mx:DataGrid mx:Form label=Employee Information Echo x=10 y=156 mx:FormItem label=First Name mx:TextInput text={myEmployee.name.first}/ /mx:FormItem mx:FormItem label=Last Name mx:TextInput text={myEmployee.name.last}/ /mx:FormItem mx:FormItem label=Department mx:TextInput text={myEmployee.department}/ /mx:FormItem mx:FormItem label=Email Address mx:TextInput text={myEmployee.email}/ /mx:FormItem /mx:Form /mx:Application
Re: [flexcoders] Bit Off topic: Microsoft Vista VS Apollo/Flex/Flash
Good to know. Thx Matt. On 11/27/06, Matt Chotin [EMAIL PROTECTED] wrote: FYI, Apollo will have application signing -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *John C. Bland II *Sent:* Sunday, November 26, 2006 8:43 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Bit Off topic: Microsoft Vista VS Apollo/Flex/Flash Vista isn't -vs- Apollo/Flex/Flash. Here's the breakdown: WPF vs Apollo (and swf wrappers) WPF/E vs Flex/Flash I didn't read your entire post but I wanted to add that clarification. The Expression family isn't the whole round trip. You build WPF apps, most of the time at least, with Visual Studio. Expression has GREAT integration between the products. You start as a designer creating the interface (with full XAML code exported), move to Interactive Designer and add a few mod's (maybe even some code), then use the same code in Visual Studio to tie in data and everything else. Graphics and everything are all in code. Very nicely done...seriously. My opinion as to how they compare: WPF -vs- Apollo * WPF will probably blow Apollo out of the water in terms of system integration. Apollo has a few things that integrate into the OS but being cross platform somewhat prevents it from fully integrating like WPF. Keep in mind...WPF is .NET so you have great control over Windows. * Apollo easily wins at cross platform. * Apollo wins at ease of use/creation. WPF isn't terribly difficult but for normal .NET developers not used to control over the UI that WPF gives, it can be a bit daunting. * The power of WPF apps wins. Native database support, app signing (which I don't think Apollo will have), etc. WPF/E -vs- Flash/Flex * No argument...WPF/E has a LONG way to go. Flash/Flex wins without a doubt. Nothing further here. :-) On 11/26/06, *Sebastian Zarzycki* [EMAIL PROTECTED] wrote: camlinaeizerous wrote: Microsoft Expressions a new development tool reminded a lot of people of flash studio and it seems like a copy of flash with A Microsoft label on top. Although I didn't get to see a lot of the under working just a quick over view, essentially by default the time line is on the bottom drawing tools on the right and library on the left. It seemed so similar during the overview I heard people actually laughing saying it looked like flash. however looking at the code that was generated and the movements and transitions were basically generated with java. Actually, Microsoft Expression is new Microsoft Platform for artistic development. It consist of three tools : Web Designer (codename Quartz) - which is a replacement for Office Front Page (there's no FrontPage in Office 2007)., Graphic Designer (codename Acrylic), and Interactive Designer (codename Sparkle). You were talking about the last one, I guess. I'm checking expression's website for a year, to get some data for flex and apollo comparisions. Been playing around with Sparkle few hours. There are definitely some cool things about it, but I, for instance, don't like the incoherent (but nice) interface and I fail to understand how to build RIA using old timeline concept. Sparkle is meant to be a tool for designers, not coders. Let's see how they will cooperate in future. Today, as a developer from java world, I can quickly learn how to build an working and functional app in Flex. I have great troubles with achieving the same with Sparkle. -- | Sebastian Zarzycki / rat[tkin] | [EMAIL PROTECTED] | i'm a little lost in this postmodern space | gg:#2692696 / icq:#264185739 irc :#tool #ot-oa / skype:rattkin -- John C. Bland II Chief Geek Katapult Media, Inc. - www.katapultmedia.com --- Biz Blog - http://blogs.katapultmedia.com/jb2 Personal Blog - http://blog.blandfamilyonline.com http://www.lifthimhigh.com - Christian Products for Those Bold Enough to Wear Them Home of FMUG.az - http://www.gotoandstop.org Home of AZCFUG - http://www.azcfug.org -- John C. Bland II Chief Geek Katapult Media, Inc. - www.katapultmedia.com --- Biz Blog - http://blogs.katapultmedia.com/jb2 Personal Blog - http://blog.blandfamilyonline.com http://www.lifthimhigh.com - Christian Products for Those Bold Enough to Wear Them Home of FMUG.az - http://www.gotoandstop.org Home of AZCFUG - http://www.azcfug.org
[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
Re: [flexcoders] To Adobe - new release improvements??
When the 2.01 update comes out... will it be for BOTH Mac and Windows? Does anyone know if they are now on the same release train? leds usop said the following: Im not from Adobe but thanks to Matt CHotin, I have been given the oppportunity to play with the prerelease 2.01 update... They say it's not a major release but for me, the inclusion of the mx:module support/framework is one big help... think of the capability of 'breaking apart' your big apps into modular ones which the user will only have to download once on demand - all that while having the framework take care of most of the communication between the modules and the shell application or other modules. On top of that, you can still leverage on using RSL's, externs, fzip and any other file size/download time management methods adn tehcniques. And oh yeah, they have several bugs fixed already. Again thans Matt. Id' say but Numberous bugs have been fixed --- Daniel Wabyick [EMAIL PROTECTED] mailto:daniel%40wabysabi.com wrote: Hey Adobe guys, Is it possible for you to address some of the major (or non-major) improvements in the coming Flex release? In particular, I am keen to know if there were significant improvements made to Flexbuilder itself. Stuff like increased compiler performance, ease of use with relative paths, etc would be of interest to me. A close second would be roughly the number of bugs fixed in the actually Flex UI framework. As my project continues to grow, I am definitely getting antsy for a new release! Thanks, -Daniel __ Cheap talk? Check out Yahoo! Messenger's low PC-to-Phone call rates. http://voice.yahoo.com http://voice.yahoo.com -- /Whether you think that you can, or that you can't, you are usually right./ - Henry Ford
[flexcoders] Datefield maxYear behavior Verification
I have observed (both in Flex version 2 and 2.01 PreRealease) that on a datefield (and probably datechooser control too) with navigateYear set to enabled, if the maxYear was set to the selectedDate's Year, the set maxYear value seems to be nullified. i.e., selected date is January 1, 2006, and for some reason maxYear is set to 2006, you can then navigate beyond 2006 using the year navigation arrows. However, if you set the maxYear to 2007 (or any year after 2006), maxYear does it's job fine and so you cant navigate beyond 2007. This will help a lot in the date interval component I am creating from 2 datefields since I have to programmatically set the maxYear of the 'From' datefield to be equal to the year of 'To' datefield's selectedDate whenever a new To date is selected (and vice versa when a new 'From' date is selected. The strange maxYear behavior gets in the way of implementing that functionality most especially if the initial values of the two dates fall within the same year. Can you guys verify of this behavior is true to your copies of Flex? If it is, then I should probably file a bug. THnx! Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com
Re: [flexcoders] To Adobe - new release improvements??
John The Mac version of Flex builder (beta) has some kind of implementation of 2.0.1 already, to quote Adobe Labs: You can also download a supplementary collection of documentation that covers features that are unique to Flex Builder 2 for Macintosh (Flex 2.0.1 ). http://labs.adobe.com/technologies/flexbuilder2/ product details tab. Andrew On 29/11/06, John Kirby [EMAIL PROTECTED] wrote: When the 2.01 update comes out... will it be for BOTH Mac and Windows? Does anyone know if they are now on the same release train? leds usop said the following: Im not from Adobe but thanks to Matt CHotin, I have been given the oppportunity to play with the prerelease 2.01 update... They say it's not a major release but for me, the inclusion of the mx:module support/framework is one big help... think of the capability of 'breaking apart' your big apps into modular ones which the user will only have to download once on demand - all that while having the framework take care of most of the communication between the modules and the shell application or other modules. On top of that, you can still leverage on using RSL's, externs, fzip and any other file size/download time management methods adn tehcniques. And oh yeah, they have several bugs fixed already. Again thans Matt. Id' say but Numberous bugs have been fixed --- Daniel Wabyick [EMAIL PROTECTED] daniel%40wabysabi.com wrote: Hey Adobe guys, Is it possible for you to address some of the major (or non-major) improvements in the coming Flex release? In particular, I am keen to know if there were significant improvements made to Flexbuilder itself. Stuff like increased compiler performance, ease of use with relative paths, etc would be of interest to me. A close second would be roughly the number of bugs fixed in the actually Flex UI framework. As my project continues to grow, I am definitely getting antsy for a new release! Thanks, -Daniel __ Cheap talk? Check out Yahoo! Messenger's low PC-to-Phone call rates. http://voice.yahoo.com -- *Whether you think that you can, or that you can't, you are usually right. * - Henry Ford -- --- Andrew Muller http://www.webqem.com
[flexcoders] rotation of vertical axis title
I think the answer is no, but I'll ask it anyway - is there a way to rotate the vertical axis title so it reads from top to bottom, instead of the current bottom to top? Second, if there is no way, who chose the opposite of the normal way to be the default? ;) -- Jason
RE: [flexcoders] Problems with a DateField as an itemRenderer/editor
You are correct. It is itemEditEnd. I was just in a rush. As for the issue, the date is populating right. It's when I select a date from the calendar. When you select a date, I dispatch the DataGridEvent itemEditEnd. This even should have Event.currentTarget.editedItemRenderer and event.target.itemEditorInstance, which are both returning null. This points out to me that when you click or the DateField that opens up the calendar, it's not focusing into the datagrid as an editor. I'm wondering how I can invoke this manually? Does that make sense? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of leds usop Sent: Tuesday, November 28, 2006 11:50 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Problems with a DateField as an itemRenderer/editor Is onItemEnd a custom event listener? or do you mean onItemEditEnd? I dont recall having an 'onItemEnd' associated with Datagrid listener in any way.. please correct me if im wrong. When you use a datefield as item renderer or item editor a list control (or any drop-in item renderer/item editor), make sure that the data provider of that list control has a field of type Date (or the expected data type of the drop-in item renderer you used). Since Data Grid is derived from List base, this means it applies to it as well. Have you considered that? --- Louie Penaflor [EMAIL PROTECTED] mailto:lpenaflor%40woccu.org wrote: I'm having an issue with DataGridEvent (onItemEnd) and the DateField class. Basically, I've developed a framework that uses onItemEnd from the datagrid. I have components like the combobox for example... onChange calls onItemEnd which takes the data of the combobox and puts it in the dataField of the datagrid, then makes a service call to update to the database. I've gotten this to work great with many components but the dateField I'm having a horrible time with. when I dispatchEvent (onitemend) for example, I use event.currentTarget.editedItemRenderer to get the value from event.target.itemEditorInstance. Which both don't exist when I dispatchEvent from the calendar select date (onClose) event handler. This works when I have the dateField as an Editor only and using the default renderer. This is an issue becuase it creates another click for the user. I think the root of my problem is that when you click on the datefield to open the calendar, it doesn't invoke it as an editor in the datagrid. Is there a way to force this? Any help would be appreciated. Thanks in advance. Louie Penaflor Web Software Developer World Council of Credit Unions, Inc. Ph: (608)231-7932 This is a transmission from World Council of Credit Unions, Inc. and contains information that is confidential. If you are not the intended addressee or authorized to receive for the addressee, then any disclosure, copying, distribution, or use of the contents of this message is prohibited. If you have received this transmission in error, please destroy it and notify the sender immediately at the transmitting e-mail address. If you are the intended recipient, please be advised that this e-mail transmission is not encrypted or otherwise protected from potential misappropriation or misuse. World Council of Credit Unions, Inc. expressly disclaims any and all liability for harm resulting from the misappropriation, interception or misuse of the information contained in this transmission. __ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com http://new.mail.yahoo.com
RE: [flexcoders] accessing variables through events
You don't. You would want to create a new custom event that extends MouseEvent, adding in the parameter you want to pass. Shan _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jeremy Tooley Sent: Monday, November 27, 2006 9:46 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] accessing variables through events Quick question regarding accessing variables. I have the following code public function tracePath():void { for (var i:int = 0; i photoFeed.menu.submenu.length(); i++) { trace([EMAIL PROTECTED]) var results:XMLList = [EMAIL PROTECTED]; trace(results); trace (i); var myUIComponent:UIComponent = new UIComponent(); myUIComponent.graphics.beginFill(0xFFCC00); myUIComponent.graphics.drawCircle(60*i, 30, 30); myUIComponent.buttonMode = true; myUIComponent.useHandCursor = true; myUIComponent.addEventListener(MouseEvent.CLICK, mouseClickHandler); this.addChild(myUIComponent); } trace(photoFeed.menu.submenu.length() +hello); } and I access using this function public function mouseClickHandler(event:MouseEvent):void{ trace(this.i); } My question is... how do I access the i variable from within the mouseClickHandler() function so I could find out certain properties. The above code does not seem to find the i based on the dynamically created component. I really want to be able to find out the list collection based on click. Thanks Jeremy
[flexcoders] creating line chart using action script
Hi , I need to draw a linechart using only actionscript. I have done following: private var cat:CategoryAxis; private var lineS:LineSeries; this.dataProvider = _myDataProvider; cat = new CategoryAxis(); cat.categoryField = interval; cat.dataProvider = chartDataProvider; this.horizontalAxis = cat; lineS = new LineSeries(); lineS.yField = data; lineS.dataProvider = _myDataProvider; this.series = new Array(lineS); this.height=400; this.width=400; this.showDataTips=true; Now where should I write this code. I have written it in initllize() function, but it is not working. My class is extending LineChart
RE: [flexcoders] Built-in way to determine the number of XML elements
length doesn'tdo it I think matches.match.length() -- not matches.match.length -- should give you the number of match tags. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Thompson Sent: Tuesday, November 28, 2006 12:56 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Built-in way to determine the number of XML elements I'm trying to see if a response from the server is empty. So, in one case I end up with: root matches/ /root And in the other, I get: root matches match ... / /matches /root Using this fancy E4X, how do I test for the different conditions? I always seem to be getting back an XMLList, be it empty or not. I can't imagine I have to iterate this and check that it's zero at the end, but length doesn't do it, and I can't check for null because I'm always getting an XMLList. Thanks, -DT