[flexcoders] Capturing URL Requests in AIR application (HTML/HTMLLoader/HTMLHost)
Hi, This post is quite lengthy, but I really need to explain in detail what it is I'm trying to achieve here. I am developing an AIR application that has an mx.controls.HTML component as the only child; in essence the application is a custom web browser in AIR. I have created a custom HTMLHost component that extends the flash.html.HTMLHost class per the Adobe documentation, so that my application can intercept particular JavaScript calls; i.e. (AS)createWindow() - (JS)window.open(). The main HTML component has its htmlHost property set to an instance of this CustomHTMLHost class, and every new window that is created via the createWindow() method also has its htmlHost set to an instance of the CustomHTMLHost class. In my CustomHTMLHost class, I also override the updateLocation(locationURL:String) method, enabling me to inspect the new URL that is being set on either the main HTML component, or any popup windows that are created. The web application I am loading into the main HTML component allows users to export reports in a number of formats (HTML, PDF, XLS, CSV, TXT) which can either be opened or downloaded when using a conventional browser (IE/FF/Safari). When the user exports a report, a popup window is displayed (which works fine with my application because of the overridden createWindow() method in the CutsomHTMLHost class). After the user clicks the final Export button on a PDF/HTML/TXT export, everything works fine and the report results are displayed as the AIR runtime can handle these files. However when the user exports to XLS/CSV nothing happens, which is expected because the AIR runtime does not support those file types. I intend to create a file download manager to handle this so that the user can just save the files to their local file system, and this is where I'm hitting a brick wall. I am able to capture the URL that is being requested to get these latter export types from the overridden updateLocation(locationURL:String) method in the CustomHTMLHost class, but the URL alone is not enough information for the AIR application to send to the web application that provides the report exporting functionality. I need to get access to the rest of the header information (such as POST variables, and also the cookie information) that is sent in the HTTP request when the final Export button is clicked by the user to ensure I am getting a valid response from the web application. So, to finally get to my main question... is there any way to intercept the URLRequests that are created and invoked from a HTML/HTMLHost component? What I really want to be able to do is to inspect the HTTP responses, so that I can determine content of the HTTP response i.e. Content-Disposition: filename*=Report.xls; Content-Type: application/vnd.ms-excel; charset=UnicodeLittle With this information I can let my AIR application display a save file dialog or something along those lines. Sorry for the long post, and any help would be appreciated as this is a critical part of my AIR application, and I REALLY need to figure this out. I understand that the approach I am proposing may not even be possible, as I have been doing a number of things to try and solve it. One of which was extending the HTMLLoader class and overriding the load(urlRequestToLoad:URLRequest) method to I could intercept all URLRequests, but I couldn't even get the HTML component that used this class as its htmlLoader property to load any HTML content. Thanks in advance, Barry
[flexcoders] Re: Capturing URL Requests in AIR application (HTML/HTMLLoader/HTMLHost)
Yes your kind of right, what i think i really need to do is extend the HTMLLoader class so that i can override the load(urlRequestToLoad:URLRequest) method. I have tried this and get similar results to the user from this post (http://tech.groups.yahoo.com/group/apollocoders/message/2900), the new extended HTMLLoader is not visible on the stage. Is it even possible to extend the HTMLLoader class? --- In flexcoders@yahoogroups.com, Wesley Acheson wesley.ache...@... wrote: Is it not the responseHeaders that you need? on the following object http://livedocs.adobe.com/flex/3/langref/flash/events/HTTPStatusEvent.html Regards, Wesley Acheson On Wed, Aug 19, 2009 at 12:54 PM, Barry Evans bazza...@... wrote: Hi, This post is quite lengthy, but I really need to explain in detail what it is I'm trying to achieve here. I am developing an AIR application that has an mx.controls.HTML component as the only child; in essence the application is a custom web browser in AIR. I have created a custom HTMLHost component that extends the flash.html.HTMLHost class per the Adobe documentation, so that my application can intercept particular JavaScript calls; i.e. (AS)createWindow() - (JS)window.open(). The main HTML component has its htmlHost property set to an instance of this CustomHTMLHost class, and every new window that is created via the createWindow() method also has its htmlHost set to an instance of the CustomHTMLHost class. In my CustomHTMLHost class, I also override the updateLocation(locationURL:String) method, enabling me to inspect the new URL that is being set on either the main HTML component, or any popup windows that are created. The web application I am loading into the main HTML component allows users to export reports in a number of formats (HTML, PDF, XLS, CSV, TXT) which can either be opened or downloaded when using a conventional browser (IE/FF/Safari). When the user exports a report, a popup window is displayed (which works fine with my application because of the overridden createWindow() method in the CutsomHTMLHost class). After the user clicks the final Export button on a PDF/HTML/TXT export, everything works fine and the report results are displayed as the AIR runtime can handle these files. However when the user exports to XLS/CSV nothing happens, which is expected because the AIR runtime does not support those file types. I intend to create a file download manager to handle this so that the user can just save the files to their local file system, and this is where I'm hitting a brick wall. I am able to capture the URL that is being requested to get these latter export types from the overridden updateLocation(locationURL:String) method in the CustomHTMLHost class, but the URL alone is not enough information for the AIR application to send to the web application that provides the report exporting functionality. I need to get access to the rest of the header information (such as POST variables, and also the cookie information) that is sent in the HTTP request when the final Export button is clicked by the user to ensure I am getting a valid response from the web application. So, to finally get to my main question... is there any way to intercept the URLRequests that are created and invoked from a HTML/HTMLHost component? What I really want to be able to do is to inspect the HTTP responses, so that I can determine content of the HTTP response i.e. Content-Disposition: filename*=Report.xls; Content-Type: application/vnd.ms-excel; charset=UnicodeLittle With this information I can let my AIR application display a save file dialog or something along those lines. Sorry for the long post, and any help would be appreciated as this is a critical part of my AIR application, and I REALLY need to figure this out. I understand that the approach I am proposing may not even be possible, as I have been doing a number of things to try and solve it. One of which was extending the HTMLLoader class and overriding the load(urlRequestToLoad:URLRequest) method to I could intercept all URLRequests, but I couldn't even get the HTML component that used this class as its htmlLoader property to load any HTML content. Thanks in advance, Barry -- 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: Dual DataService components causing problems
Thanks for that Seth, its definately a step in the right direction. I have now removed the fds.swc from the module project's build path but i am getting a few compilation errors on VO classes i have defined to be used in the managed collection of objects... 1045: Interface IManaged was not found I think this is why i had to add the fds.swc to the project in the first place. Thanks again for your suggestions and if you can think of anything else i would appreciate it. Barry --- In flexcoders@yahoogroups.com, Seth Hodgson [EMAIL PROTECTED] wrote: Hi Barry, You need to only link the classes defined in fds.swc into your root application swf, and your modules need to rely on those class definitions rather than each of them individually containing duplicate class defs from fds.swc. I'm not a modules guru, but take a look at the 'Controlling module size' section here: http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/wwh elp.htm?context=LiveDocs_Book_Partsfile=modular_083_4.html Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Barry Evans Sent: Friday, May 02, 2008 10:35 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Dual DataService components causing problems Hi, i have developed a modularised application in Flex 2.0.1 (hotfix 1) and im having some problems with the DataService tag. I have a module in the application's side bar which fills a collection with managed objects, and i also have a module in the main application area which fills a collection with managed objects. Each module uses different assembler classes/destinations configured in the data-management-config.xml file. When i perform a fill on the each collection, and then attempt to perform another fill on the side bar module, i keep getting errora from the flash player log file. The collection in the main application area always refreshes without any problems The error from flex... TypeError: Error #1034: Type Coercion failed: cannot convert mx.data.messages::[EMAIL PROTECTED] to mx.data.messages.SequencedMessage. at mx.data::DataList/http://www.adobe.com/2006/flex/mx/internal::processS equenceResult() [C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\DataLi st.as:1760] at DataListRequestResponder/result() [C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\Concre teDataService.as:5857] at mx.rpc::AsyncRequest/acknowledge() [E:\dev\flex_201_borneo\sdk\frameworks\mx\rpc\AsyncRequest.as:81] at NetConnectionMessageResponder/resultHandler() [E:\dev\flex_201_borneo\sdk\frameworks\mx\messaging\channels\NetConnec tionChannel.as:427] at mx.messaging::MessageResponder/result() [E:\dev\flex_201_borneo\sdk\frameworks\mx\messaging\MessageResponder.a s:202] Any help would be greatly appreciated as i am hitting a brick wall, everything was working before, but i can't figure out what changes i might have made to cause these issues. Barry
[flexcoders] Re: Dual DataService components causing problems
Ok i managed to get the problem sorted. All i had to do was create a dummy instance of the mx.data.messages.SequencedMessage class in the main application. Previously, I had to do this will alot of my own AS classes (and a few from the Flex framework), but now i am using an RSL (where most of the classes exist) it was not necessary to create any of the dummy instances of the classes... or so i thought! Well that seems to be the problem solved, thanks for your pointers Seth/Gregor. Barry --- In flexcoders@yahoogroups.com, Barry Evans [EMAIL PROTECTED] wrote: Hi, i have developed a modularised application in Flex 2.0.1 (hotfix 1) and im having some problems with the DataService tag. I have a module in the application's side bar which fills a collection with managed objects, and i also have a module in the main application area which fills a collection with managed objects. Each module uses different assembler classes/destinations configured in the data-management-config.xml file. When i perform a fill on the each collection, and then attempt to perform another fill on the side bar module, i keep getting errora from the flash player log file. The collection in the main application area always refreshes without any problems The error from flex... TypeError: Error #1034: Type Coercion failed: cannot convert mx.data.messages::[EMAIL PROTECTED] to mx.data.messages.SequencedMessage. at mx.data::DataList/http://www.adobe.com/2006/flex/mx/internal::processS equenceResult() [C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\DataLi st.as:1760] at DataListRequestResponder/result() [C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\Concre teDataService.as:5857] at mx.rpc::AsyncRequest/acknowledge() [E:\dev\flex_201_borneo\sdk\frameworks\mx\rpc\AsyncRequest.as:81] at NetConnectionMessageResponder/resultHandler() [E:\dev\flex_201_borneo\sdk\frameworks\mx\messaging\channels\NetConnec tionChannel.as:427] at mx.messaging::MessageResponder/result() [E:\dev\flex_201_borneo\sdk\frameworks\mx\messaging\MessageResponder.a s:202] Any help would be greatly appreciated as i am hitting a brick wall, everything was working before, but i can't figure out what changes i might have made to cause these issues. Barry
[flexcoders] Dual DataService components causing problems
Hi, i have developed a modularised application in Flex 2.0.1 (hotfix 1) and im having some problems with the DataService tag. I have a module in the application's side bar which fills a collection with managed objects, and i also have a module in the main application area which fills a collection with managed objects. Each module uses different assembler classes/destinations configured in the data-management-config.xml file. When i perform a fill on the each collection, and then attempt to perform another fill on the side bar module, i keep getting errora from the flash player log file. The collection in the main application area always refreshes without any problems The error from flex... TypeError: Error #1034: Type Coercion failed: cannot convert mx.data.messages::[EMAIL PROTECTED] to mx.data.messages.SequencedMessage. at mx.data::DataList/http://www.adobe.com/2006/flex/mx/internal::processS equenceResult() [C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\DataLi st.as:1760] at DataListRequestResponder/result() [C:\depot\flex\branches\enterprise_bridgeman\frameworks\mx\data\Concre teDataService.as:5857] at mx.rpc::AsyncRequest/acknowledge() [E:\dev\flex_201_borneo\sdk\frameworks\mx\rpc\AsyncRequest.as:81] at NetConnectionMessageResponder/resultHandler() [E:\dev\flex_201_borneo\sdk\frameworks\mx\messaging\channels\NetConnec tionChannel.as:427] at mx.messaging::MessageResponder/result() [E:\dev\flex_201_borneo\sdk\frameworks\mx\messaging\MessageResponder.a s:202] Any help would be greatly appreciated as i am hitting a brick wall, everything was working before, but i can't figure out what changes i might have made to cause these issues. Barry
[flexcoders] Re: ModuleLoader erratically loading modules
Can i ask if you are loading the same module into each 'stub'? i.e. do you have a multi-purpose module that is loaded 4 times (SubmissionModule.swf)? I had a problem with loading a single multi-purpose module more than once. I was dynamically loading n modules that contained a number of hyperlinks. The problem was that the 2nd module was being loaded before the 1st one was ready, resulting in the 1st module being garbage collected, and therefore never loading. Let me know if this helps. Barry --- In flexcoders@yahoogroups.com, jamison_wilde [EMAIL PROTECTED] wrote: I'm having a lot of issues with ModuleLoader only occasionally loading my modules. At first I thought maybe it was that I couldn't have the module open in more than one tab at a time in my browser, as this seemed to help a little. But it seems more like there is a basic problem with loading multiple modules at once. Basically in my main mxml I have: mx:Canvas id=views_canvas x=10 views:PrizesStub id=prizes visible=false / views:Home id=home visible=false/ views:ListStub id=list visible=false / views:SubmissionStub id=submission visible=false / /mx:Canvas where the stubs are stub components for the modules, so they can hold data that might be needed before the module is loaded. One of my stubs looks like: ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; mx:ModuleLoader id=module url=views/SubmissionModule.swf / /mx:Canvas That's pretty much it. The SubmissionModule will only load once every 4 or 5 times I debug. I've tried adding unique identifiers to the url like: mx:ModuleLoader id=module url={'views/SubmissionModule.swf?uid=' + new Date().getTime()} / but that doesn't seem to help. The ready event never fires when it doesn't work. The only thing I can think of is that it is loading all of the Modules at once(once the main swf has loaded) even though the views that contain them aren;t visible. Is there some reason that shouldn't happen or would cause a problems?
[flexcoders] Adding a non-inline creationComplete event handler
Hi, i am having serious memory leak problems whilst using modules in flex. The module-based application i am currently developing currently over time kills the browser its loaded in. Even when i attempt to load the simplest of modules (a module with a few buttons/empty datagrids) my flex app will eventually make IE/Firefox fall over after consuming about 650-700MB of RAM. I have been reading Grant Skinner's posts on memory management and weak reference techniques with regards to Flex/Flash player but i am still having big problems. I am also attempting to figure out how to add a creationComplete event handler on a module via actionscript. If i use the inline mxml approach, a strong reference will be created, and i will never be able to destroy it, resulting in the module never being removed from memory! Any advice and/or comments would be most appreciated, as i am hitting brick walls here and i need to progress with haste. Thanks, Barry
[flexcoders] Re: ModuleLoader 'SWF is not a loadable module' Error
I'm tired of hacking with this issue. Unfortunately, I haven't found a way to really fix this. :( Mark On Dec 10, 2007 5:42 PM, Alex Harui [EMAIL PROTECTED] wrote: GC = garbage collection. W/o a hard reference, the memory manager could remove your module. ModuleLoader should be ok hanging on to it. It might be possible that if you start two loads of the same swf that the second one doesn't finish. Not sure how to prove that. I would try to make the smallest possible test case that can reproduce the error. -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Barry Evans *Sent:* Monday, December 10, 2007 1:47 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: ModuleLoader 'SWF is not a loadable module' Error Sorry, i forgot to say i'm using flex 2.0.1. And as for a hard reference, i am creating a number of ModuleLoader components within a repeater, so the url of the loaded module is dynamic in nature. What do you mean by a GC? The weird thing in this situation is that i have another module which displays links and is very close in nature to the one giving me problems, however it never produces any errors. I use the problematic module on more than one occassion i.e. when the app loads up, the links module is loaded twice. Its only means of consistently is that it fails both times it loads (in a single application instance). I am also passing data to the module (on the moduleReady event) using a custom Interface, i wonder if this would have any affect? I followed the Adode dev guide on how to pass data to the module, so im not sure this is where the problem stems from, but i thought i would mention this. The only other issue that comes to mind is the sequence in which the modules are loaded, but i havent had a chance to apply the ModuleLoader's urls manually, and i dont even think this would be the problem, just a thought. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Alex Harui aharui@ wrote: Which version of Flex? Are you keeping a hard reference to the module? Otherwise, a GC can kick it out just as it finishes loading. From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of Barry Evans Sent: Monday, December 10, 2007 9:50 AM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Re: ModuleLoader 'SWF is not a loadable module' Error No, this is not the case im afraid. Sometimes the module loads perfectly and the application is fine, but sometimes the application throws the error i mentioned in the first post. I catch the main error being thrown by the module loader ('SWF is not a loadable module'), but when this occurs the ModuleManager.as class (from the Flex framework) always throws an error at line 669: The code at this line is: moduleEvent.bytesLoaded = loader.contentLoaderInfo.bytesLoaded; I have changed the code in ModuleManager.as to now point to the correct object - the event.currentTarget.loader property - (so that a null pointer error is not thrown): moduleEvent.bytesLoaded = event.currentTarget.loader.contentLoaderInfo.bytesLoaded; I am not sure how to compile the application (or perhaps rebuild the framework.swc file with the new source code) with the changes Either way, the module is not loading properly in a consistent manner, and i am totally confused as to how this would be happening. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders% flexcoders%25 40yahoogroups.com , Alex Harui aharui@ wrote: is it possible it isn;t a module From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders% flexcoders%25 40yahoogroups.com [mailto:flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders% flexcoders%25 40yahoogroups.com ] On Behalf Of Barry Evans Sent: Monday, December 10, 2007 3:51 AM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com mailto: flexcoders% flexcoders%25 40yahoogroups.com Subject: [flexcoders] ModuleLoader 'SWF is not a loadable module' Error I am having a problem with a modularised application i am developing. I am using modules to load a user-customised application and i am getting intermittent errors when loading a certain module (SWF is not a loadable module). Having scoured the internet for details of the error, i can only find answers where the problem is to do with security issues (loading modules from different domains/crossdomain.xml etc.). I am
[flexcoders] ModuleLoader 'SWF is not a loadable module' Error
I am having a problem with a modularised application i am developing. I am using modules to load a user-customised application and i am getting intermittent errors when loading a certain module (SWF is not a loadable module). Having scoured the internet for details of the error, i can only find answers where the problem is to do with security issues (loading modules from different domains/crossdomain.xml etc.). I am loading all my modules from a relative path (/modules/navigation/Linksmodule.swf) so security should not be an issue. I would really appreciate some help with this anyone might have as i am reaching a release date for the project and i cannot get by without solving this problem. Thanks in advance. Barry
[flexcoders] Re: unable to hide datagrid column...help please
I got round this i think by setting the visible property of a column when a state's enterState event fired. I was using a single datagrid to display two different sets of columns, depending on a combobox selection. Hope this helps. Barry --- In flexcoders@yahoogroups.com, tomeuchre [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com, Jehanzeb Musani jehanzeb_bs@ wrote: That's exactly what I was saying. There is some issue with datagrid data binding in case of invisible columns. You can try manually setting the visible property of that column to false after rebinding the xmllist. That is what I do...it was just one of those that's strange... moments, so I captured an event after the grid was freshly bound and set the visible=false; on columns that needed it. It all happens in 1 hundredth of a blink, so I just did it and moved on. Never throught that it may have been a bug, but if you are switching dataProviders, logically it could be completely different columns, so its not so surprising that it gets reset.
[flexcoders] Re: ModuleLoader 'SWF is not a loadable module' Error
No, this is not the case im afraid. Sometimes the module loads perfectly and the application is fine, but sometimes the application throws the error i mentioned in the first post. I catch the main error being thrown by the module loader ('SWF is not a loadable module'), but when this occurs the ModuleManager.as class (from the Flex framework) always throws an error at line 669: The code at this line is: moduleEvent.bytesLoaded = loader.contentLoaderInfo.bytesLoaded; I have changed the code in ModuleManager.as to now point to the correct object - the event.currentTarget.loader property - (so that a null pointer error is not thrown): moduleEvent.bytesLoaded = event.currentTarget.loader.contentLoaderInfo.bytesLoaded; I am not sure how to compile the application (or perhaps rebuild the framework.swc file with the new source code) with the changes Either way, the module is not loading properly in a consistent manner, and i am totally confused as to how this would be happening. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: is it possible it isn;t a module From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Barry Evans Sent: Monday, December 10, 2007 3:51 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] ModuleLoader 'SWF is not a loadable module' Error I am having a problem with a modularised application i am developing. I am using modules to load a user-customised application and i am getting intermittent errors when loading a certain module (SWF is not a loadable module). Having scoured the internet for details of the error, i can only find answers where the problem is to do with security issues (loading modules from different domains/crossdomain.xml etc.). I am loading all my modules from a relative path (/modules/navigation/Linksmodule.swf) so security should not be an issue. I would really appreciate some help with this anyone might have as i am reaching a release date for the project and i cannot get by without solving this problem. Thanks in advance. Barry
[flexcoders] Re: ModuleLoader 'SWF is not a loadable module' Error
Sorry, i forgot to say i'm using flex 2.0.1. And as for a hard reference, i am creating a number of ModuleLoader components within a repeater, so the url of the loaded module is dynamic in nature. What do you mean by a GC? The weird thing in this situation is that i have another module which displays links and is very close in nature to the one giving me problems, however it never produces any errors. I use the problematic module on more than one occassion i.e. when the app loads up, the links module is loaded twice. Its only means of consistently is that it fails both times it loads (in a single application instance). I am also passing data to the module (on the moduleReady event) using a custom Interface, i wonder if this would have any affect? I followed the Adode dev guide on how to pass data to the module, so im not sure this is where the problem stems from, but i thought i would mention this. The only other issue that comes to mind is the sequence in which the modules are loaded, but i havent had a chance to apply the ModuleLoader's urls manually, and i dont even think this would be the problem, just a thought. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Which version of Flex? Are you keeping a hard reference to the module? Otherwise, a GC can kick it out just as it finishes loading. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Barry Evans Sent: Monday, December 10, 2007 9:50 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: ModuleLoader 'SWF is not a loadable module' Error No, this is not the case im afraid. Sometimes the module loads perfectly and the application is fine, but sometimes the application throws the error i mentioned in the first post. I catch the main error being thrown by the module loader ('SWF is not a loadable module'), but when this occurs the ModuleManager.as class (from the Flex framework) always throws an error at line 669: The code at this line is: moduleEvent.bytesLoaded = loader.contentLoaderInfo.bytesLoaded; I have changed the code in ModuleManager.as to now point to the correct object - the event.currentTarget.loader property - (so that a null pointer error is not thrown): moduleEvent.bytesLoaded = event.currentTarget.loader.contentLoaderInfo.bytesLoaded; I am not sure how to compile the application (or perhaps rebuild the framework.swc file with the new source code) with the changes Either way, the module is not loading properly in a consistent manner, and i am totally confused as to how this would be happening. --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Alex Harui aharui@ wrote: is it possible it isn;t a module From: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com ] On Behalf Of Barry Evans Sent: Monday, December 10, 2007 3:51 AM To: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] ModuleLoader 'SWF is not a loadable module' Error I am having a problem with a modularised application i am developing. I am using modules to load a user-customised application and i am getting intermittent errors when loading a certain module (SWF is not a loadable module). Having scoured the internet for details of the error, i can only find answers where the problem is to do with security issues (loading modules from different domains/crossdomain.xml etc.). I am loading all my modules from a relative path (/modules/navigation/Linksmodule.swf) so security should not be an issue. I would really appreciate some help with this anyone might have as i am reaching a release date for the project and i cannot get by without solving this problem. Thanks in advance. Barry
[flexcoders] Re: FDS Messaging error
I was just wondering if there was any joy on getting the messaging service to work. I too have trying to get a better understanding of fds and i want to run through the simple chat application. when i run the swf in IE, i get the following error message: [MessagingError message='Unknown destination 'MyTransientTopic'.'] at mx.messaging.config::ServerConfig$/getChannelSet() at mx.messaging::Consumer/mx.messaging:Consumer::initChannelSet() at mx.messaging::MessageAgent/mx.messaging:MessageAgent::internalSend() at mx.messaging::Consumer/subscribe() at ChatClient/___Application1_creationComplete() at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEv entFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent() at mx.core::UIComponent/set initialized() at mx.managers::LayoutManager/::doPhasedInstantiation() at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/::callLaterDispatcher2() at mx.core::UIComponent/::callLaterDispatcher() Any help would be appreciated Barry --- In flexcoders@yahoogroups.com, Robs [EMAIL PROTECTED] wrote: Nopes :(( ! It still shows the same error. Is it that fds can't locate my config files properly. Lemme give the dir structure of my project : flex samples folder messageboard folder my chat app folder web-inf folder {all fds related config xmls} The way I access my app is http://localhost:8080/samples/messageboard/fdsChat/fdsChat.mxml . --- In flexcoders@yahoogroups.com, Dirk Eismann DEismann@ wrote: Make sure to restart FDS after you modify any of the config files. Also, if you're using Flex Builder 2 then it's always a good idea to do a Project -- Clean after modifying the FDS config files. Dirk. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robs Sent: Tuesday, April 10, 2007 3:36 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] FDS Messaging error Hi all, I'm trying out a sample chat app using fds messaging. As per the instructions, I made a new destination in the messaging-config.xml as follows: destination id=MyTransientTopic properties server durablefalse/durable /server /properties channels channel ref=my-rtmp/ /channels /destination Unfortunately, my application does not seem to get this destination is throwing the following error: [Error: (mx.messaging.messages::ErrorMessage)#0 body = (null) clientId = (null) correlationId = AC6C8425-5819-7952-C465-DBB44D54B08E destination = MyTransientTopic extendedData = (null) faultCode = Server.Processing faultDetail = (null) faultString = No destination 'MyTransientTopic' exists in service flex.messaging.services.MessageService headers = (Object)#1 messageId = 996330F1-2418-1987-0B1E-A4C224645BD9 rootCause = (null) timestamp = 1176212098404 timeToLive = 0] Where am I going wrong? Please help ! Regards, Robi. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links
[flexcoders] Re: FDS Messaging error
robi, i just figured out that when you create the new project in flex builder 2.0, you need to make sure you choose the option 'Flex Data Services' when asked 'How will your Flex application access data?' in the 'Create a Flex Project' dialog. Hope this helps, Barry --- In flexcoders@yahoogroups.com, Robs [EMAIL PROTECTED] wrote: Hi all, I'm trying out a sample chat app using fds messaging. As per the instructions, I made a new destination in the messaging-config.xml as follows: destination id=MyTransientTopic properties server durablefalse/durable /server /properties channels channel ref=my-rtmp/ /channels /destination Unfortunately, my application does not seem to get this destination is throwing the following error: [Error: (mx.messaging.messages::ErrorMessage)#0 body = (null) clientId = (null) correlationId = AC6C8425-5819-7952-C465-DBB44D54B08E destination = MyTransientTopic extendedData = (null) faultCode = Server.Processing faultDetail = (null) faultString = No destination 'MyTransientTopic' exists in service flex.messaging.services.MessageService headers = (Object)#1 messageId = 996330F1-2418-1987-0B1E-A4C224645BD9 rootCause = (null) timestamp = 1176212098404 timeToLive = 0] Where am I going wrong? Please help ! Regards, Robi.
[flexcoders] Re: FDS Messaging error
No it doesnt work in firefox either. I guess there is some sort of configuration in the Project that defines where the data comes from. I found out that if you choose the option 'Flex Data Services' when asked 'How will your Flex application access data?' in the 'Create a Flex Project' dialog, the sample chat client is able to talk to the messaging service 100% Barry --- In flexcoders@yahoogroups.com, Sean Sell [EMAIL PROTECTED] wrote: Does it work in Firefox and just not in IE? If so, we had a problem on IE making remote object calls to our server when using https. Adding the following: mx:Script ![CDATA[ import mx.messaging.ChannelSet; public var channelIDArray:Array = new Array(my- amf, my-http, my-secure-amf,my-secure-http); [Bindable] public var servicesChannelSet:ChannelSet = new ChannelSet(channelIDArray,false); ]] /mx:Script and setting: channelSet={this.servicesChannelSet} in the MX:RemoteObject tag fixed the problem. otherwise post you configs and how you are compiling. Provided your config is right the easiest way to get the client compiled correctly is to have it compiled on the server where it will be served from. - Original Message From: Barry Evans [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Wednesday, May 9, 2007 6:17:27 AM Subject: [flexcoders] Re: FDS Messaging error I was just wondering if there was any joy on getting the messaging service to work. I too have trying to get a better understanding of fds and i want to run through the simple chat application. when i run the swf in IE, i get the following error message: [MessagingError message='Unknown destination 'MyTransientTopic' .'] at mx.messaging. config::ServerCo nfig$/getChannel Set() at mx.messaging: :Consumer/ mx.messaging: Consumer: :initChannelSet( ) at mx.messaging: :MessageAgent/ mx.messaging: MessageAgent: :internalSend( ) at mx.messaging: :Consumer/ subscribe( ) at ChatClient/_ __Application1_ creationComplete () at flash.events: :EventDispatcher /flash.events: EventDispatcher: :dispatchEv entFunction( ) at flash.events: :EventDispatcher /dispatchEvent( ) at mx.core::UIComponen t/dispatchEvent( ) at mx.core::UIComponen t/set initialized( ) at mx.managers: :LayoutManager/ ::doPhasedInstan tiation() at Function/http://adobe. com/AS3/2006/ builtin:: apply() at mx.core::UIComponen t/::callLaterDis patcher2( ) at mx.core::UIComponen t/::callLaterDis patcher() Any help would be appreciated Barry --- In [EMAIL PROTECTED] ups.com, Robs robi.ray@ . wrote: Nopes :(( ! It still shows the same error. Is it that fds can't locate my config files properly. Lemme give the dir structure of my project : flex samples folder messageboard folder my chat app folder web-inf folder {all fds related config xmls} The way I access my app is http://localhost: 8080/samples/ messageboard/ fdsChat/fdsChat. mxml . --- In [EMAIL PROTECTED] ups.com, Dirk Eismann DEismann@ wrote: Make sure to restart FDS after you modify any of the config files. Also, if you're using Flex Builder 2 then it's always a good idea to do a Project -- Clean after modifying the FDS config files. Dirk. -Original Message- From: [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com] On Behalf Of Robs Sent: Tuesday, April 10, 2007 3:36 PM To: [EMAIL PROTECTED] ups.com Subject: [flexcoders] FDS Messaging error Hi all, I'm trying out a sample chat app using fds messaging. As per the instructions, I made a new destination in the messaging-config. xml as follows: destination id=MyTransientTopi c properties server durablefalse /durable /server /properties channels channel ref=my-rtmp / /channels /destination Unfortunately, my application does not seem to get this destination is throwing the following error: [Error: (mx.messaging. messages: :ErrorMessage) #0 body = (null) clientId = (null) correlationId = AC6C8425-5819- 7952-C465- DBB44D54B08E destination = MyTransientTopic extendedData = (null) faultCode = Server.Processing faultDetail = (null) faultString = No destination 'MyTransientTopic' exists in service flex.messaging. services. MessageService headers = (Object)#1 messageId = 996330F1-2418- 1987-0B1E