Re: [flexcoders] Image component not resizing correctly
You have to set 'maintainAspectRatio' to false if you want the content to fill the image. Le 2010 9 2 01:56, method_air loudj...@hotmail.com a écrit : Currently experiencing an Image component resizing issue: An Image component (inside an ItemRenderer/Spark List, with a fixed width/height of '100') resizes incorrectly when it's source changes. The Image components source is initially set to an embedded placeholder graphic (while the new source loads), and the Image width/height is correct. However when the new source loads, the Image component does not resize to the Image width/height set dimensions, and the background of the item renderer is visible. Any ideas how to fix this? Thanks, Philip
RE: [flexcoders] Add check mark to context menu item when running in Web (not AIR)
Thanks Alex. Is it possible to pop up a Flex Menu on right click (without adding JS code and preventing event defaults etc)? Even if I can't check the context menu item, any way of highlighting it (making the text bold or using an icon) would be great with me. All I need is some way to indicate that this is the currently selected item to the user. Is this possible? Thanks, Pearl From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Monday, August 30, 2010 11:13 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Add check mark to context menu item when running in Web (not AIR) AFAIK there is no way to do that. Some folks add a context menu item that pops up a regular Flex menu with checkboxes. It is two steps, but that is the only way. On 8/30/10 7:20 AM, pearlnferns pearl.fernan...@celstream.com wrote: Hi all, I have a context menu to which I have added context menu items at runtime. I need to place a check mark next to the menu item that is currently selected. Although Flex provides the 'checked' property for a ContextMenuItem, this can be used only with AIR applications and the app I'm working on is not an AIR app. Any suggestions on how this can be achieved? TIA, Pearl -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui __ DISCLAIMER: This electronic message and any attachments to this electronic message is intended for the exclusive use of the addressee(s) named herein and may contain legally privileged and confidential information. It is the property of Celstream Technologies Pvt Limited. If you are not the intended recipient, you are hereby strictly notified not to copy, forward, distribute or use this message or any attachments thereto. If you have received this message in error, please delete it and all copies thereof, from your system and notify the sender at Celstream Technologies or administra...@celstream.com immediately. __
Re: [flexcoders] Re: Switching Item Renderers
it does. Another approach which i have taken (and I find neater, faster and more memory efficient with less emphasis on binding) is the concept of one 1 itemrenderer and several layouts which you can swop out depending on the model. This allows you to control shared resources (meaning i create the least number of fields i have to across several different itemrenderers) and get extremely intelligent about a lot more with less overhead. but hey, its personal flavour, spice of life stuff, ya know. On Wed, Sep 1, 2010 at 8:14 PM, Wesley Acheson wesley.ache...@gmail.comwrote: True. I'm not sure if that recycles well though? On Wed, Sep 1, 2010 at 3:01 PM, Johannes Nel johannes@gmail.comwrote: set your renderer to an IFactory. this is a pretty standard way of doing things. On Wed, Sep 1, 2010 at 1:19 PM, valdhor valdhorli...@embarqmail.comwrote: The only computation I see is determining which component to use. With your original idea you would still need the same computation to figure out which (sub) item renderer to use. I still think you are trying to hide the woods using more trees. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Wesley Acheson wesley.ache...@... wrote: Yeah thats the way I've done it previously. I thought that this way would cut out on some additional computation. On Tue, Aug 31, 2010 at 6:04 PM, valdhor valdhorli...@...wrote: That seems overly complicated to me. What I would try is create two custom components then instantiate the appropriate one based on the data and add it in the updateDisplayList method. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.comflexcoders% 40yahoogroups.com, Wesley Acheson wesley.acheson@ wrote: Since nobody has replied I'm continueing to try this. I currently think I may need to override all methods in UI component. Is it clear what I'm trying to do? Is this the wrong way of doing it? I think its probably lighter than wrapping to components in a fully fledged UI component? * Some Thoughts* Also a comment on ListItemRenderer, theres an awful lot of methods that need to be implemented to make this work. I doubt all of them are used in a List Senario. Even implementing them all theres still a dependency on DisplayObject (who's methods seem to be implemented). It does feel to me like the architecture seems a bit off. I mean if all of those methods are implemented why is there still a dependency on DisplayObject. Its not just enough to implement IListRenderer which seems to defeat the purpose of an interace On Wed, Aug 18, 2010 at 11:42 PM, Wesley Acheson wesley.acheson@wrote: *Disclaimer:* This is a cross post with Stack Overflow. I know at least one person on this list saw it there. http://stackoverflow.com/questions/3507313/flex-switch-item-renderer Hi I was wondering if anyone had any luck with the following senario in flex. I'd like to be able to have a custom item renderer which delegates to another renderer inside. The reason for this would be in a datagrid for instance displaying a checkbox if the dataprovider for the row had a boolean value. Using the default item renderer when the value was a non boolean. Basically I was hoping to use a proxy object (though not necessarily the proxy class) so that I could a renderer which delegated all of its responsibilties to a sub renderer. Hard to explain. *Edit 1* I think the following gives a clearer idea of what I had in mind. This is only knocked up quickly for the purpose of showing the idea. *SwitchingRenderer.as* package com.example { import mx.controls.CheckBox; import mx.controls.dataGridClasses.DataGridItemRenderer; import mx.controls.listClasses.BaseListData; import mx.controls.listClasses.IDropInListItemRenderer; import mx.core.IDataRenderer; import mx.core.UIComponent; public class SwitchingRenderer extends UIComponent implements IDataRenderer, IDropInListItemRenderer { private var checkboxRenderer:CheckBox; private var defaultRenderer:DataGridItemRenderer; private var currentRenderer:IDataRenderer; public function SwitchingRenderer() { this.checkboxRenderer = new CheckBox(); this.defaultRenderer = new DataGridItemRenderer(); this.currentRenderer = defaultRenderer(); super(); } public function get data():Object { //If the data for this cell is a boolean // currentRender = checkBoxRenderer // otherwise // currentRenderer = defaultRenderer } public function set data(value:Object):void
[flexcoders] Re: separate flex apps in same webroot folder
i fixed it. Thanks alot guys
Re: [flexcoders] Re: FABridge Problem - Please help!
Alex, I thank you for your patience. However, in one of my earlier posts on this thread I did give quite a lot of details about my particular situation (which is almost certainly different, but at the same time, related to, the other posters issue). In my case, I'm using an IFrame component (from http://code.google.com/p/flex-iframe/) to display a credit card data collection processing application (for PCI reasons, we do not wish to have the CC data collected via our main application) What I wish to happen, is for the 'hosted' app to be able to tell the 'hosting' flex app that it has completed its job, so that the flex app can change the ui, to present the main dashboard again, or perhaps a new order builder screen, or whatever. The problem is that my hosted html app (via javascript) is unable to communicate with its host flex app. There is an example of exactly this sort of behavior here ( http://ccgi.arutherford.plus.com/website/flex/iframe/IFrameBridgeTest/ ). FYI, I know for sure that this doesn't work (on Windows) with Chrome of Safari, but it does work with IE, FF, and Opera. What I've done, is to take the flex3 project here( http://code.google.com/p/flex-iframe/source/browse/trunk/examples/IFrameCommTest/ ), and just do a simple conversion of the code to flex4. I've exported my version of the project to facilitate help ( http://www.mediafire.com/file/172448jkkgva4ki/iframeCommTest.fxp ) The issue I'm trying to resolve, is why the code works fine in flex3, but not in flex4, and my best guess as to what is wrong is that its got something to do with swfobject being used in the flex4 version causing a change to the location of the FABridge object in the hosted html pages DOM. Hopefully that clears up some of the confusion. Thanks -- Brian J. Ackermann brian.ackerm...@gmail.com 952.373.1626 -- On Wed, Sep 1, 2010 at 11:36 AM, Alex Harui aha...@adobe.com wrote: So from my perspective, you aren’t being specific enough. You are saying that parent.FABridge doesn’t exist, the OP said something else. There are two DOMs, the JS DOM and the AS DOM. You are now saying you can’t find the object, but you aren’t saying which object. If parent.FABridge is null, then it sounds like a JS setup issue. Either FABridge.js isn’t being loaded or isn’t loaded in the right place. You might try your own test js file to see if you can find objects from your test file. On 9/1/10 6:27 AM, Brian J. Ackermann brian.ackerm...@gmail.com wrote: Yes, I've tried debugging on the JS side of things, exactly as you mentioned (See my email in this thread from Thu, Aug 26, 2010 at 12:45 PM). Nothing. I simply can't find the object. I used a javascript object dump function, to 'scan' the objects I could think of, looking for an occurrence of this object that we need for FABridge to work, but its tucked away somewhere, in a place which is non-trivial to locate. -- Brian J. Ackermann brian.ackerm...@gmail.com 952.373.1626 -- On Wed, Sep 1, 2010 at 8:22 AM, Brian J. Ackermann brian.ackerm...@gmail.com wrote: Alex, I think thats (the swfobject) probably getting pretty close to the right line of thinking, and its something that I'd considered briefly myself, but I am not savvy enough yet to make heads or tails of the issue. -- Brian J. Ackermann brian.ackerm...@gmail.com 952.373.1626 -- On Mon, Aug 30, 2010 at 11:44 PM, Alex Harui aha...@adobe.com wrote: I don’t have time to try it right now. In Flex 4, the tag goes inside the fx:Declarations tag. I took a quick look at the AS code and it uses ExternalInterface so it shouldn’t be sensitive to changes between Flex 3 and 4. Have you tried debugging from both sides? Use a JS debugger or stick a bunch of alerts in the JS code and see what sub-expressions are null (parent, parent.FABridge, parent.FABridge.foo, etc). Then put breakpoints on the AS side like FABridge.as.getRoot(). Are you using a new Flex 4 template that now uses SWFObject instead of AC_OETags.js? It shouldn’t make a difference unless you’re simply not including the right JS in the template. On 8/30/10 2:36 PM, gmbroth gmbr...@hotmail.com http://gmbr...@hotmail.com wrote: Hi, Was this problem resolved? I have Flex 3 MXML that defines: mx:Application ... utils:FABridge bridgeName=foo/ ... /mx:Application In Flex 4, must this statement now appear inside an fx:Declarations element? Even if there's no other fx namespace elements being used in the MXML? On the JavaScript side, I've been referencing the bridge as: FABridge.foo.root() which works fine in Flex 3 but doesn't resolve the bridge in Flex 4. How is the bridge referenced? Thanks, Garry --- In flexcoders@yahoogroups.com
Re: [flexcoders] Slow connection to a server
Try using Swiz. There is a delegate helper class that allows you to timeout the async request for a certain amount of time. As long as you are sequencing your events correctly and taking advantage of binding, you shouldn't have to worry about slow connections. If someone is on a slow connection, you'll want to worry most about your swf size -Jake Sent from my Droid On Sep 2, 2010 10:28 AM, Christophe christophe_jacque...@yahoo.fr wrote: Hello, How to have a slow speed connection with localhost, to simulate the real slow speed connection to a server ? Thank you, Christophe
RE: [flexcoders] Slow connection to a server
Proxies can slow down connections. I know service capture can do it, and I'd be very surprised if Charles couldn't. Gk.
RE: [flexcoders] Image component not resizing correctly
That worked. Thank you so much. To: flexcoders@yahoogroups.com From: hayke...@gmail.com Date: Thu, 2 Sep 2010 09:05:03 +0100 Subject: Re: [flexcoders] Image component not resizing correctly You have to set 'maintainAspectRatio' to false if you want the content to fill the image. Le 2010 9 2 01:56, method_air loudj...@hotmail.com a écrit : Currently experiencing an Image component resizing issue: An Image component (inside an ItemRenderer/Spark List, with a fixed width/height of '100') resizes incorrectly when it's source changes. The Image components source is initially set to an embedded placeholder graphic (while the new source loads), and the Image width/height is correct. However when the new source loads, the Image component does not resize to the Image width/height set dimensions, and the background of the item renderer is visible. Any ideas how to fix this? Thanks, Philip
[flexcoders] couple questions about android / air
I have been trying to code an android app in java and decided to take a look at air; I've read some things and need to be clarified about a few items: 1) does the android phone need to have some sort of 'air' installed on it? It seems as if compiling makes a regular .apk but I've also read that there was something necessary on a phone... 2) Flex 4 can or can't create the necessary projects? Awhile back it was necessary to start with a flash project but unsure where that stands now. 3) does an android / air app have all the same framework intents that a java app would? For example, I'm dealing specifically with something that works with Alarm Manager; I'd normally set up an intent that would repond to my Alarmmanager setup, and it would respond when fired; air projects work the same way? Appreciate any quick answers; as these things sometimes go am under the gun with multiple projects. Thanks! Garry Schafer grimmwerks gr...@grimmwerks.com portfolio: www.grimmwerks.com/
Re: [flexcoders] Re: FABridge Problem - Please help!
Brian, Thanks for the additional info, but what I am really asking for is unambigious language about what your debugging has discovered so far. If you are using parent.FABridge on the JS side, what does parent point to? Is it what you expect? If you place breakpoints on the AS side, do you get any hits there? On 9/2/10 6:14 AM, Brian J. Ackermann brian.ackerm...@gmail.com wrote: Alex, I thank you for your patience. However, in one of my earlier posts on this thread I did give quite a lot of details about my particular situation (which is almost certainly different, but at the same time, related to, the other posters issue). In my case, I'm using an IFrame component (from http://code.google.com/p/flex-iframe/) to display a credit card data collection processing application (for PCI reasons, we do not wish to have the CC data collected via our main application) What I wish to happen, is for the 'hosted' app to be able to tell the 'hosting' flex app that it has completed its job, so that the flex app can change the ui, to present the main dashboard again, or perhaps a new order builder screen, or whatever. The problem is that my hosted html app (via javascript) is unable to communicate with its host flex app. There is an example of exactly this sort of behavior here ( http://ccgi.arutherford.plus.com/website/flex/iframe/IFrameBridgeTest/ ). FYI, I know for sure that this doesn't work (on Windows) with Chrome of Safari, but it does work with IE, FF, and Opera. What I've done, is to take the flex3 project here( http://code.google.com/p/flex-iframe/source/browse/trunk/examples/IFrameCommTest/ ), and just do a simple conversion of the code to flex4. I've exported my version of the project to facilitate help ( http://www.mediafire.com/file/172448jkkgva4ki/iframeCommTest.fxp ) The issue I'm trying to resolve, is why the code works fine in flex3, but not in flex4, and my best guess as to what is wrong is that its got something to do with swfobject being used in the flex4 version causing a change to the location of the FABridge object in the hosted html pages DOM. Hopefully that clears up some of the confusion. Thanks Brian J. Ackermann brian.ackerm...@gmail.com 952.373.1626 On Wed, Sep 1, 2010 at 11:36 AM, Alex Harui aha...@adobe.com wrote: So from my perspective, you aren’t being specific enough. You are saying that parent.FABridge doesn’t exist, the OP said something else. There are two DOMs, the JS DOM and the AS DOM. You are now saying you can’t find the object, but you aren’t saying which object. If parent.FABridge is null, then it sounds like a JS setup issue. Either FABridge.js isn’t being loaded or isn’t loaded in the right place. You might try your own test js file to see if you can find objects from your test file. On 9/1/10 6:27 AM, Brian J. Ackermann brian.ackerm...@gmail.com http://brian.ackerm...@gmail.com wrote: Yes, I've tried debugging on the JS side of things, exactly as you mentioned (See my email in this thread from Thu, Aug 26, 2010 at 12:45 PM). Nothing. I simply can't find the object. I used a javascript object dump function, to 'scan' the objects I could think of, looking for an occurrence of this object that we need for FABridge to work, but its tucked away somewhere, in a place which is non-trivial to locate. Brian J. Ackermann brian.ackerm...@gmail.com http://brian.ackerm...@gmail.com 952.373.1626 On Wed, Sep 1, 2010 at 8:22 AM, Brian J. Ackermann brian.ackerm...@gmail.com http://brian.ackerm...@gmail.com wrote: Alex, I think thats (the swfobject) probably getting pretty close to the right line of thinking, and its something that I'd considered briefly myself, but I am not savvy enough yet to make heads or tails of the issue. Brian J. Ackermann brian.ackerm...@gmail.com http://brian.ackerm...@gmail.com 952.373.1626 On Mon, Aug 30, 2010 at 11:44 PM, Alex Harui aha...@adobe.com http://aha...@adobe.com wrote: I don’t have time to try it right now. In Flex 4, the tag goes inside the fx:Declarations tag. I took a quick look at the AS code and it uses ExternalInterface so it shouldn’t be sensitive to changes between Flex 3 and 4. Have you tried debugging from both sides? Use a JS debugger or stick a bunch of alerts in the JS code and see what sub-expressions are null (parent, parent.FABridge, parent.FABridge.foo, etc). Then put breakpoints on the AS side like FABridge.as.getRoot(). Are you using a new Flex 4 template that now uses SWFObject instead of AC_OETags.js? It shouldn’t make a difference unless you’re simply not including the right JS in the template. On 8/30/10 2:36 PM, gmbroth gmbr...@hotmail.com http://gmbr...@hotmail.com
Re: [flexcoders] couple questions about android / air
1. You need to install the air and then your application in order to work on the phone. Air you can download from the market If i remember correctly. 2. I developed and deployed used Flash CS5. Check the adobe labs there are lots of air for android stuff there. It probably tell you how to do it step by step. 3. Have no idea never used Java on Android, but again check the labs there is documentation there. HTH, C From: grimmwerks gr...@grimmwerks.com To: flexcoders@yahoogroups.com Sent: Thu, September 2, 2010 8:4at3:48 PM Subject: [flexcoders] couple questions about android / air I have been trying to code an android app in java and decided to take a look at air; I've read some things and need to be clarified about a few items: 1) does the android phone need to have some sort of 'air' installed on it? It seems as if compiling makes a regular .apk but I've also read that there was something necessary on a phone... 2) Flex 4 can or can't create the necessary projects? Awhile back it was necessary to start with a flash project but unsure where that stands now. 3) does an android / air app have all the same framework intents that a java app would? For example, I'm dealing specifically with something that works with Alarm Manager; I'd normally set up an intent that would repond to my Alarmmanager setup, and it would respond when fired; air projects work the same way? Appreciate any quick answers; as these things sometimes go am under the gun with multiple projects. Thanks! Garry Schafer grimmwerks gr...@grimmwerks.com portfolio: www.grimmwerks.com/
[flexcoders] antennae, mxmlc, and flex 4
I need to change some antennae project build rules for Flex 4. I need to redefine the mxmlc and compc rules. Can anybody offer some pointers on how to do it? I'm just looking at antennae for the first time. Thanks.
[flexcoders] Tree - itemClose and change
It appears that when you close a node in a tree control, the selection (of a contained node) is lost, but no change event is fired. Does this sound like a bug? I'm trying to restore tree state (selection and open nodes) across a service call. I've got the open nodes working pretty well and the refresh use case also mostly works (I store the selection as guids from the objects in question and find them again after the refresh). But it seems I will have to handle openItem and closeItem, and clear the guid-based selection if the node is contained in the path being closed.
Re: [flexcoders] Tree - itemClose and change
I thought there was already a bug on that. Do you get a valueCommit? On 9/2/10 4:23 PM, Richard Rodseth rrods...@gmail.com wrote: It appears that when you close a node in a tree control, the selection (of a contained node) is lost, but no change event is fired. Does this sound like a bug? I'm trying to restore tree state (selection and open nodes) across a service call. I've got the open nodes working pretty well and the refresh use case also mostly works (I store the selection as guids from the objects in question and find them again after the refresh). But it seems I will have to handle openItem and closeItem, and clear the guid-based selection if the node is contained in the path being closed. -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui