[flexcoders] Re: trouble with custom 'Text Bubble' component (examples included)
anyone have any ideas? --- In flexcoders@yahoogroups.com, G gmonie...@... wrote: I'm trying to use a custom Text component to show a series of comments. I got the original idea from: http://www.eonflex.com/?p=40 I've got the base case working but I am stuck with 2 problems I cant seem to figure out: 1. Since I am drawing around the text, the actual height of each bubble is greater than that of the Text field, as a result, the last bubble is always chopped off. I have tried explicitly overriding the height getter, and adding some padding, but I cant seem to get it right. You can see an example here: http://test.lambandtunafish.com/bubbles/CommentTest.swf 2. In my layout, I have 2 VBoxes (one nested inside the other). The first vbox shows a form where the user can enter a comment, and the second box has all the comments. In order to ensure that the scrollbars only show up on the second box, I set minHeight=0 on the nested VBox, but then for some reason, some comments' text is shifted to the right. You can see an example here (look at the first comment): http://test.lambandtunafish.com/bubbles/CommentTest-minHeight.swf Rather than posting the code here, I've provided some links: Container: http://test.lambandtunafish.com/bubbles/CommentTest.mxml Bubble: http://test.lambandtunafish.com/bubbles/CommentBubble.as If anyone has any ideas, I would appreciate it. Thanks!
Re: [flexcoders] List Scrolling Width Issues
Yesterday I was using a itemRenderer based on mx:Image and must to change to runtime BitmapImage like this one: http://polygeek.com/2452_flex_extending-spark-bitmapimage so I recomend you to go that way 2010/3/31 Alex Harui aha...@adobe.com If you search the archives, you’ll see that image-based renderers cause lots of problems. On 3/30/10 6:02 PM, Dan Vega danv...@gmail.com wrote: Really? Nobody has ever built a dynamic list of images before ? Thank You Dan Vega danv...@gmail.com http://www.danvega.org/ On Tue, Mar 30, 2010 at 2:01 PM, Alex Harui aha...@adobe.com wrote: I think list does a bit more thinking. I think it computes a typicalItem and uses that as the default size. One of the issues with Image-based renderers is that they have no size until the image loads. If you know the size upfront, set that on the renderer. On 3/30/10 6:29 AM, Dan Vega danv...@gmail.com http://danv...@gmail.com wrote: Take the following example. On the left you have a list that loads data from another file. The data is a basically a set of typed objects that have a src attribute that points to an image. Don't worry to much about that, just know that we are getting a list of images. The list on the left shows an initial list with some scrollbars and about 5 images. The list looks like it can only scroll 1 or 2 more images but in fact there are about 20 images. As you start scrolling the list figures out that there are more and adjusts the scroll bars. It keeps doing this until we reach the last images and finally the scroll bars work as expected. What I don't understand is the data group next to it works exactly how I expect the list to work. I thought the list was basically using the data group in the end anyways? What am I missing / doing wrong? If you need the full example I can email it to you, just ping me. ?xml version=1.0 encoding=utf-8? s:Application xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark http://ns.adobe.com/flex/spark http://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx http://ns.adobe.com/flex/mx http://ns.adobe.com/flex/mx initialize=GalleryService.loadData() s:layout s:HorizontalLayout paddingTop=20 paddingRight=20 paddingBottom=20 paddingLeft=20/ /s:layout s:List height=100% dataProvider={GalleryService.results} itemRenderer=GalleryImageRenderer dragEnabled=true s:layout s:VerticalLayout horizontalAlign=justify/ /s:layout /s:List s:Scroller height=100% s:DataGroup dataProvider={GalleryService.results} itemRenderer=GalleryImageRenderer s:layout s:VerticalLayout horizontalAlign=justify/ /s:layout /s:DataGroup /s:Scroller -- /s:Application Thank You Dan Vega danv...@gmail.com http://danv...@gmail.com http://www.danvega.org/ -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Amfphp and require_once
Hello, When I use a foreign class in my Amfhp service part, with the line: require_once(myclass.php); Amfphp does not work anymore. I have the error message: Channel disconnected. What can I do? Thx, Christophe,
Re: [flexcoders] Amfphp and require_once
Either one of these: Required file cannot be found. Required file was found but contained errors. Try Charles HTTP proxy - it'll display what the response contained. It'll have some PHP generated error / warning text in the message - easier to diagnose the problem. Best. Oleg
[flexcoders] Flex 4 - How to refresh all rows of a spark List ?
Hello all, How to refresh all rows of a spark List please, there is no invalidateList() method anymore ? Thank you in advance, Adnan
[flexcoders] Re: Amfphp and require_once
Also check the Apache error log. I always tail this file while testing. --- In flexcoders@yahoogroups.com, Oleg Sivokon olegsivo...@... wrote: Either one of these: Required file cannot be found. Required file was found but contained errors. Try Charles HTTP proxy - it'll display what the response contained. It'll have some PHP generated error / warning text in the message - easier to diagnose the problem. Best. Oleg
Re: [flexcoders] Flex 4 - How to refresh all rows of a spark List ?
You could try setting itemRenderer=null and then restoring it. On 3/31/10 8:04 AM, Adnan Doric astrona...@gmail.com wrote: Hello all, How to refresh all rows of a spark List please, there is no invalidateList() method anymore ? Thank you in advance, Adnan -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Plot chart problem
Ok, I know this is gonna sound really bad on me but I've learned Swiz, figured out how to simulate a Java-like Thread.wait() using a timer and check a object for data changes, I've even been able to get around Flex 4...But I am having a goose chase on where my tooltips are, I get blank tooltip bubbles. Ok here the case. I am using Plot chart, with the tooltips set to show. When I hovor over a data point I get a blank tooltip bubble. When I set showAllToolTip to true I can see them. Now I am dynamicly creating my series , there is a chance for infinite data sets so the series have to be dynamic. Is there something I am missing in the code snippetr below? This is where all my chart's plotting is handled (excuse the pun): public function sendDataToPlot(evt:TimerEvent):void { myChart.showDataTips = true; if(models.message != null || models.message != ){ var myXML:XML = models.message; var wholist:Array = new Array(); for each(var property:XML in myXML.item.session) { // Create an Array of unique names. if (wholist[property] != property) wholist[property] = property; } // Iterate over names and create a new series // for each one. for (var s:String in wholist) { // Use all items whose name matches s. var localXML:XMLList = myXML.item.(session==s); // Create the new series and set its properties. localSeries= new PlotSeries(); localSeries.dataProvider = localXML; localSeries.yField = visits; localSeries.xField = when; // localSeries. // Set values that show up in dataTips and Legend. localSeries.displayName = Session + s; // Back up the current series on the chart. var currentSeries:Array = myChart.series; // Add the new series to the current Array of series. currentSeries.push(localSeries); // Add the new Array of series to the chart. myChart.series = currentSeries; } } else { alrtTimer.reset(); alrtTimer.start(); }
[flexcoders] Line Chart Legend problem
I was successful in customizing the datapoints in a line chart with multiple series. The background fill of the datapoint changed according to other values in the xml file. Now my legend which contained the circle color of each series is not displaying. Only the legend label shows up. What am I missing? I know it must be something minor. Thanks.
[flexcoders] Flex4 Tile performance very slow?
Hi We have a flex3 app, part of which has a dialog box from which the user can pick a particular graph-type component to add to their display. Internally, this is generated with an mx:Tile list, where the dynamic list of children is created then addChild()-ed to the tile. This seems fine - but in certain circumstances seems appallingly slow. To illustrate - if we have a test doing mx:Tile id = theTile left=10 right=10 top=10 bottom=10/ Then if you do something like the following: for(var i:int=0;i50;i++) { var j:Button = new Button(); j.width = 100; j.height = 75; theTile.addChild(j); } Then it executes very very fast - too fast to even notice. But if I replace a 'button' with an mx.charts.LineChart it slows down to be a couple of seconds, which is on the boundary of being acceptable. But if I change it to be a (degrafa-based) com.brightPoint.controls.DegrafaGauge, it's 5 seconds; not what you want when a user should be flipping through pages quickly. I tried replacing the mx:Tile with a new Spark BorderContainer, and it's no better. It feels slower than flex3 was (but that's just a vague impression). I suspect I need to be fiddling with ItemRenderers, but I'm not sure it's going to really help. Are these just badly implemented components? Is there something else I can do to mitigate the initial render slowness (e.g: is it actually burning time trying to lay something out) ?
[flexcoders] Compare two datagrids
Hi, I am looking for a solution to compare data in two datagrids. The date fields are exactly the same. Any help on this will be greatly appreciated. If somehow, we can color code repeated data, that will be ideal.
[flexcoders] Re: ComboBox fullscreen issue
Thanks for the response. Would this entail setting styles or the drodownWidth property, or would I need to modify the factory? Is it possible to force the direction the dropdown comes out of the ComboBox? --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: mx:ComboBox doesn't handling scaling that well. You may have to modify the dropdown to compensate for the scaling. On 3/29/10 6:15 PM, elder.mich...@... michaer.sp...@... wrote: Short version: ComboBox's dropdown works and renders properly before fullscreen, but not during or after. I'm not totally sure how to ask this, so I've actually made a page demonstrating the error http://whatisfound.com/flex/problem1/ , with a very simple Flex app, and all three directions you need to experience the problem yourself. For those of you not daring enough to follow my link above, I'll do my best to explain here. I've built a more extensive Flex application (not the one in the link) that has some graphs and charts and checkboxes and other controls for those charts. At the bottom of app in a few of the application States, there is a ComboBox. Because this is at the very bottom, when you click it to access it's dropdown menu, Flex thoughtfully has it come out of the top. Yay, Flex! This works well until Fullscreen mode. Upon entering fullscreen, I scale eve! rything up with a stage.scaleMode = StageScaleMode.SHOW_ALL. Now when you click on the ComboBox, the dropdown is astonishingly large, and actually drops beneath the ComboBox, causing it to mostly disappear off-screen. The best part is, once you exit fullscreen mode, the dropdown insists on continuing to drop below the ComboBox, which is positioned at the bottom of the app, and so continues to be cut off. Has anyone else run into this beast, stared into it's great maw, and come away victorious? Am I doing fullscreen mode wrong? Please help! You can get the code from the View Source from the Flash player in the link, and thank you so much for your time. -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: Line Chart Legend problem
--- In flexcoders@yahoogroups.com, Monette monett...@... wrote: I was successful in customizing the datapoints in a line chart with multiple series. The background fill of the datapoint changed according to other values in the xml file. Now my legend which contained the circle color of each series is not displaying. Only the legend label shows up. What am I missing? I know it must be something minor. Thanks. Provide some code please.
[flexcoders] Re: Plot chart problem
Figured it out, do call a custom componet from a module not an application... --- In flexcoders@yahoogroups.com, arutheunicorn arutheunic...@... wrote: Ok, I know this is gonna sound really bad on me but I've learned Swiz, figured out how to simulate a Java-like Thread.wait() using a timer and check a object for data changes, I've even been able to get around Flex 4...But I am having a goose chase on where my tooltips are, I get blank tooltip bubbles. Ok here the case. I am using Plot chart, with the tooltips set to show. When I hovor over a data point I get a blank tooltip bubble. When I set showAllToolTip to true I can see them. Now I am dynamicly creating my series , there is a chance for infinite data sets so the series have to be dynamic. Is there something I am missing in the code snippetr below? This is where all my chart's plotting is handled (excuse the pun): public function sendDataToPlot(evt:TimerEvent):void { myChart.showDataTips = true; if(models.message != null || models.message != ){ var myXML:XML = models.message; var wholist:Array = new Array(); for each(var property:XML in myXML.item.session) { // Create an Array of unique names. if (wholist[property] != property) wholist[property] = property; } // Iterate over names and create a new series // for each one. for (var s:String in wholist) { // Use all items whose name matches s. var localXML:XMLList = myXML.item.(session==s); // Create the new series and set its properties. localSeries= new PlotSeries(); localSeries.dataProvider = localXML; localSeries.yField = visits; localSeries.xField = when; // localSeries. // Set values that show up in dataTips and Legend. localSeries.displayName = Session + s; // Back up the current series on the chart. var currentSeries:Array = myChart.series; // Add the new series to the current Array of series. currentSeries.push(localSeries); // Add the new Array of series to the chart. myChart.series = currentSeries; } } else { alrtTimer.reset(); alrtTimer.start(); }
Re: [flexcoders] Compare two datagrids
Don't compare two datagrids. Compare two datasets. If you need thew view to display what's in common, then you can create your own Filter function and apply it to the underlying data sets. Any changes made to the data will be reflected in the view. On Wed, Mar 31, 2010 at 4:51 PM, cvsikh prebh...@hotmail.com wrote: Hi, I am looking for a solution to compare data in two datagrids. The date fields are exactly the same. Any help on this will be greatly appreciated. If somehow, we can color code repeated data, that will be ideal.
[flexcoders] Allowing Jpgs saved Within Flex to be named by the user
My app allows a user to take a snapshot of a website and it then saves this snapshot as a jpg. However what I want is for the user to be able to name this jpg BEFORE it is saved eg if they type in yahooimage into a textinput component in my app (imagenameentry) and then click a button to create the image it will be automatically saved as yahooimage.jpg. At the moment I've just got the file saving as userimage.jpg but I tried editing a bit of my code which creates the file to this:- var file:File = File.applicationDirectory.resolvePath('assets/images/'imagenameentry.text'.jpg'); This never worked and throws a syntax error but if I use:- var file:File = File.applicationDirectory.resolvePath('assets/images/userimage.jpg'); Then it saves but as I say I want the image to be nameable like in the top example so that whatever the user enters in the imagenameentry box will be set as the name of the image. What am I doing wrong here and is there another way to do this?
Re: [flexcoders] Re: ComboBox fullscreen issue
I’d probably replace the factory with a subclass of List that handles scaling. On 3/31/10 1:20 PM, elder.mich...@rocketmail.com michaer.sp...@gmail.com wrote: Thanks for the response. Would this entail setting styles or the drodownWidth property, or would I need to modify the factory? Is it possible to force the direction the dropdown comes out of the ComboBox? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aha...@... wrote: mx:ComboBox doesn't handling scaling that well. You may have to modify the dropdown to compensate for the scaling. On 3/29/10 6:15 PM, elder.mich...@... michaer.sp...@... wrote: Short version: ComboBox's dropdown works and renders properly before fullscreen, but not during or after. I'm not totally sure how to ask this, so I've actually made a page demonstrating the error http://whatisfound.com/flex/problem1/ , with a very simple Flex app, and all three directions you need to experience the problem yourself. For those of you not daring enough to follow my link above, I'll do my best to explain here. I've built a more extensive Flex application (not the one in the link) that has some graphs and charts and checkboxes and other controls for those charts. At the bottom of app in a few of the application States, there is a ComboBox. Because this is at the very bottom, when you click it to access it's dropdown menu, Flex thoughtfully has it come out of the top. Yay, Flex! This works well until Fullscreen mode. Upon entering fullscreen, I scale eve! rything up with a stage.scaleMode = StageScaleMode.SHOW_ALL. Now when you click on the ComboBox, the dropdown is astonishingly large, and actually drops beneath the ComboBox, causing it to mostly disappear off-screen. The best part is, once you exit fullscreen mode, the dropdown insists on continuing to drop below the ComboBox, which is positioned at the bottom of the app, and so continues to be cut off. Has anyone else run into this beast, stared into it's great maw, and come away victorious? Am I doing fullscreen mode wrong? Please help! You can get the code from the View Source from the Flash player in the link, and thank you so much for your time. -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Uploading a Specific file rather than browsing
My app allows users to create a user-named jpg like so:- var enteredimagename:String = imagenameentry.text; var file:File = File.applicationDirectory.resolvePath(('assets/images/')+enteredimagename+('.jpg')); However I now want to allow a user to upload that specfic file automatically to my server by clicking a button which will simply upload that file WITHOUT having them browse for it. So basically I need it set up so that when the user clicks a button whatever name they type into the imagenameentry.text will be the image that gets uploaded. For example they create an image which they name yahooimage by typing yahooimage into the imagenameentry text input component. Once a button is clicked this will save this image as assets/images/yahooimage.jpg but I want to advance this button click further so that this specific jpg is then set as the file for upload without browsing for it. All the examples I've seen use the browse function though which is not what I want. How can this be combined with the filereference method or some other way so that the file to be uploaded can be entered into a textinput component as described above rather than browsed for?
Re: [flexcoders] List Scrolling Width Issues
using BitmapImage changes nothing.. how is there no examples of a list containing images? anyone? Thank You Dan Vega danv...@gmail.com http://www.danvega.org/ On Wed, Mar 31, 2010 at 6:20 AM, Carlos Rovira carlos.rov...@gmail.comwrote: Yesterday I was using a itemRenderer based on mx:Image and must to change to runtime BitmapImage like this one: http://polygeek.com/2452_flex_extending-spark-bitmapimage so I recomend you to go that way 2010/3/31 Alex Harui aha...@adobe.com If you search the archives, you’ll see that image-based renderers cause lots of problems. On 3/30/10 6:02 PM, Dan Vega danv...@gmail.com wrote: Really? Nobody has ever built a dynamic list of images before ? Thank You Dan Vega danv...@gmail.com http://www.danvega.org/ On Tue, Mar 30, 2010 at 2:01 PM, Alex Harui aha...@adobe.com wrote: I think list does a bit more thinking. I think it computes a typicalItem and uses that as the default size. One of the issues with Image-based renderers is that they have no size until the image loads. If you know the size upfront, set that on the renderer. On 3/30/10 6:29 AM, Dan Vega danv...@gmail.com http://danv...@gmail.com wrote: Take the following example. On the left you have a list that loads data from another file. The data is a basically a set of typed objects that have a src attribute that points to an image. Don't worry to much about that, just know that we are getting a list of images. The list on the left shows an initial list with some scrollbars and about 5 images. The list looks like it can only scroll 1 or 2 more images but in fact there are about 20 images. As you start scrolling the list figures out that there are more and adjusts the scroll bars. It keeps doing this until we reach the last images and finally the scroll bars work as expected. What I don't understand is the data group next to it works exactly how I expect the list to work. I thought the list was basically using the data group in the end anyways? What am I missing / doing wrong? If you need the full example I can email it to you, just ping me. ?xml version=1.0 encoding=utf-8? s:Application xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark http://ns.adobe.com/flex/spark http://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx http://ns.adobe.com/flex/mx http://ns.adobe.com/flex/mx initialize=GalleryService.loadData() s:layout s:HorizontalLayout paddingTop=20 paddingRight=20 paddingBottom=20 paddingLeft=20/ /s:layout s:List height=100% dataProvider={GalleryService.results} itemRenderer=GalleryImageRenderer dragEnabled=true s:layout s:VerticalLayout horizontalAlign=justify/ /s:layout /s:List s:Scroller height=100% s:DataGroup dataProvider={GalleryService.results} itemRenderer=GalleryImageRenderer s:layout s:VerticalLayout horizontalAlign=justify/ /s:layout /s:DataGroup /s:Scroller -- /s:Application Thank You Dan Vega danv...@gmail.com http://danv...@gmail.com http://www.danvega.org/ -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui