[flexcoders] Re: Bitmap downsampling
Can't believe this cost me 9 hours of brain time and the answer was in a constant all along. StageQuality.BEST Where's the documentation for this No-one is using, not even Aviary. thanks anyway Timmaay.. --- In flexcoders@yahoogroups.com, Tim Rowe tim.r...@... wrote: Bjorn, Does the current method you're using appear to have any anti-aliasing at all? In the past, resizing with Image using img.resize((height, width), Image.ANTIALIAS) (where img is mx.controls.Image) has worked - I'm sure there'd be a similar method for BitmapData. Of course, if you're not specifying antialiasing and the method call doesn't assume it by default, then yeah, you're going to get horrible image quality on downsize as a typical algorithm will pick nearest-neighbor to the new target pixel. --Tim From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Bjorn Schultheiss Sent: Thursday, 2 July 2009 2:34 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Bitmap downsampling Hi, I'm having a lot of trouble with down-sampling a bitmapData. I tried the smoothing option first public function produceResizedBitmapData(image:DisplayObject, transform:Matrix):BitmapData { var temp:BitmapData = new BitmapData(image.width, image.height, true, 0x00FF); temp.draw(image); var clone:BitmapData = new BitmapData(image.width*transform.a, image.height*transform.d, true, 0x00FF); clone.draw(temp, transform, null, null, null, true); temp.dispose(); return clone; } except the quality was poor, once the image was of a certain size. For example scaling a 2500px image down to 200px. I've tried using clevrLib plus a pixelBender bilinear sampler but no go. I've noticed it works in picnik so it must be possible. Can anyone push me in the right direction.
RE: [flexcoders] Re: Bitmap downsampling
Well, if it's not in the docs, you know what to do - they're open and take comments for a reason :) --Tim From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Bjorn Schultheiss Sent: Thursday, 2 July 2009 4:04 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Bitmap downsampling Can't believe this cost me 9 hours of brain time and the answer was in a constant all along. StageQuality.BEST Where's the documentation for this No-one is using, not even Aviary. thanks anyway Timmaay.. --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Tim Rowe tim.r...@... wrote: Bjorn, Does the current method you're using appear to have any anti-aliasing at all? In the past, resizing with Image using img.resize((height, width), Image.ANTIALIAS) (where img is mx.controls.Image) has worked - I'm sure there'd be a similar method for BitmapData. Of course, if you're not specifying antialiasing and the method call doesn't assume it by default, then yeah, you're going to get horrible image quality on downsize as a typical algorithm will pick nearest-neighbor to the new target pixel. --Tim From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of Bjorn Schultheiss Sent: Thursday, 2 July 2009 2:34 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Bitmap downsampling Hi, I'm having a lot of trouble with down-sampling a bitmapData. I tried the smoothing option first public function produceResizedBitmapData(image:DisplayObject, transform:Matrix):BitmapData { var temp:BitmapData = new BitmapData(image.width, image.height, true, 0x00FF); temp.draw(image); var clone:BitmapData = new BitmapData(image.width*transform.a, image.height*transform.d, true, 0x00FF); clone.draw(temp, transform, null, null, null, true); temp.dispose(); return clone; } except the quality was poor, once the image was of a certain size. For example scaling a 2500px image down to 200px. I've tried using clevrLib plus a pixelBender bilinear sampler but no go. I've noticed it works in picnik so it must be possible. Can anyone push me in the right direction.
[flexcoders] Embedding programmatic skins in CSS and compiling to SWF
I am experimenting with using external CSS files compiled as SWF. However, I have a problem. My css files use programmatic skins, and FlexBuilder cannot resolve the class references. So if I have border-skin: ClassReference(com.border.SimpleGradientBorder); it will choke when trying to build the swf because it doesn't know how to find it. Obviously this works fine when compiled into the application, since my project properties resolves the above path. Is there a way to embed the above class, and if so what is the syntax? aK See the Web#39;s breaking stories, chosen by people like you. Check out Yahoo! Buzz. http://in.buzz.yahoo.com/
[flexcoders]How to capture errors on UITextField when Images
When I load images into mx:Text and the image isn't found it throws an error. I've been trying to figure out how to capture this error. http://bugs.adobe.com/jira/browse/SDK-12755
[flexcoders]How to get the UITextField to remeasure
I have an image in a UITextField that I grab a reference to and resize. When I resize it larger or smaller than it's initial size the text around it doesn't reflow. It stays in exactly the same space.
Re: [flexcoders] ArrayCollection Does Not Show Items In Order When Passed to .NET WebService
How is it being parsed in .NET? You can parse it into a hashtable, or better yet, use a pre-defined object. Not sure why the order is different, but it is probably fragile to rely on the order in this case. 2009/7/2 Angelo Anolin angelo_ano...@yahoo.com: Hi FlexCoders, I have an array collection which I am populating as follows: var oTemp:Object; var xl:XMLList = _xmlData.children(); var i:int; for(i = 0; i xl.length(); i++) { oTemp = {ID_TAG:xl[i].ID.text(), CAT_TAG:xl[i].CAT.text(), DET_TAG:xl[i].DET.text(), REP_DATE_TAG:xl[i].REP_DATE.text(), IND_TAG:xl[i].IND.text()}; arrDP.addItem(oTemp); } Now, when I pass back this Array Collection back into a web service, the fields are not in order as I have added them into the array collection. I am expecting that in my Web Service, when I parse this arraycollection (via arraylist), I would be getting the same order of columns as I have added them, i.e. the first array in the array list would have element 0 to be the value I placed in the ID. Since the arraylist does not have the field tag (represented by ID_TAG, DET_TAG, CAT_TAG, etc..), it becomes a trial and error (hit and miss) on my part since I can only reference the value via the index on the array. Now, how would I be able to include the tags inside array collection such that when I read them as an array list in my .NET webservice, I know which element I am referring to in a particular index. Thanks. Regards, Angelo
[flexcoders] Re: item renderer in ComboBox not consistent
Thanks valdhor - great solution! I had got this far but was using a textInput and its background color, and even though I had editable=false; enabled=false; the cursor would go into the row. Not good. Question: I had to modify to g.beginFill(0xE8E8E3, 0.5); otherwise the line highlight would not show through and could not tell what line was highlighted. It surprised me that a renderer was capable of doing this. Thanks again, Mic. --- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote: Try the following as a starting point... ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:ComboBox itemRenderer=MyLabel mx:dataProvider mx:String*United States/mx:String mx:StringAustralia/mx:String mx:StringEngland/mx:String mx:String*Ireland/mx:String mx:String*Scotland/mx:String mx:StringWales/mx:String /mx:dataProvider /mx:ComboBox /mx:Application MyLabel.as: package { import flash.display.Graphics; import mx.controls.Label; public class MyLabel extends Label { public function MyLabel() { super(); } override public function set data(value:Object):void { if(value != null) { super.data = value; text = value as String; } } override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); var g:Graphics = graphics; g.clear(); if(text.substr(0,1) == *) { g.beginFill(0xE8E8E3); } else { g.beginFill(0xFF); } g.drawRect(-2, -2, unscaledWidth + 4, unscaledHeight + 4); g.endFill(); } } } --- In flexcoders@yahoogroups.com, Mic chigwell23@ wrote: I thought this might work --- fine until I start scrolling when it gets totally out of wack. The trace does fire occasionally while scrolling but not consistently. Appreciate some hints. TIA, Mic. ?xml version=1.0 encoding=utf-8? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; horizontalScrollPolicy=off mx:Script ![CDATA[ private function labelComplete():void{ trace(Here); if(label1.text.substr(0,1) == *){ this.setStyle(backgroundColor, 0xe8e8e3); }else{ this.setStyle(backgroundColor, 0xFF); } } ]] /mx:Script mx:Label id=label1 text={data.cmplx_nm} creationComplete=labelComplete() / /mx:VBox
[flexcoders] Re: Flex Browse File
Hi all, As I have a similar situation with a Flex app, I came to the following that works for me: Any Flex SWF is running withing the client's browser and for security reasons (as already mentioned) Flex is always running in sandbox, contrary to AIR. But there is no reason why in the local environment, the user/client can't switch from his browser to his system tray, copy the full path of a certain file and paste it to, say, a TextArea in the Flex app. This of course doesn't give any access to the file through the Flex app, but I was only needing the full path... Thanks, George --- In flexcoders@yahoogroups.com, reversible_82 reversible...@... wrote: Thanks, but what I'm trying to accomplish is get the String with the folder path, for example: D:/Files/Pic, with FileReference.browse(); I select the folder, so how could I get the String of the folder path... Thanks for your support --- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiverton@ wrote: On Friday 26 Jun 2009, reversible_82 wrote: No, it seem like this class do not exist in flex, should be a way to do this on flex, does anyone have an Idea? FileReference.browse(); -- Helping to ambassadorially participate clicks-and-mortar materials as part of the IT team of the year, '09 and '08 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 Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. 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 2500. For more information about Halliwells LLP visit www.halliwells.com.
[flexcoders] PureMVC, register popup mediator problem
Below is my code for popup, in my project, I have a problem to register mediator, I try like this :: facade.registerMediator(new InfoWindowFriendDetailsMediator(InfoWindowFriendDetails)); :: Problem happened when I register events on my popup component controls, I get null here and application crash. I don't know how to register mediator? $$$ override public function onRegister():void { friendDetailsInfoWindow.btnCloseInfoWindowFriendDetails.addEventListener(MouseEvent.CLICK, onCloseClick); } $$$ package util.popup { import flash.display.DisplayObject; import flash.display.Sprite; import mx.core.Application; import mx.core.IFlexDisplayObject; import mx.managers.PopUpManager; import org.puremvc.as3.multicore.patterns.facade.Facade; /** * Used to handle popup opening controling registering and unregistering mediators * * @author */ public class PopManager extends PopUpManager { private static var popupList:Array=new Array(); /** * Opens a popup window. Window component is crated and mediator is assigned to it. * Targeted for PureMVC multicore so method requires moduleId to be passed */ public static function openPopUpWindow(ComponentClass:Class, MediatorClass:Class, moduleUid:String, modal:Boolean=true, parent:DisplayObject=null):IFlexDisplayObject { if (parent == null) { parent=Application.application as DisplayObject; } var window:IFlexDisplayObject=PopUpManager.createPopUp(parent, ComponentClass, modal); var obj:Facade=Facade.getInstance(moduleUid)as Facade; obj.registerMediator(new MediatorClass(window)); PopUpManager.centerPopUp(window); return window; } /** * Removes PopUp window and unregisteres associated mediator */ public static function closePopUpWindow(window:IFlexDisplayObject, mediatorName:String, moduleUid:String):void { PopUpManager.removePopUp(window); Facade.getInstance(moduleUid).removeMediator(mediatorName); } /** * * Tries to retrieve popup window from the list of popups already opened. If there is no window opened with * provided mediator name associated with it, a new one is created and displayed. */ public static function retrievePopUp(ComponentClass:Class, MediatorClass:Class, mediatorName:String, moduleUid:String, modal:Boolean=true):IFlexDisplayObject { if (popupList[mediatorName]) { PopUpManager.addPopUp(popupList[mediatorName]as IFlexDisplayObject, Application.application as Sprite, modal); PopUpManager.bringToFront(popupList[mediatorName]); } else { popupList[mediatorName]=openPopUpWindow(ComponentClass, MediatorClass, moduleUid, modal) } return popupList[mediatorName]; } /** * Removes popup from display list. The actual popup object still exists in the list and can be retrieved */ public static function hidePopUp(window:IFlexDisplayObject, mediatorName:String):void { PopUpManager.removePopUp(window); } /** * Removes the popup completle. Also unregisters mediator. */ public static function destroyPopUp(window:IFlexDisplayObject, mediatorName:String, moduleUid:String):void { closePopUpWindow(window, mediatorName, moduleUid); if (popupList[mediatorName]) { popupList[mediatorName]=null; } } } }
[flexcoders] Moving tabs in the TabNavigator
Normally when you have a tab navigator, the tabs start from left to right. I see that you can offset the tabs numerically, but can you / how do you start the tabs from the right side?
[flexcoders] Free World Map Data Component
Does anyone know where I can find a good, clean world map data component? Something like what ILOG offers. Thanks!
[flexcoders] Popup a panel in new browser window
Hi, I am very new to flex. Can you let me know how can we pop up data in a panel in a new browser window? I was able to use TitleWindow property, but that will not pop up in a new browser window. Please help. Thanks
[flexcoders] Can a default view state have an enterState event handler appended to it?
I have a pretty straight forward Flex 3 Component with three states (the default, grid, and list). What i want is for a specific method to be fired upon entering each state. This is easy to establish for the defined states (grid list) but i don't know how to set it up, or emulate this behavior for the default state, and returning to the default state.
[flexcoders] Debugger issue
Hi I have strucked up with an debuger issue. Please help me out in resolving in this issue. when i tried to debug an application.it gives me an Pop up window stating that Failed to connect : session timed out Ensure that 1.You compiled your flash application with debugging on 2.You are running the debugger version of flash player. I tried to install flash palyer. and reinstalled flex builder but no use. Please help me out Thak you In Advance Vamsi
[flexcoders] Re: Web Service Question (Help!)
Do you utilise Charles (http://www.charlesproxy.com) at all? This will show you exactly what you are sending and receiving. --- In flexcoders@yahoogroups.com, Angelo Anolin angelo_ano...@... wrote: Hi Valdhor, I think you are quite right. Seems that the ArrayCollection which I am passing is becoming NULL or does not contain any value. Although I ensure from my web service that there are no fields in my dataset which I am passing back as an XML string to my flex application. I tried to utilize Alert.show(event.fault.getStackTrace().toString); to show the error, but nothing comes up. I wonder how I can make a trace on my arrayCollection? As of now, am using only the compiler and plugging the SWF object inside my asp.net page. Thanks a lot. Regards, Angelo From: valdhor valdhorli...@... To: flexcoders@yahoogroups.com Sent: Thursday, 2 July, 2009 1:01:23 Subject: [flexcoders] Re: Web Service Question (Help!) Error 1009 is Cannot access a property or method of a null object reference.. Try calling event.fault. getStackTrace( ) in the fault handler to see what the problem is. You may have a null XML object returned. --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote: Hi FlexCoders, I am totally confused with the error I am having at the moment. Been banging my head on this for the past 3 hours.. In one of my function, I am trying to call a WebService method passing an ArrayCollection. var svcDP:WebService = new WebService() ; svcDP.addEventListe ner(ResultEvent. RESULT, getRH); svcDP.addEventListe ner(FaultEvent. FAULT, getFH); svcDP.loadWSDL( _appWebService) ; svcDP.Method2( myArrayColl) ; Calling the webservice, I always get an error, which is defined in the faulthandler event, registering Error 1009. But when I do another web service call before the Method2, say: var svcDP:WebService = new WebService() ; svcDP.addEventListe ner(ResultEvent. RESULT, getRH); svcDP.addEventListe ner(FaultEvent. FAULT, getFH); svcDP.loadWSDL( _appWebService) ; svcDP.Method1( myArrayColl) ; svcDP.Method2( myArrayColl) ; The Method2 gets called (I know because am doing a trace on the web service). Now I don't have any idea why when only Method2 is called, the web service is not triggered, but calling another webservice before it, the method is triggered. Any idea? Thanks and regards, Angelo
[flexcoders] Re: Item Renderer doesn't work with just one Item :-(
I seem to remember some time back (Although my memory is not what it used to be) that if returned data only has one item it is not converted to an array (ie. it is only a string). You may like to try checking to see if it is an array and, if not, coercing it to an array. I could be completely off track here though. --- In flexcoders@yahoogroups.com, Nate Pearson napearso...@... wrote: I have a custom item render on a bar chart. When my the data provider for my bar chart has just one item in it the set data function is never gets called. Updatedisplaylist doesn't trigger and my bar chart is blank. Any ideas? I've had this bug for a while but I need to figure it out now. Thanks! -Nate
[flexcoders] Re: Filtering Flex Messages using Selector
You can use selector=client in(1,2,3,4) --- In flexcoders@yahoogroups.com, Amit Gupta subscript...@... wrote: Hi, I am trying to filter messages flex consumer is receiving from a JMS topic. In the header of the message I am specifying a client's id. While subscribing to the topic I specify mx:Consumer id=consumer destination=alert message=messageHandler (event) selector=client =1/ this runs fine. But now I want to filter on a list of clients. I want to receive messages for clients 1,2 and 3. Documentation says that selector accepts SQL92 conditions so I specified selector=client in (1,2,3) but this doesn't work. Any idea how I can filter for a list of clients? Regards, Amit
[flexcoders] Re: getting the xml data from a dispatched event
yes heres the results Main0.vsMain.HBox8.VBox968.vsCreateMeals.VBox971.pnlCreateBreakfast.coverflow.Panelcreatemealitem1006 How can I access the object data, it's in a file thats under the folder /com/nutrition/file.mxml --- In flexcoders@yahoogroups.com, Sam Lai samuel@... wrote: I'd add a trace statement just before it to see what type of object event.target is - it could be that the target is the UI component, and not the data object. //throws error on this line trace(event.target); customMeals.addItem((event.target as mealitem).mealDetails); 2009/7/2 Jason B nos...@...: I've got an problem when the user clicks on button Add to Meal it throws an error because it can't seem to reference the data in mealDetails object inside the com/ directory? I'm trying to add the item to the list control. I have the code located here in case you want more details http://files.getdropbox.com/u/228472/mealsflex.zip [Bindable] private var customMeals:ArrayCollection = new ArrayCollection; //throws error on this line customMeals.addItem((event.target as mealitem).mealDetails); ?xml version=1.0 encoding=utf-8? mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml; width=310 height=320 title={mealDetails.title} horizontalAlign=center mx:Metadata [Event(name=addToMeal)] [Event(name=learnAboutThis)] /mx:Metadata mx:Script ![CDATA[ import mx.controls.Alert; [Bindable] public var mealDetails:Object; private function calldispatch():void { parentApplication.createmeals_loadswf_var = mealDetails.swf; dispatchEvent(new Event('learnAboutThis', true)); } ]] /mx:Script mx:Image source={'/uploads/nutrition/' + mealDetails.imgsource } width=285 height=159/ mx:Label text={mealDetails.serving}/ mx:Button label=Add to Meal click=dispatchEvent(new Event('addToMeal', true))/ mx:Button label=Learn About This click=calldispatch()/ /mx:Panel -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Re: item renderer in ComboBox not consistent
Glad to be of help. A renderer can do almost anything but you have to decide whether the weight of the renderer is worth it. Depending on the amount of data, it could really slow down the display. --- In flexcoders@yahoogroups.com, Mic chigwel...@... wrote: Thanks valdhor - great solution! I had got this far but was using a textInput and its background color, and even though I had editable=false; enabled=false; the cursor would go into the row. Not good. Question: I had to modify to g.beginFill(0xE8E8E3, 0.5); otherwise the line highlight would not show through and could not tell what line was highlighted. It surprised me that a renderer was capable of doing this. Thanks again, Mic. --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: Try the following as a starting point... ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:ComboBox itemRenderer=MyLabel mx:dataProvider mx:String*United States/mx:String mx:StringAustralia/mx:String mx:StringEngland/mx:String mx:String*Ireland/mx:String mx:String*Scotland/mx:String mx:StringWales/mx:String /mx:dataProvider /mx:ComboBox /mx:Application MyLabel.as: package { import flash.display.Graphics; import mx.controls.Label; public class MyLabel extends Label { public function MyLabel() { super(); } override public function set data(value:Object):void { if(value != null) { super.data = value; text = value as String; } } override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void { super.updateDisplayList(unscaledWidth, unscaledHeight); var g:Graphics = graphics; g.clear(); if(text.substr(0,1) == *) { g.beginFill(0xE8E8E3); } else { g.beginFill(0xFF); } g.drawRect(-2, -2, unscaledWidth + 4, unscaledHeight + 4); g.endFill(); } } } --- In flexcoders@yahoogroups.com, Mic chigwell23@ wrote: I thought this might work --- fine until I start scrolling when it gets totally out of wack. The trace does fire occasionally while scrolling but not consistently. Appreciate some hints. TIA, Mic. ?xml version=1.0 encoding=utf-8? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; horizontalScrollPolicy=off mx:Script ![CDATA[ private function labelComplete():void{ trace(Here); if(label1.text.substr(0,1) == *){ this.setStyle(backgroundColor, 0xe8e8e3); }else{ this.setStyle(backgroundColor, 0xFF); } } ]] /mx:Script mx:Label id=label1 text={data.cmplx_nm} creationComplete=labelComplete() / /mx:VBox
re: [flexcoders] Popup a panel in new browser window
Use mx.managers.PopUpManager and then use either addPopUp (if in a component) or createPopUp (if creating it on the fly) . Once you create or added a popup, use CenterPopUp(this) to have it center in the screen or else it will pop up at 0,0 From: ferrari_hunk brianfer...@yahoo.co.in Sent: Thursday, July 02, 2009 5:36 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Popup a panel in new browser window Hi, I am very new to flex. Can you let me know how can we pop up data in a panel in a new browser window? I was able to use TitleWindow property, but that will not pop up in a new browser window. Please help. Thanks
[flexcoders] Re: Can a default view state have an enterState event handler appended to it?
Look into the show event. --- In flexcoders@yahoogroups.com, sixtypercentliquid matt...@... wrote: I have a pretty straight forward Flex 3 Component with three states (the default, grid, and list). What i want is for a specific method to be fired upon entering each state. This is easy to establish for the defined states (grid list) but i don't know how to set it up, or emulate this behavior for the default state, and returning to the default state.
[flexcoders] Re: Embedding programmatic skins in CSS and compiling to SWF
Instead of using dots (com.border.SimpleGradientBorder), try using slashes (com/border/SimpleGradientBorder). --- In flexcoders@yahoogroups.com, ak ak_...@... wrote: I am experimenting with using external CSS files compiled as SWF. However, I have a problem. My css files use programmatic skins, and FlexBuilder cannot resolve the class references. So if I have border-skin: ClassReference(com.border.SimpleGradientBorder); it will choke when trying to build the swf because it doesn't know how to find it. Obviously this works fine when compiled into the application, since my project properties resolves the above path. Is there a way to embed the above class, and if so what is the syntax? aK See the Web#39;s breaking stories, chosen by people like you. Check out Yahoo! Buzz. http://in.buzz.yahoo.com/
[flexcoders] Testing socket...
Hi, I have an APP that connects to a server using socket... but, I would like to unit test it w/o connecting the real server... is there any way I can create a flex server socket? Maybe using AIR? I found no way so far. VELO
Re: [flexcoders] Moving tabs in the TabNavigator
Hi Wally In TabNavigator componet use tabOffset property to get your required output. With Regards, Niamath Basha On Thu, Jul 2, 2009 at 5:53 PM, Wally Kolcz wko...@isavepets.com wrote: Normally when you have a tab navigator, the tabs start from left to right. I see that you can offset the tabs numerically, but can you / how do you start the tabs from the right side?
Re: [flexcoders] Free World Map Data Component
I'm not sure how to quantify 'good' and 'clean' mean in terms of components; can you elaborate? I do understand free, though, as in your subject line; but don't know of any. Wally Kolcz wrote: Does anyone know where I can find a good, clean world map data component? Something like what ILOG offers. Thanks! -- Jeffry Houser, Technical Entrepreneur Adobe Community Expert: http://tinyurl.com/684b5h http://www.twitter.com/reboog711 | Phone: 203-379-0773 -- Easy to use Interface Components for Flex Developers http://www.flextras.com?c=104 -- http://www.theflexshow.com http://www.jeffryhouser.com -- Part of the DotComIt Brain Trust
Re: [flexcoders] Re: how can you make the icon in an AdvancedDataGridGroupItemRenderer accept clicks?
Yes, I wondered why they set it, too. It's quite mysterious. And as far as extending ADGGIR - have you looked at that code? They were good about making very little of it private or mx_internal (yes, I know I can get around the latter), but the bulk of it is done in commitProperties. So you'd be limited to just stuff you could take on to the end of the overridden function. Likely I'd just clone the unit and change the bit of code I was interested in. On Wed, Jul 1, 2009 at 8:14 AM, valdhor valdhorli...@embarqmail.com wrote: I'm glad you found an easy way to get the functionality you wanted. According to the docs, mouseEnabled defaults to true. I wonder why the ADGGIR constructor sets it to false? Also, why don't the docs reflect this? I just wanted to say that if you still wanted the functionality from AdvancedDataGridGroupItemRenderer and you wanted extra functionality, you can extend AdvancedDataGridGroupItemRenderer for your renderer. Best of both worlds ;-) --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Pan Troglodytes chimpathe...@... wrote: Well, the main reason I wouldn't want to write my own itemRenderer is that AdvancedDataGridGroupItemRenderer does a lot of stuff I wouldn't want to have to reinvent. It also interacts with stuff like iconFunction that would be annoying to re-implement. Plus, there's the fact that there's a high likelihood that what I wrote would be much less efficient. But good news! I found a simple way to achieve what I want: ?xml version=1.0 encoding=utf-8? Application xmlns=http://www.adobe.com/2006/mxml; Script ![CDATA[ // put any icon you want in the embed below, doesn't matter [Bindable] [Embed(source=imageA.png)] private var imgClass:Class; private function geticon(item:Object):Class { return imgClass; } ]] /Script AdvancedDataGrid iconFunction=geticon itemClick=trace('itemclick') click=trace('gridclick') groupItemRenderer Component AdvancedDataGridGroupItemRenderer mouseEnabled=true/ /Component /groupItemRenderer dataProvider HierarchicalData childrenField=subitems source={[{label:'test'}, {label:'test2'}]}/ /dataProvider columns AdvancedDataGridColumn dataField=label/ /columns /AdvancedDataGrid /Application The key was setting mouseEnabled=true. It is set to false in the constructor for ADGGIR. I'm not sure why, and I am a little worried that I may be messing up something important. So far I haven't noticed any odd behavior. But if anyone knows a good reason WHY mouseEnabled is set this way, please followup. On Mon, Jun 29, 2009 at 11:13 AM, valdhor valdhorli...@...wrote: Why not just use an itemRenderer? AFAIK. you can't capture a mouse event on a Class object as it does not implement iEventDispatcher. I suppose you could extend Class and implement iEventDispatcher but I have never tried it. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.comflexcoders% 40yahoogroups.com, Pan Troglodytes chimpathetic@ wrote: No ideas on how to do this at all? On Tue, Jun 9, 2009 at 4:13 PM, Pan Troglodytes chimpathetic@ wrote: I've got a bit of a problem and haven't been able to figure it out. When using hierarchical views with ADG, I find that the icon can't be clicked on to select the row. I can't figure out how to capture a click on the icon at all. ?xml version=1.0 encoding=utf-8? Application xmlns=http://www.adobe.com/2006/mxml; Script ![CDATA[ // put any icon you want in the embed below, doesn't matter [Bindable] [Embed(source=imageA.png)] private var imgClass:Class; private function geticon(item:Object):Class { return imgClass; } ]] /Script AdvancedDataGrid iconFunction=geticon itemClick=trace('itemclick') click=trace('gridclick') dataProvider HierarchicalData childrenField=subitems source={[{label:'test'}, {label:'test2'}]}/ /dataProvider columns AdvancedDataGridColumn dataField=label/ /columns /AdvancedDataGrid /Application If you click anywhere but the icon, the gridclick and itemclick events both fire. But if you click on the icon, you get only the gridclick. And the gridclick event doesn't get anything useful for target/currentTarget, as far as I can tell. The main thing I really want to do is have clicking on the icon select the row, just like clicking anywhere else will do. Tangentially, it would be nice to know how to capture the event in case I wanted to do something different with clicking on the icon. -- Jason -- Jason -- Jason -- Jason
Re: [flexcoders] Moving tabs in the TabNavigator
Thanks, but what I was looking for was hortizontalAlign. From: niamath basha niamathba...@gmail.com Sent: Thursday, July 02, 2009 7:18 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Moving tabs in the TabNavigator Hi Wally In TabNavigator componet use tabOffset property to get your required output. With Regards, Niamath Basha On Thu, Jul 2, 2009 at 5:53 PM, Wally Kolcz wko...@isavepets.com wrote: Normally when you have a tab navigator, the tabs start from left to right. I see that you can offset the tabs numerically, but can you / how do you start the tabs from the right side?
[flexcoders] local microphone not working from Flex App
Morning all, I am working on a flex soft phone component to add to our dashboard using Zingaya. I am working with Flex Builder 3 - sdk 3.2 on a XP machine. The canvas is housing the interface and the functions utilizing a SWC to communicate with the Zingaya api. I have a working prototype running standalone application, but when convert it to a canvas and add to the dashboard application I don't get use of the microphone. I have tired this 2 ways - creating a library project for the phone components and linking the two projects and directly adding the components to the application. Do I need to notify the application that the canvas needs access to the microphone? Anyone have any ideas? How would be the best way of trying to debug? Thanks, Eric W Dunn Adaption Technologies 281-465-3326 ed...@adpt-tech.com
Re: [flexcoders] Free World Map Data Component
Something you might use in a dash board application. I like the one from ILOG Exir, but just can't afford the $800 for the set. I could a lot of good dashboard components (guages, graphs, etc) but cannot find a good global map one. From: Jeffry Houser j...@farcryfly.com Sent: Thursday, July 02, 2009 7:55 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Free World Map Data Component I'm not sure how to quantify 'good' and 'clean' mean in terms of components; can you elaborate? I do understand free, though, as in your subject line; but don't know of any. Wally Kolcz wrote: Does anyone know where I can find a good, clean world map data component? Something like what ILOG offers. Thanks! -- Jeffry Houser, Technical Entrepreneur Adobe Community Expert: http://tinyurl.com/684b5hhttp://www.twitter.com/reboog711 | Phone: 203-379-0773 -- Easy to use Interface Components for Flex Developers http://www.flextras.com?c=104 -- http://www.theflexshow.comhttp://www.jeffryhouser.com -- Part of the DotComIt Brain Trust
[flexcoders] Re: why does my MXML act differently than my AS?
No ideas on this one? On Wed, Jun 17, 2009 at 12:00 PM, Pan Troglodytes chimpathe...@gmail.comwrote: I have a test program that, as far as I can tell, does the same thing using an MXML component and the equivalent actionscript. When I click on the button to execute the AS version, everything is fine. But when I click on the button to execute the MXML version, I get a layout flicker. It's bad enough that if you try to click on the MXML button over and over really fast, you'll wind up clicking the main app and the menu will go away. Here's the code: ?xml version=1.0 encoding=utf-8? Application xmlns=http://www.adobe.com/2006/mxml; layout=absolute Script ![CDATA[ import mx.containers.GridItem; import mx.controls.Label; import mx.controls.DateField; private function addCategoryAS():void { var gi:GridItem; var gr:GridRow = new GridRow; gi = new GridItem; gr.addChild(gi); gi.addChild(new Label); addRow(gr); } private function addCategoryMXML():void { var gr:GridRow = new TestGridRow; gr.initialize(); // this is just to try to make it equivalent - doesn't change flicker addRow(gr); } private function addRow(gr:GridRow):void { grid.addChildAt(gr, 0); var gi:GridItem; gi = gr.getChildAt(0) as GridItem; (gi.getChildAt(0) as Label).text = item + grid.numChildren + :; gr.validateSize(true); var verticalGap:Number = grid.getStyle(verticalGap); popup.scrollRect = new Rectangle(0, 0, Math.max(popup.width + gr.measuredWidth), popup.height + gr.measuredHeight + (isNaN(verticalGap) ? 0 : verticalGap)); if (popup.localToGlobal(new Point(0, 0)).y popup.owner.localToGlobal(new Point(0, 0)).y) popup.y -= gr.measuredHeight + (isNaN(verticalGap) ? 0 : verticalGap); } ]] /Script Canvas bottom=0 PopUpButton id=myPopupButton openAlways=true popUp Canvas id=popup Grid id=grid paddingTop=4 paddingBottom=4 paddingLeft=4 paddingRight=4 fontSize=12 backgroundColor=0xFF borderStyle=outset borderThickness=2 GridRow GridItem Button label=Add AS click=addCategoryAS()/ Button label=Add MXML click=addCategoryMXML()/ /GridItem /GridRow /Grid /Canvas /popUp /PopUpButton /Canvas /Application TestGridRow.mxml: ?xml version=1.0 encoding=utf-8? GridRow xmlns=http://www.adobe.com/2006/mxml; GridItem Label/ /GridItem /GridRow I've dug through the generated code and have not been able to find anything that I think would account for the problem. This is frustrating, because what I really want to do is a more complicated MXML component to make it a lot nicer to add rows in my addCategory function. But I can't as long as it's going to be so jittery. Thanks! -- Jason -- Jason
[flexcoders] Re: why does my MXML act differently than my AS?
Nope. I confirmed what you are seeing but couldn't figure out why in the limited time I had to look at it. I am going to have to defer to someone more knowledgeable. --- In flexcoders@yahoogroups.com, Pan Troglodytes chimpathe...@... wrote: No ideas on this one? On Wed, Jun 17, 2009 at 12:00 PM, Pan Troglodytes chimpathe...@...wrote: I have a test program that, as far as I can tell, does the same thing using an MXML component and the equivalent actionscript. When I click on the button to execute the AS version, everything is fine. But when I click on the button to execute the MXML version, I get a layout flicker. It's bad enough that if you try to click on the MXML button over and over really fast, you'll wind up clicking the main app and the menu will go away. Here's the code: ?xml version=1.0 encoding=utf-8? Application xmlns=http://www.adobe.com/2006/mxml; layout=absolute Script ![CDATA[ import mx.containers.GridItem; import mx.controls.Label; import mx.controls.DateField; private function addCategoryAS():void { var gi:GridItem; var gr:GridRow = new GridRow; gi = new GridItem; gr.addChild(gi); gi.addChild(new Label); addRow(gr); } private function addCategoryMXML():void { var gr:GridRow = new TestGridRow; gr.initialize(); // this is just to try to make it equivalent - doesn't change flicker addRow(gr); } private function addRow(gr:GridRow):void { grid.addChildAt(gr, 0); var gi:GridItem; gi = gr.getChildAt(0) as GridItem; (gi.getChildAt(0) as Label).text = item + grid.numChildren + :; gr.validateSize(true); var verticalGap:Number = grid.getStyle(verticalGap); popup.scrollRect = new Rectangle(0, 0, Math.max(popup.width + gr.measuredWidth), popup.height + gr.measuredHeight + (isNaN(verticalGap) ? 0 : verticalGap)); if (popup.localToGlobal(new Point(0, 0)).y popup.owner.localToGlobal(new Point(0, 0)).y) popup.y -= gr.measuredHeight + (isNaN(verticalGap) ? 0 : verticalGap); } ]] /Script Canvas bottom=0 PopUpButton id=myPopupButton openAlways=true popUp Canvas id=popup Grid id=grid paddingTop=4 paddingBottom=4 paddingLeft=4 paddingRight=4 fontSize=12 backgroundColor=0xFF borderStyle=outset borderThickness=2 GridRow GridItem Button label=Add AS click=addCategoryAS()/ Button label=Add MXML click=addCategoryMXML()/ /GridItem /GridRow /Grid /Canvas /popUp /PopUpButton /Canvas /Application TestGridRow.mxml: ?xml version=1.0 encoding=utf-8? GridRow xmlns=http://www.adobe.com/2006/mxml; GridItem Label/ /GridItem /GridRow I've dug through the generated code and have not been able to find anything that I think would account for the problem. This is frustrating, because what I really want to do is a more complicated MXML component to make it a lot nicer to add rows in my addCategory function. But I can't as long as it's going to be so jittery. Thanks! -- Jason -- Jason
[flexcoders] LiveCycle / BlazeDS question - If anyone knows
Can Either or Both of these data services stream video and audio similar to FMS? We're looking into getting FMS and I would rather have a DS for my Flex apps if they can :-) Thanks for any info.
[flexcoders] External config file for livecycle
It would be great to connection to COldfusion's built in livecycle express from a web host but wouldn't that require access to the root config file? Is it possible to load it externally so multiple users can use the stream data services without bumping into each other or having the web host manually create it for you. OR Is there any hosted solutions for livecycle for Flex developers?
[flexcoders] Re: Item Renderer doesn't work with just one Item :-(
Well my label shows up on the graph, it just doesn't call the item renderer (I think). I get a label on the left side and a blank graph. I try to debug the renderer and I can't hit any break points. Any other ideas? --- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote: I seem to remember some time back (Although my memory is not what it used to be) that if returned data only has one item it is not converted to an array (ie. it is only a string). You may like to try checking to see if it is an array and, if not, coercing it to an array. I could be completely off track here though. --- In flexcoders@yahoogroups.com, Nate Pearson napearson99@ wrote: I have a custom item render on a bar chart. When my the data provider for my bar chart has just one item in it the set data function is never gets called. Updatedisplaylist doesn't trigger and my bar chart is blank. Any ideas? I've had this bug for a while but I need to figure it out now. Thanks! -Nate
[flexcoders] Re: Item Renderer doesn't work with just one Item :-(
I have a filter function applied. Could that be part of it? --- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote: I seem to remember some time back (Although my memory is not what it used to be) that if returned data only has one item it is not converted to an array (ie. it is only a string). You may like to try checking to see if it is an array and, if not, coercing it to an array. I could be completely off track here though. --- In flexcoders@yahoogroups.com, Nate Pearson napearson99@ wrote: I have a custom item render on a bar chart. When my the data provider for my bar chart has just one item in it the set data function is never gets called. Updatedisplaylist doesn't trigger and my bar chart is blank. Any ideas? I've had this bug for a while but I need to figure it out now. Thanks! -Nate
[flexcoders] Re: Flex Browse File
I am using something similar in one case where part of the path is a category but in other circumstances, this just wouldn't be acceptable in a software application. There are plenty of users who don't even know what cut paste means. I really need a better solution... --- In flexcoders@yahoogroups.com, grg_blls grg_b...@... wrote: Hi all, As I have a similar situation with a Flex app, I came to the following that works for me: Any Flex SWF is running withing the client's browser and for security reasons (as already mentioned) Flex is always running in sandbox, contrary to AIR. But there is no reason why in the local environment, the user/client can't switch from his browser to his system tray, copy the full path of a certain file and paste it to, say, a TextArea in the Flex app. This of course doesn't give any access to the file through the Flex app, but I was only needing the full path... Thanks, George --- In flexcoders@yahoogroups.com, reversible_82 reversible_82@ wrote: Thanks, but what I'm trying to accomplish is get the String with the folder path, for example: D:/Files/Pic, with FileReference.browse(); I select the folder, so how could I get the String of the folder path... Thanks for your support --- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiverton@ wrote: On Friday 26 Jun 2009, reversible_82 wrote: No, it seem like this class do not exist in flex, should be a way to do this on flex, does anyone have an Idea? FileReference.browse(); -- Helping to ambassadorially participate clicks-and-mortar materials as part of the IT team of the year, '09 and '08 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 Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. 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 2500. For more information about Halliwells LLP visit www.halliwells.com.
[flexcoders] Data Pushing
The software (flex or air) needs to allow more than one user to work on the same data at the same time in a collaborative effort and to reflect the changes made by the other users. Has anyone worked with data pushing? What products have you used for .Net or for .Php and which tools worked best for you? Would flex + ajax be the best way to go, flourinefx, WebOrb? A. Resa Jones
Re: [flexcoders] Free World Map Data Component
Wally Kolcz wrote: good dashboard components (guages, graphs, etc) but cannot find a good global map one. google maps won't do?
[flexcoders] Re: Configureing AIR app for blazeds messaging
I am interested in doing this too. The book Adobe AIR Programming Unleashed has an example in chapter 13, I was finally able to get it to work. The main thing it is stating near the begining of this example is Under Additional Compiler Arguements, change the path inside the double quotes to match the install path of your BlazeDS server: {path to your BlazeDS folder}/tomcat/webapps/blazeds/WEB-INF/flex/services-config.xml But I generate my project saying it is AIR and will be using J2EE and lifecycle, clicked validate, and it is putting that information into the Additional Compiler Arguments for me (-services option). Ok, long story short, here is what my Additional Compiler Arguments appears like in my project: -services C:\Blazeds\tomcat\webapps\chat\WEB-INF\flex\services-config.xml -locale en_US The book told me to edit the messaging-config.xml file, but it seems that did not work. Once I copied the service tag from the messaging-config.xml file into the services-config.xml file instead of using the include file tag. And reboot BlazeDS it started working! AIR application can send messages to my browser version and vice versa. Also note that my services-config.xml does not have any reference to variables ( {server.name}, {server.port}, {context.root}, ...). It is a really good example of a AIR chat program where it will even display a status that someone is typing. --- In flexcoders@yahoogroups.com, netdeep deep...@... wrote: I am trying to get messaging working with my AIR application. I'm converting a Flex application into AIR and everything works in Flex but not in AIR. I can get remoting working, but messaging isn't working. I set up remoting channels at runtime using the examples from this site: http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetailspostId= 9703productId=2 ...
[flexcoders] Re: Item Renderer doesn't work with just one Item :-(
Possibly. Is there any way you could put together a small example of what you are seeing? --- In flexcoders@yahoogroups.com, Nate Pearson napearso...@... wrote: I have a filter function applied. Could that be part of it? --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: I seem to remember some time back (Although my memory is not what it used to be) that if returned data only has one item it is not converted to an array (ie. it is only a string). You may like to try checking to see if it is an array and, if not, coercing it to an array. I could be completely off track here though. --- In flexcoders@yahoogroups.com, Nate Pearson napearson99@ wrote: I have a custom item render on a bar chart. When my the data provider for my bar chart has just one item in it the set data function is never gets called. Updatedisplaylist doesn't trigger and my bar chart is blank. Any ideas? I've had this bug for a while but I need to figure it out now. Thanks! -Nate
[flexcoders] Re: htmlText truncation when changing from embedded to device font
Tim, Thanks for the detailed reply. Unfortunately, this only fixes half the problem... With your recommended changes in place, the size of the TextArea now restores after a brief flicker, but the HTML formatting of the content is still lost. Even if I reassign the HTML text to the TextArea inside your updateTextSize function so it happens after the font change is complete, only the raw text appears, and the formatting (even non-font-dependent formatting such as br/, li etc.) is lost. I read and appreciate your point about the bold face text requiring an embedded bold font, but even the non font-dependent formatting (as above) is lost. Any ideas on how to restore the formatting after the font change? Thanks again, Toby --- In flexcoders@yahoogroups.com, Tim Hoff timh...@... wrote: I'll let the engineers let you know why this is happening. But, you can get it to work with the following steps (hack): 1) Remove height=200 from the test Text control. 2) Add this function: private function updateTextSize():void { test.invalidateSize(); } 3) On the ComboBox change event, execute callLater(updateTextSize); Note: If you use embedded fonts, a boldface font must be available for b/b to work. -TH --- In flexcoders@yahoogroups.com, tphipps toby.phipps@ wrote: Hi all, I've seeing some strange behaviour with a mx:Text component using htmlText. It seems that when the fontFamily of the text component is changed at runtime from an embedded font to a device font (or vice versa), the content is truncated, and the HTML formatting lost. However, when changing from one device font to another (or one embedded font to another), it works just fine. Take this example (view source enabled but without the actual font files included - any OTF should work fine): http://dev.nx.sg/lab/fontchange/FontChange.html This app initializes the text component with some htmlText using a device font (_sans in this case). Once loaded, try changing the font to another device font (e.g. Courier New or Myriad) with the dropdown. Everything's fine. Now change to an embedded font, and note the truncation and loss of formatting. The reverse happens if I initalize the field with an embedded font - changing to another embedded font works fine but changing to a device font ends up truncating again. Anyone got any ideas how to make this work? Thanks, Toby.
[flexcoders] Re: htmlText truncation when changing from embedded to device font
That's all that I have Toby. Maybe someone else would like to jump in. -TH --- In flexcoders@yahoogroups.com, tphipps toby.phi...@... wrote: Tim, Thanks for the detailed reply. Unfortunately, this only fixes half the problem... With your recommended changes in place, the size of the TextArea now restores after a brief flicker, but the HTML formatting of the content is still lost. Even if I reassign the HTML text to the TextArea inside your updateTextSize function so it happens after the font change is complete, only the raw text appears, and the formatting (even non-font-dependent formatting such as br/, li etc.) is lost. I read and appreciate your point about the bold face text requiring an embedded bold font, but even the non font-dependent formatting (as above) is lost. Any ideas on how to restore the formatting after the font change? Thanks again, Toby --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote: I'll let the engineers let you know why this is happening. But, you can get it to work with the following steps (hack): 1) Remove height=200 from the test Text control. 2) Add this function: private function updateTextSize():void { test.invalidateSize(); } 3) On the ComboBox change event, execute callLater(updateTextSize); Note: If you use embedded fonts, a boldface font must be available for b/b to work. -TH --- In flexcoders@yahoogroups.com, tphipps toby.phipps@ wrote: Hi all, I've seeing some strange behaviour with a mx:Text component using htmlText. It seems that when the fontFamily of the text component is changed at runtime from an embedded font to a device font (or vice versa), the content is truncated, and the HTML formatting lost. However, when changing from one device font to another (or one embedded font to another), it works just fine. Take this example (view source enabled but without the actual font files included - any OTF should work fine): http://dev.nx.sg/lab/fontchange/FontChange.html This app initializes the text component with some htmlText using a device font (_sans in this case). Once loaded, try changing the font to another device font (e.g. Courier New or Myriad) with the dropdown. Everything's fine. Now change to an embedded font, and note the truncation and loss of formatting. The reverse happens if I initalize the field with an embedded font - changing to another embedded font works fine but changing to a device font ends up truncating again. Anyone got any ideas how to make this work? Thanks, Toby.
[flexcoders] Re: htmlText truncation when changing from embedded to device font
One other thing that you could try would be to create the TextArea dynamically each time with AS, set the styleName, set the text and addChild(). You would have to removeChild() each time as well. Not sure if this would solve your problem, but maybe it's worth a try. -TH --- In flexcoders@yahoogroups.com, Tim Hoff timh...@... wrote: That's all that I have Toby. Maybe someone else would like to jump in. -TH --- In flexcoders@yahoogroups.com, tphipps toby.phipps@ wrote: Tim, Thanks for the detailed reply. Unfortunately, this only fixes half the problem... With your recommended changes in place, the size of the TextArea now restores after a brief flicker, but the HTML formatting of the content is still lost. Even if I reassign the HTML text to the TextArea inside your updateTextSize function so it happens after the font change is complete, only the raw text appears, and the formatting (even non-font-dependent formatting such as br/, li etc.) is lost. I read and appreciate your point about the bold face text requiring an embedded bold font, but even the non font-dependent formatting (as above) is lost. Any ideas on how to restore the formatting after the font change? Thanks again, Toby --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote: I'll let the engineers let you know why this is happening. But, you can get it to work with the following steps (hack): 1) Remove height=200 from the test Text control. 2) Add this function: private function updateTextSize():void { test.invalidateSize(); } 3) On the ComboBox change event, execute callLater(updateTextSize); Note: If you use embedded fonts, a boldface font must be available for b/b to work. -TH --- In flexcoders@yahoogroups.com, tphipps toby.phipps@ wrote: Hi all, I've seeing some strange behaviour with a mx:Text component using htmlText. It seems that when the fontFamily of the text component is changed at runtime from an embedded font to a device font (or vice versa), the content is truncated, and the HTML formatting lost. However, when changing from one device font to another (or one embedded font to another), it works just fine. Take this example (view source enabled but without the actual font files included - any OTF should work fine): http://dev.nx.sg/lab/fontchange/FontChange.html This app initializes the text component with some htmlText using a device font (_sans in this case). Once loaded, try changing the font to another device font (e.g. Courier New or Myriad) with the dropdown. Everything's fine. Now change to an embedded font, and note the truncation and loss of formatting. The reverse happens if I initalize the field with an embedded font - changing to another embedded font works fine but changing to a device font ends up truncating again. Anyone got any ideas how to make this work? Thanks, Toby.
Re: [flexcoders] External config file for livecycle
When you talk about the root config file are you referring to the services-config file that you specify as an argument to the Flex Compiler? If so, that not a server config file. It's values are hard coded into your SWF. The file on the server, even a hosted server, has absolutely no affect on getting Flex Remoting working (or not). Wally Kolcz wrote: It would be great to connection to COldfusion's built in livecycle express from a web host but wouldn't that require access to the root config file? Is it possible to load it externally so multiple users can use the stream data services without bumping into each other or having the web host manually create it for you. OR Is there any hosted solutions for livecycle for Flex developers? -- Jeffry Houser, Technical Entrepreneur Adobe Community Expert: http://tinyurl.com/684b5h http://www.twitter.com/reboog711 | Phone: 203-379-0773 -- Easy to use Interface Components for Flex Developers http://www.flextras.com?c=104 -- http://www.theflexshow.com http://www.jeffryhouser.com -- Part of the DotComIt Brain Trust
[flexcoders] FileReference Load local files - how to use it to load flv or MP4 files?
I am trying to use the FileReference stuff to load flv and/ or mp4 files to Flash player. I have been able to do it with images with Flex sdk 3.3 (Flash Player 10), doing something similar to what Peter shows at http://blog.flexexamples.com/2008/08/25/previewing-an-image-before-uploading-it-using-the-filereference-class-in-flash-player-10/#comment-19806 However, I cannot figure out how to load a video. Any suggestions?
Re: [flexcoders] ArrayCollection Does Not Show Items In Order When Passed to .NET WebService
Hi Sam, Care to show some examples? I am parsing the arrayCollection into an ArrayList on .NET. This is particularly not too appealing since I just discovered that for example, if one of the objects in the arraycollection would have an empty string value, the number of items inside the array is not reflected properly in .NET. Like: private var arrR:ArrayCollection = new ArrayCollection([{ID:001, Value:Select}, {ID:002, Value:Choose}, {ID:003, Value:},]); When I pass this var arrR into a .NET webservice and delegate it to an ArrayList, the items in the array list will have one of the arrays only containing 1 item (instead of 2). Adding to my problem is the fact that the arrays inside the array list when read in .NET should have the object ID and Value be in order but they are not. This is further true when there are many items in the array collection. Sometimes, the first item becomes the last one in the array list, and sometimes the order is not well. In any case, I am finding a solution on how I would be able to pass an ArrayCollection to .NET and be able to parse it properly. Thanks. From: Sam Lai samuel@gmail.com To: flexcoders@yahoogroups.com Sent: Thursday, 2 July, 2009 15:46:58 Subject: Re: [flexcoders] ArrayCollection Does Not Show Items In Order When Passed to .NET WebService How is it being parsed in .NET? You can parse it into a hashtable, or better yet, use a pre-defined object. Not sure why the order is different, but it is probably fragile to rely on the order in this case. 2009/7/2 Angelo Anolin angelo_anolin@ yahoo.com: Hi FlexCoders, I have an array collection which I am populating as follows: var oTemp:Object; var xl:XMLList = _xmlData.children( ); var i:int; for(i = 0; i xl.length(); i++) { oTemp = {ID_TAG:xl[i] .ID.text( ), CAT_TAG:xl[i] .CAT.text( ), DET_TAG:xl[i] .DET.text( ), REP_DATE_TAG: xl[i].REP_ DATE.text( ), IND_TAG:xl[i] .IND.text( )}; arrDP.addItem( oTemp); } Now, when I pass back this Array Collection back into a web service, the fields are not in order as I have added them into the array collection. I am expecting that in my Web Service, when I parse this arraycollection (via arraylist), I would be getting the same order of columns as I have added them, i.e. the first array in the array list would have element 0 to be the value I placed in the ID. Since the arraylist does not have the field tag (represented by ID_TAG, DET_TAG, CAT_TAG, etc..), it becomes a trial and error (hit and miss) on my part since I can only reference the value via the index on the array. Now, how would I be able to include the tags inside array collection such that when I read them as an array list in my .NET webservice, I know which element I am referring to in a particular index. Thanks. Regards, Angelo
Re: [flexcoders] Testing socket... [1 Attachment]
Hope this helps... On Thu, Jul 2, 2009 at 7:27 PM, Marvin Froeder velo...@gmail.com wrote: Hi, I have an APP that connects to a server using socket... but, I would like to unit test it w/o connecting the real server... is there any way I can create a flex server socket? Maybe using AIR? I found no way so far. VELO
Re: [flexcoders] Re: Web Service Question (Help!)
No I am not using that tool. I think the arrayCollection when one of the columns contains a null value (as retrieved from the database), it basically cannot be passed back to the web service. Anyway, what I did was I made some changes on the retrieve SQL statement by decoding null value as empty strings. The problem I now have is that for example, when I pass the arraycollection with one of the objects having an empty string value to my .net web service, the web service, which accepts the the same as ArrayList would not recognize that object with the empty string value. So instead of 7 objects in my array collection (with one object having empty string value) is passed to my web service and delegated to the Array List, the array list would only contain 6 objects, instead of 7. Any idea how to remedy this? I think I may need to change how I pass the collection from Flex to .NET. Thanks. From: valdhor valdhorli...@embarqmail.com To: flexcoders@yahoogroups.com Sent: Thursday, 2 July, 2009 20:42:46 Subject: [flexcoders] Re: Web Service Question (Help!) Do you utilise Charles (http://www.charlesp roxy.com) at all? This will show you exactly what you are sending and receiving. --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote: Hi Valdhor, I think you are quite right. Seems that the ArrayCollection which I am passing is becoming NULL or does not contain any value. Although I ensure from my web service that there are no fields in my dataset which I am passing back as an XML string to my flex application. I tried to utilize Alert.show(event. fault.getStackTr ace().toString) ; to show the error, but nothing comes up. I wonder how I can make a trace on my arrayCollection? As of now, am using only the compiler and plugging the SWF object inside my asp.net page. Thanks a lot. Regards, Angelo _ _ __ From: valdhor valdhorlists@ ... To: flexcod...@yahoogro ups.com Sent: Thursday, 2 July, 2009 1:01:23 Subject: [flexcoders] Re: Web Service Question (Help!) Error 1009 is Cannot access a property or method of a null object reference.. Try calling event.fault. getStackTrace( ) in the fault handler to see what the problem is. You may have a null XML object returned. --- In flexcod...@yahoogro ups.com, Angelo Anolin angelo_anolin@ ... wrote: Hi FlexCoders, I am totally confused with the error I am having at the moment. Been banging my head on this for the past 3 hours.. In one of my function, I am trying to call a WebService method passing an ArrayCollection. var svcDP:WebService = new WebService() ; svcDP.addEventListe ner(ResultEvent. RESULT, getRH); svcDP.addEventListe ner(FaultEvent. FAULT, getFH); svcDP.loadWSDL( _appWebService) ; svcDP.Method2( myArrayColl) ; Calling the webservice, I always get an error, which is defined in the faulthandler event, registering Error 1009. But when I do another web service call before the Method2, say: var svcDP:WebService = new WebService() ; svcDP.addEventListe ner(ResultEvent. RESULT, getRH); svcDP.addEventListe ner(FaultEvent. FAULT, getFH); svcDP.loadWSDL( _appWebService) ; svcDP.Method1( myArrayColl) ; svcDP.Method2( myArrayColl) ; The Method2 gets called (I know because am doing a trace on the web service). Now I don't have any idea why when only Method2 is called, the web service is not triggered, but calling another webservice before it, the method is triggered. Any idea? Thanks and regards, Angelo
Re: [flexcoders] ArrayCollection Does Not Show Items In Order When Passed to .NET WebService
Instead of using an array list and trying to emulate the type-less abilities of AS3, I'd try to map the XML to typed objects in .NET. Or does the XML from your Flex app differ too wildly to do this? Are you using the XmlSerializer to deserialize this? Or are you using WCF? Or are you doing it some other way, or manually? I'd provide an example, but I don't know enough details on your situation to give something useful :) 2009/7/3 Angelo Anolin angelo_ano...@yahoo.com: Hi Sam, Care to show some examples? I am parsing the arrayCollection into an ArrayList on .NET. This is particularly not too appealing since I just discovered that for example, if one of the objects in the arraycollection would have an empty string value, the number of items inside the array is not reflected properly in .NET. Like: private var arrR:ArrayCollection = new ArrayCollection([{ID:001, Value:Select}, {ID:002, Value:Choose}, {ID:003, Value:},]); When I pass this var arrR into a .NET webservice and delegate it to an ArrayList, the items in the array list will have one of the arrays only containing 1 item (instead of 2). Adding to my problem is the fact that the arrays inside the array list when read in .NET should have the object ID and Value be in order but they are not. This is further true when there are many items in the array collection. Sometimes, the first item becomes the last one in the array list, and sometimes the order is not well. In any case, I am finding a solution on how I would be able to pass an ArrayCollection to .NET and be able to parse it properly. Thanks. From: Sam Lai samuel@gmail.com To: flexcoders@yahoogroups.com Sent: Thursday, 2 July, 2009 15:46:58 Subject: Re: [flexcoders] ArrayCollection Does Not Show Items In Order When Passed to .NET WebService How is it being parsed in .NET? You can parse it into a hashtable, or better yet, use a pre-defined object. Not sure why the order is different, but it is probably fragile to rely on the order in this case. 2009/7/2 Angelo Anolin angelo_anolin@ yahoo.com: Hi FlexCoders, I have an array collection which I am populating as follows: var oTemp:Object; var xl:XMLList = _xmlData.children( ); var i:int; for(i = 0; i xl.length(); i++) { oTemp = {ID_TAG:xl[i] .ID.text( ), CAT_TAG:xl[i] .CAT.text( ), DET_TAG:xl[i] .DET.text( ), REP_DATE_TAG: xl[i].REP_ DATE.text( ), IND_TAG:xl[i] .IND.text( )}; arrDP.addItem( oTemp); } Now, when I pass back this Array Collection back into a web service, the fields are not in order as I have added them into the array collection. I am expecting that in my Web Service, when I parse this arraycollection (via arraylist), I would be getting the same order of columns as I have added them, i.e. the first array in the array list would have element 0 to be the value I placed in the ID. Since the arraylist does not have the field tag (represented by ID_TAG, DET_TAG, CAT_TAG, etc..), it becomes a trial and error (hit and miss) on my part since I can only reference the value via the index on the array. Now, how would I be able to include the tags inside array collection such that when I read them as an array list in my .NET webservice, I know which element I am referring to in a particular index. Thanks. Regards, Angelo