Re: [flexcoders] Datagrid not updating when dataProvider is changed.
I did some more tests and debuging, and it turns out the dataprovider of the DG does get updated. But, for some reason - the labelFunction still gets the stale data... When viewing the DG code (and it's super, and it's super's super, etc... :)), it turns out that when the dataprovider gets updated, the data is invalidated to be updated in the next frame - and that's the pitfall I was falling into... :( I couldn't find a decent solution to this problem, other than using callLater (which I hate)... Sefi On Fri, Dec 26, 2008 at 6:27 PM, Tracy Spratt tspr...@lariatinc.com wrote: Hmm, in my experience, re-assigning the dataProvider always results in full re-rendering of the DataGrid. See if you can narrow down where the problem is ocurring. Use a bindable var as the dataProvider, or updating the dp in different ways, or not using labelFunction. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Sefi Ninio *Sent:* Thursday, December 25, 2008 2:14 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Datagrid not updating when dataProvider is changed. I'm combining two arrays into a temp arrayCollection and setting the temp source into a new arrayCollection dataProvider = new ArrayCollection(tempAC.source); This dispatched a CellectionEvent.COLLECTION_CHANGED event with kind=reset, and should update the DG... On Wed, Dec 24, 2008 at 7:08 PM, Tracy Spratt tspr...@lariatinc.com wrote: How are you updating the data provider items? If you are using the collection API, like setItemAt(), the necessary events will be dispatched and the DataGrid will visually update. If you are directly assigning propety values to individual items, then you will need to call itemUpdated(item). Tracy -- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Sefi Ninio *Sent:* Wednesday, December 24, 2008 5:02 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Datagrid not updating when dataProvider is changed. Hi all. I have a wierd situation, hopefully someone here can help. I have a DataGrid's dataprovider bound to an myDP ArrayCollection (it is defined as [Bindable]). Each column in the DG has a labelFunction. When I set the myDP values for the first time, everything is sweet, the data is displayed correctly. When I update the myDP with new data, however, everything goes wrong. The labelFunctions still get the stale data (from before the update), and so the grid shows old data. I verified the new data is updated to the DG's dataProvider (added a listener to datagrid for CollectionEvent.COLLECTION_CHANGE - the new data is updated in the DG dataprovider - checked in event's currentTarget). I can't understand why the dataprovider is updated and still the labelFunction's item:Object contain old data... Any ideas anyone? Thanks, Sefi
Re: [flexcoders] Center a Popup window
On Sun, Dec 28, 2008 at 5:13 AM, Dan Vega danv...@gmail.com wrote: I get a compile time error if i do this _renamedir = new RenameDirectory //add modal window PopUpManager.addPopUp(_renamedir,Application.application,true); //center modal window PopUpManager.centerPopUp(_renamedir); *** Implicit coercion of a value with static type object to possibly undefined type flash.display.DisplayObject You'll have to cast it to DisplayObject then. PopUpManager.addPopUp(_renamedir,DisplayObject(Application.application),true); --
[flexcoders] Select Picture from DataBase
Hi, All I am stopped writing code because I have no idea how to select Picture from Database and reflect to FLEX. (I dont even know how to store picture into mySQL) Please help me out!
Re: [flexcoders] Select Picture from DataBase
You can store the image URL in DB (as opposed to the image itself - very inefficient). The image URL to be stored in DB should be RELATIVE to the deployed swf file (i.e. assets/image.jpg assuming the dir that contains the swf also has an 'assets' dir and in it the 'image.jpg' file. Once you do that, it's easy to get the image URL and set the Flex image source to point to it. HTH, Sefi On Sun, Dec 28, 2008 at 3:18 PM, nash.e2008 nash.e2...@yahoo.com wrote: Hi, All I am stopped writing code because I have no idea how to select Picture from Database and reflect to FLEX. (I dont even know how to store picture into mySQL) Please help me out!
Re: [flexcoders] File Uploading
Hello, Did you solve your problem in file uploading, because im having problem too with file upload in flex. Thanks a lot. Cheers. ericbichara wrote: O btw, i get no error message, just a Complete event back in flex /Eric -- View this message in context: http://www.nabble.com/File-Uploading-tp17081739p21193016.html Sent from the FlexCoders mailing list archive at Nabble.com.
RE: [flexcoders] File Uploading
What's the problem you are having? Give a bit more information and we can see if we can help. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of freak182 Sent: 28 December 2008 15:01 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] File Uploading Hello, Did you solve your problem in file uploading, because im having problem too with file upload in flex. Thanks a lot. Cheers. ericbichara wrote: O btw, i get no error message, just a Complete event back in flex /Eric -- View this message in context: http://www.nabble.com/File-Uploading-tp17081739p21193016.html http://www.nabble.com/File-Uploading-tp17081739p21193016.html Sent from the FlexCoders mailing list archive at Nabble.com.
RE: [flexcoders] Proper way of giving thanks?
I think the best payback is in-kind. Contribute to the list by helping someone else. Also, consider future searchers. If you have solved a problem with others help, consider summarizing the solution for the next guy. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of luvfotography Sent: Saturday, December 27, 2008 3:23 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Proper way of giving thanks? Hi, I've received many solutions to my questions here on the list and want to give thanks to those who took time to answer me. Is it proper to give thanks on this list? I'm reluctant too, because it clutters up the list, (just like this post) but I just want to say thanks. Sometimes the private email of the contributor is not available?
RE: [flexcoders] Datagrid not updating when dataProvider is changed.
This is all very normal functionality. If something is not working I would suspect something in your code, of which we have not seen much yet. As I suggested, try narrowing down the conditions. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Sefi Ninio Sent: Sunday, December 28, 2008 3:55 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Datagrid not updating when dataProvider is changed. I did some more tests and debuging, and it turns out the dataprovider of the DG does get updated. But, for some reason - the labelFunction still gets the stale data... When viewing the DG code (and it's super, and it's super's super, etc... :)), it turns out that when the dataprovider gets updated, the data is invalidated to be updated in the next frame - and that's the pitfall I was falling into... :( I couldn't find a decent solution to this problem, other than using callLater (which I hate)... Sefi On Fri, Dec 26, 2008 at 6:27 PM, Tracy Spratt tspr...@lariatinc.com mailto:tspr...@lariatinc.com wrote: Hmm, in my experience, re-assigning the dataProvider always results in full re-rendering of the DataGrid. See if you can narrow down where the problem is ocurring. Use a bindable var as the dataProvider, or updating the dp in different ways, or not using labelFunction. Tracy From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ] On Behalf Of Sefi Ninio Sent: Thursday, December 25, 2008 2:14 AM To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Subject: Re: [flexcoders] Datagrid not updating when dataProvider is changed. I'm combining two arrays into a temp arrayCollection and setting the temp source into a new arrayCollection dataProvider = new ArrayCollection(tempAC.source); This dispatched a CellectionEvent.COLLECTION_CHANGED event with kind=reset, and should update the DG... On Wed, Dec 24, 2008 at 7:08 PM, Tracy Spratt tspr...@lariatinc.com mailto:tspr...@lariatinc.com wrote: How are you updating the data provider items? If you are using the collection API, like setItemAt(), the necessary events will be dispatched and the DataGrid will visually update. If you are directly assigning propety values to individual items, then you will need to call itemUpdated(item). Tracy From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ] On Behalf Of Sefi Ninio Sent: Wednesday, December 24, 2008 5:02 AM To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Subject: [flexcoders] Datagrid not updating when dataProvider is changed. Hi all. I have a wierd situation, hopefully someone here can help. I have a DataGrid's dataprovider bound to an myDP ArrayCollection (it is defined as [Bindable]). Each column in the DG has a labelFunction. When I set the myDP values for the first time, everything is sweet, the data is displayed correctly. When I update the myDP with new data, however, everything goes wrong. The labelFunctions still get the stale data (from before the update), and so the grid shows old data. I verified the new data is updated to the DG's dataProvider (added a listener to datagrid for CollectionEvent.COLLECTION_CHANGE - the new data is updated in the DG dataprovider - checked in event's currentTarget). I can't understand why the dataprovider is updated and still the labelFunction's item:Object contain old data... Any ideas anyone? Thanks, Sefi
RE: [flexcoders] Select Picture from DataBase
Also, storing and retrieving images stored in a DB is often discussed. Google this for meany examples. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Sefi Ninio Sent: Sunday, December 28, 2008 8:25 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Select Picture from DataBase You can store the image URL in DB (as opposed to the image itself - very inefficient). The image URL to be stored in DB should be RELATIVE to the deployed swf file (i.e. assets/image.jpg assuming the dir that contains the swf also has an 'assets' dir and in it the 'image.jpg' file. Once you do that, it's easy to get the image URL and set the Flex image source to point to it. HTH, Sefi On Sun, Dec 28, 2008 at 3:18 PM, nash.e2008 nash.e2...@yahoo.com mailto:nash.e2...@yahoo.com wrote: Hi, All I am stopped writing code because I have no idea how to select Picture from Database and reflect to FLEX. (I dont even know how to store picture into mySQL) Please help me out!
[flexcoders] Need functions like Excel NPV, IRR, NPER
Hi, everybody! I need to find Flex 3 functions to calculate NPV, IRR, and NPER just like in Excel. Are these out there anywhere? I don't want to reinvent the wheel. Thanks! Pete
[flexcoders] Datagrid with timer - what is the best solution?
Hi, I'm really new at flex programming, and I'm trying to implement this custom datagrid component: Column 1 and 2 would display datas based on a arraycollection Column 3 would display a countdown timer, counting from the value of column 1 to 0 When the timer reach 0, the line should be erased from the datagrid (and the arraycollection) What would be the best way to implement that? what do you think about custom datagrid with itemrenderer for the timer column? Could you please just tell me in a few words how the way you would implement such component? Many thanks for your help, Vincy
[flexcoders] background images...
Hi All, I've run into a fairly frustrating problem and my general ignorance of UI stuff is keeping me from making progress. Here's the issue: I have an image in a swf that I want to use as the background image for a floating canvas. If I add it to the canvas as a backgroundImage, then it shows up but at the wrong size (it has scale9 stuff built into the swf, but that seems to do nothing). I need two things. 1. I need the background image to scale to the appropriate size of the window. 2. Portions of the background image have alpha set to 0, so they are invisible. I have a system in place that makes the canvas draggable within some bounds. I would like it if I could make it ignore any interactions with the canvas in areas where the alpha is set to zero. Can this be done with a mask or through some other means and if so, how? Since I was having so much trouble with adding the image as the backgroundImage property/ or as a child in the mxml, I resorted to creating a manager that would call an function init() on the window when all was good to go. The following code was in the init method, and did succeed in resizing the canvas but not to the correct proportions/ also the x y positions of the image are way off from the 0, 0 coordinate of the parent container. here's a little of the code: public override function init():void{ super.init(); if(skinImageSrc != null){ skinImage = new Image(); skinImage.source = skinImageSrc; skinImage.autoLoad = true; skinImage.scaleContent = true; this.addChildAt(skinImage, 0); skinImage.height = this.height; skinImage.width = this.width; } } Any help/suggestions would be greatly appreciated. Thanx, Sam
[flexcoders] DataGrid and XMLListCollection - newbie question
Hi. I am trying to get a very simple datagrid up and going. I need to be able to populate this from an XMLListCollection. This seems very simple, but I am obviously missing the point somewhere in this. It seems that all of the books and online searchs show web services, etc. as source. I need to be able to start at a simpler point. I have tried setting things up both in ActionScript and mxml. The ActionScript is commented out at this point. Either way would be fine. The best would be able to see it work in both ways. The purpose of this snippet is: 1. Initialize the grid with a single row. When the app starts, I have an empty grid. I need to start with a default row in the grid. 2. Allow the user to click the Add Step button to add a new row to the bottom of the grid. 3. Allow the user to click the Clear Steps button to remove all existing rows and then add the default row. 4. Later in the development of this, I will extract the bound data from the grid to create a payment schedule. Here is the code. Thanks! Pete ?xml version=1.0 encoding=utf-8? mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute applicationComplete=initApp() mx:Script ![CDATA[ import mx.collections.XMLListCollection; /* [Bindable] public var gridData:XMLListCollection; private const gridInitXML:XML = Steps Step Payments=1 Amount=100 / /Steps ; */ private function initApp():void{ // initialize the data grid // gridData = new XMLListCollection( ); // gridData.addItem( gridInitXML ); } private function handleAddStep():void { gridData.addItem(gridInitXML); } private function handleClearSteps():void { gridData.removeAll(); gridData.addItem(gridInitXML); } ]] /mx:Script mx:XMLListCollection id=gridData source={Steps} / mx:XMLList id=Steps xmlns= Step Payments=1 Amount=100 / /mx:XMLList mx:XML id=gridInitXML Steps Step Payments=1 Amount=100 / /Steps /mx:XML mx:Button x=10 y=10 label=Add Step width=86 id=btnAddStep click=handleAddStep() / mx:Button x=114 y=10 label=Clear Steps width=96 id=btnClearSteps click=handleClearSteps()/ mx:DataGrid id=dgSteps editable=true enabled=true dataProvider={gridData} x=10 y=38 width=200 height=190 mx:columns mx:DataGridColumn headerText=Payments dataField=Payments width=75 textAlign=right/ mx:DataGridColumn headerText=Amount dataField=Amount textAlign=right/ /mx:columns /mx:DataGrid /mx:WindowedApplication
[flexcoders] WEB-INF/flex folder must contain either flex-config.xml or services-config.xml
Greetings all, I'm trying to create a new Flex project that connects to ColdFusion via AMF. In the 2nd screen of the new project wizard, when I uncheck use default location for coldfusion server, I enter this: C:\JRun4\servers\cfusion\cfusion-ear\cfusion-war I'm running CF8 multi-instance in this case. Underneath that directory is indeed a WEB-INF/flex directory with the flex-config.xml and services-config.xml, among other files. However, when I hit validate, I get Invalid root. The WEB-INF/flex folder must contain either flex-config.xml or services-config.xml. I'm stumped. I've tried it on two computers with the same result. Now, if I create a flex project without specifying a server technology, then add the path to the services-config.xml file in the compiler options, AMF remoting between Flex and CF does work fine. Mainly, I'm just curious why flexbuilder isn't cooperating in this case or, if in fact I'm doing something wrong. Thanks a lot. Marc
[flexcoders] AS3- error adding datagrid column itemrenderer
I have an actionscript 3 class that defines columns in a datagrid and then dynamicaly updates the datagrid with the new columns. It works fine until I try to add a column with a itemrenderer it gives me an error: Implicit coercion of a value of type Class to an unrelated type mx.core:IFactory. Here is the offending code: _categoryColumn.dataField = category; _categoryColumn.headerText = Categroy; _categoryColumn.width = 80; _categoryColumn.editable = true; _categoryColumn.editorDataField = value; _categoryColumn.itemRenderer = gridCombo; * error line gridCombo is a combobox component. Thanks Lawdog
[flexcoders] unload module but flexmodulefactory remains ?
hm i have this sample app where it simples loads/unloads a simple module.. when executing in profiler the instance of the module a gets removed without a problem.. but the instance of _a_mx_core_flexmodulefactory only goes up.. when first start the app the instance of _a_mx_core_flexmodulefactory is 1.. if i remove the module.. the instance of a goes to 0 but the flexmodulefactory instance doesnt.. if i keep on adding and removing the module the flexmodulefactory instance never goes down... in a larger app this will be a problem.. anyone knows whats wrong here ? app: ?xml version=1.0 encoding=utf-8? mx:Application creationComplete=init() xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.events.ModuleEvent; import mx.modules.ModuleManager; import mx.modules.IModuleInfo; public var info:IModuleInfo; public var xi:Module; private function init():void { info = ModuleManager.getModule(a.swf); info.addEventListener(ModuleEvent.READY, modEventHandler); info.load(); } private function modEventHandler(e:ModuleEvent):void { xi = info.factory.create() ; addChild(xi); } public function remove():void { removeChild(xi); info.unload(); info = null; xi=null; } ]] /mx:Script mx:Button x=200 y=176 id=lasal label=add click=init()/ mx:Button x=486 y=176 id=laal label=remove click=remove()/ /mx:Application module: ?xml version=1.0 encoding=utf-8? mx:Module remove=parentApplication.setFocus() xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute width=400 height=300 mx:TextInput id=la /mx:TextInput /mx:Module
[flexcoders] Sprite based control
Hi, I'm making a graphical control that involves programmatically drawn sprites that appear, disappear, and change color according to user input. I think I can bang this out but before getting too far I wanted to see if there are any examples I can look to for smart practices. Thanks a lot to anyone who can get me going on the right track for a graphical custom component.
[flexcoders] mx:List and mouse wheel scroll
Hi All, I am a complete noob to Flex and I am trying to figure out which property of the List control allows for mouse wheel scrolling. If this isn't a property, any idea how to implement mouse wheel scrolling when a vertical scroll bar is present? I have searched for this, but am coming up dry for some reason. Maybe I am asking the question incorrectly Thanks for your help! -Hunter
Re: [flexcoders] Center a Popup window
Manish, faultCode:Client.Error.MessageSend faultString:'Send failed' faultDetail:'Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://localhost:8080/billing/messagebroker/amf'' I have attached my files: From: Manish Jethani manish.jeth...@gmail.com To: flexcoders@yahoogroups.com Sent: Saturday, December 27, 2008 4:33:12 PM Subject: Re: [flexcoders] Center a Popup window On Sun, Dec 28, 2008 at 2:52 AM, Dan Vega danv...@gmail. com wrote: This is my example. I am not creating one as it is already available, just trying to add it and center it. _renamedir = new RenameDirectory //add modal window PopUpManager. addPopUp( _renamedir, this,true) ; //center modal window PopUpManager. centerPopUp( _renamedir) ; You don't seem to be using Application. application as the parent? -- Visit me at manishjethani. com ?xml version=1.0 encoding=UTF-8? services-config services service-include file-path=flex/remoting-config.xml / default-channels channel ref=myamf/ channel ref=my-secure-amf/ /default-channels /services channels channel-definition id=myamf class=mx.messaging.channels.AMFChannel endpoint url=http://{server.name}:{server.port}/{context.root}/messagebroker/amf; class=flex.messaging.endpoints.AMFEndpoint/ properties polling-enabledfalse/polling-enabled /properties /channel-definition channel-definition id=my-secure-amf class=mx.messaging.channels.SecureAMFChannel endpoint url=https://localhost:8080/billing/messagebroker/amfsecure; class=flex.messaging.endpoints.SecureAMFEndpoint/ properties !-- polling-enabledfalse/polling-enabled-- add-no-cache-headersfalse/add-no-cache-headers /properties /channel-definition /channels logging !-- You may also use flex.messaging.log.ServletLogTarget -- target class=flex.messaging.log.ConsoleTarget level=Error properties prefix[BlazeDS]/prefix includeDatefalse/includeDate includeTimefalse/includeTime includeLeveltrue/includeLevel includeCategoryfalse/includeCategory /properties filters patternEndpoint.*/pattern patternService.*/pattern patternConfiguration/pattern /filters /target /logging system manageablefalse/manageable redeploy enabledtrue/enabled watch-interval20/watch-interval watch-file{context.root}/WEB-INF/services-config.xml/watch-file watch-file{context.root}/WEB-INF/proxy-config.xml/watch-file watch-file{context.root}/WEB-INF/remoting-config.xml/watch-file watch-file{context.root}/WEB-INF/messaging-config.xml/watch-file touch-file{context.root}/WEB-INF/web.xml/touch-file /redeploy /system factories factory id=spring class=com.billing.customer.flex.client.SpringFactory/ /factories /services-config?xml version=1.0 encoding=UTF-8? web-app version=2.4 xmlns=http://java.sun.com/xml/ns/j2ee; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation=http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd; context-param param-namecontextConfigLocation/param-name param-value /WEB-INF/billing-service.xml, /WEB-INF/billing-servlet.xml /param-value /context-param listener listener-class org.springframework.web.context.ContextLoaderListener /listener-class /listener servlet servlet-namebilling/servlet-name servlet-class org.springframework.web.servlet.DispatcherServlet /servlet-class load-on-startup2/load-on-startup /servlet servlet servlet-nameMessageBrokerServlet/servlet-name servlet-classflex.messaging.MessageBrokerServlet/servlet-class init-param param-nameservices.configuration.file/param-name param-value/WEB-INF/services-config.xml/param-value /init-param load-on-startup75/load-on-startup /servlet !--servlet servlet-namebilling/servlet-name servlet-class com.billing.customer.CustomerDetails /servlet-class /servlet -- servlet-mapping servlet-namebilling/servlet-name url-pattern*.html/url-pattern /servlet-mapping!-- servlet-mapping servlet-namebilling/servlet-name url-pattern/billing/url-pattern /servlet-mapping servlet-mapping servlet-nameMessageBrokerServlet/servlet-name url-pattern/messagebroker/*/url-pattern /servlet-mapping --/web-app
[flexcoders] Getting TabNavigator to Release Focus
I'm running into a issue with the tabnavigator. Basically, I am building an AIR app that saves the user's history into a SQLite table. One of the items that is getting saved is the tab the user was last on. The problem is that when I return the user to that tab it refuses to release focus. Since this tab contains a text area, pressing space while typing in the text area switches tabs. Now if I manually navigate to this tab, it works fine -- no switching on space when typing. It is only when the tab is automatically selected upon launch that this happens. Has anyone seen this before? Thanks, Shawn
Re: [flexcoders] Re: Embedding HTML page into Flex using Adobe AIR
Hi Siva, If you know the link you are trying to download you can just parse the straight html text, get the link, then submit a URLRequest for it. If the user is browsing to arbitrary pages and clicking arbitrary things, you can do a hack solution by parsing every page he lands on then when you detect a mouseclick (not sure if this is possible within the HTMLRenderer, but if it's not you can render an invisible Sprite over it and detect mouseClick), then presenting a little dialog with all the possible a href's that you parsed out for the user to select... Also, If it's a straight a href tag and not some server side script that's serving up the file, I think the HTMLRenderer's location property changes to the file URL (blah.zip) when user clicks, so when you detect non-web extensions in the HTMLRenderer just initiate a URLRequest for it... hope that helps, Lushen On 12/23/2008 11:04 PM, shiv_indian wrote: Hi Alex, This is one of requirement from our customer. Is there any alternative for ExternalInterface or is there any feature in mx:HTML tag to download files / attachments. Thanks Regards, Siva Kumar --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com, Alex Harui aha...@... wrote: If the embedded HTML contains Javascript that is trying to use ExternalInterface, that won't work, but I don't understand why you would need that to download a file. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com] On Behalf Of shiv_indian Sent: Tuesday, December 23, 2008 2:35 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Embedding HTML page into Flex using Adobe AIR Hi, This is Siva Kumar. Need help in embedding an HTML in Flex . We are using Adobe Air using Flex. To embed an HTML in Flex we used mx:HTML tag. Its working fine but whts the problem is its not allowing to download files / attachements. To download attachments do I need to change any files in flex. I tried to use google flex iframes to resolve this issue. I am able to download files/attachments if I open application as web / standalone. If I try to open same application using adobe air its giving error like ExternalInterface is not available in this container. Internet Explorer ActiveX, Firefox, Mozilla 1.7.5 and greater, or other browsers that support NPRuntime are required. . Later wht I found is at present ExternalInterface is not supporting adobe air. Could anybody help me to resolve this issue. If anybody has any idea on how to overcome this issue. Please suggest me to resolve this issue. Thanks in Advance.
Re: [flexcoders] Re: How to know which DisplayObjects are underneath another?
you can check for overlapping circles (naively) with hitTest for each circle to all the otherones. whenever there's overlap, call var rect:Rectangle = getRect() for both objects. if one of them has a lower X and lower Y AND its rect.right and rect.bottom are greater than the other one, hide the other one... On 12/24/2008 2:07 PM, huhgawz wrote: Thanks for you fast response. Your suggestion works but it is not what I'm looking for. I'm sorry I guess I didn't explain well. So here I come again: Taking into account my previous example (the one with a Canvas and multiple Circles positioned randomly)...I need to hide all those Circles that are totally overlapped by other Circles. Could someone help me with this? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com, Lushen Wu l...@... wrote: huhgawz, I think most UIComponents subclass DisplayObjectContainer, which has a method getChildIndex #getChildIndex%28%29(child:DisplayObject ../../flash/display/DisplayObject.html):int ../../int.html so call this to find the child index (basically z-order) of the lowest-ordered circle you want to have visible, then iterate all the Children underneath that index using the property numChildren and method getChildAt #getChildAt%28%29(index:int ../../int.html):DisplayObject ../../flash/display/DisplayObject.html and set them visible=false ref: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObjectContainer.html http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/display/DisplayObjectContainer.html Hope that helps.. Lushen On 12/24/2008 12:50 PM, huhgawz wrote: Let's say you have a /Canvas/ in which you create multiple instances of a /Circle/ randomly positioned. Then you want to know which /Circles/ are underneath the top most /Circle/ (talking in /z-order/ terms) in order to hide them all. Could you share an example of this? I would really appreciate any guidance
Re: [flexcoders] unload module but flexmodulefactory remains ?
info.removeEventListener(ModuleEvent. READY, modEventHandler)?? before setting it to null HTH, Claudiu From: rockorgames eguilhe...@gmail.com To: flexcoders@yahoogroups.com Sent: Saturday, December 27, 2008 9:20:13 PM Subject: [flexcoders] unload module but flexmodulefactory remains ? hm i have this sample app where it simples loads/unloads a simple module.. when executing in profiler the instance of the module a gets removed without a problem.. but the instance of _a_mx_core_flexmodu lefacto ry only goes up.. when first start the app the instance of _a_mx_core_flexmodu lefacto ry is 1.. if i remove the module.. the instance of a goes to 0 but the flexmodulefactory instance doesnt.. if i keep on adding and removing the module the flexmodulefactory instance never goes down... in a larger app this will be a problem.. anyone knows whats wrong here ? app: ?xml version=1.0 encoding=utf- 8? mx:Application creationComplete= init() xmlns:mx=http: //www.adobe. com/2006/ mxml layout=absolute mx:Script ![CDATA[ import mx.events.ModuleEve nt; import mx.modules.ModuleMa nager; import mx.modules.IModuleI nfo; public var info:IModuleInfo; public var xi:Module; private function init():void { info = ModuleManager. getModule( a.swf); info.addEventListen er(ModuleEvent. READY, modEventHandler) ; info.load(); } private function modEventHandler( e:ModuleEvent) :void { xi = info.factory. create() ; addChild(xi) ; } public function remove():void { removeChild( xi); info.unload( ); info = null; xi=null; } ]] /mx:Script mx:Button x=200 y=176 id=lasal label=add click=init( )/ mx:Button x=486 y=176 id=laal label=remove click=remove( )/ /mx:Application module: ?xml version=1.0 encoding=utf- 8? mx:Module remove=parentAppli cation.setFocus( ) xmlns:mx=http: //www.adobe. com/2006/ mxml layout=absolute width=400 height=300 mx:TextInput id=la /mx:TextInput /mx:Module
Re: [flexcoders] Center a Popup window
On Sun, Dec 28, 2008 at 5:40 AM, sundaramoorthy kanagarajan sunmoort...@yahoo.com Manish, faultCode:Client.Error.MessageSend faultString:'Send failed' faultDetail:'Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://localhost:8080/billing/messagebroker/amf'' I'm not sure what web services has to do with centering a pop-up! Can you elaborate a bit, please? If this is not related to the original question, please start a new thread. Manish
Re: [flexcoders] AS3- error adding datagrid column itemrenderer
On Sat, Dec 27, 2008 at 2:10 PM, wcso_lawdog char...@mapyours.com wrote: _categoryColumn.itemRenderer = gridCombo; * error line See if this works: import mx.core.ClassFactory; _categoryColumn.itemRenderer = new ClassFactory(gridCombo); Manish
[flexcoders] MySql timestamp column type and Flex DateField
How do I tie a DateField control to a Value Object with a Timestamp column in the database. I am getting java.lang.IllegalArgumentException: Timestamp format must be -mm-dd hh:mm:ss.f at java.sql.Timestamp.valueOf(Unknown Source) at com.corent.odicx.goms.dao.OrdersVO.setEvent_Date(OrdersVO.java:93) the DateField format string only modifies the display. the selectedDate output doesn't seem to have any methods that take a format string to format for Timestamp. I suppose I could just pull the year month and day out of the selected date and format my own string but that seems like a waste and I am basically lazy. anybody have a cool way to handle this? Ollie -- View this message in context: http://www.nabble.com/MySql-timestamp-column-type-and-Flex-DateField-tp21196170p21196170.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] DataGrid - create dynamic columns
Is it possible to completely skip datagrid column design and generate all columns as dynamic using dataProvider assigning mechanism? So, this XML sample: root row col11/col1 col22/col2 col33/col3 /row row col14/col1 col25/col2 col36/col3 /row root Will create: --- col1|col2|col3| --- 1 |2 |3 | 4 |5 |6 | --- Or I have to create columns at run-time parsing some data and then assign dataProvider with actual data? Later is what I do now, but I was wondering what others do with showing dataGrids that have dynamic structure. Thanks
[flexcoders] DataGrid Sorting
Hi.. I have CheckBox as an itemrenderer. and a custom sorting function for one another column. But once I sort that another column and after that try to use checkbox(to select items), why every selection of checkbox make a call to that custom sorting function?? Can anyone please explain me about it and a solution for that also. Thanks. -- View this message in context: http://www.nabble.com/DataGrid-Sorting-tp21198139p21198139.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Make Enter work as Tab in Flex DataGrid
Hello! I'm trying to make Enter work the same as Tab in a DataGrid - commit changes to the edited cell and move focus to the next one to the right, then next row, etc. I've tried to use something like: focusManager.getNextFocusManagerComponent(true).setFocus(); or focusManager.moveFocus(FocusRequestDirection.FORWARD); but I cannot seem to make it work in a DataGrid... Any help would be much appreciated! Thank you! Sergey
[flexcoders] Re: unload module but flexmodulefactory remains ?
OMG.. my application was configured for req flash 10.0.0 at the compiler settings.. after i put 9.0.0 as required flash app.. this didnt happened anymore and the flexmodulefactory was unloading correctly... WTH ? does it make any diff the req flash version ? (since i have fp 10 installed already) is this a fp10 bug ? anyone ?
[flexcoders] following error BlazeDs integration
faultCode:Client.Error.MessageSend faultString:'Send failed' faultDetail:'Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://localhost:8080/billing/messagebroker/amf''
[flexcoders] Flex 3.1 vs 3.2 and Class Loading
I had developed an application consisting on multiple modules. In order to overcome some class loading issues, I used Shared Code Module to load classes upon startup of the application. I tried using the 3.2 SDK and what once worked for 3.1 does not work for 3.2. Does anyone know what has changed in 3.2 in this regard? Thanks
RE: [flexcoders] File Uploading
Hello, Thank you for your help...I just found nice flex uploading here: http://weblog.cahlan.com/files/file_uploads/FileUpload.html...they use php for server side ...actually it works but it gives me IOError #2038 ...im using servlet to upload file and my server is embeded jetty server run using mvn jetty:run-war. Is there any workaround with this? Thanks a lot Cheers Gregor Kiddie wrote: What's the problem you are having? Give a bit more information and we can see if we can help. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of freak182 Sent: 28 December 2008 15:01 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] File Uploading Hello, Did you solve your problem in file uploading, because im having problem too with file upload in flex. Thanks a lot. Cheers. ericbichara wrote: O btw, i get no error message, just a Complete event back in flex /Eric -- View this message in context: http://www.nabble.com/File-Uploading-tp17081739p21193016.html http://www.nabble.com/File-Uploading-tp17081739p21193016.html Sent from the FlexCoders mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/File-Uploading-tp17081739p21198780.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] counting Pixel of Hbox when child added dynamically
How to calculate pixels occupied by HBox when children are added dynamically?. Thanks, with Regards, Jitendra Jain Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/