Flex 4 styleManager loadStyleDeclarations fail

I am starting to tinker with Flex 4 and I am having trouble trying to load a style swf file.  I have a css file that looks like this
@namespace s "library://ns.adobe.com/flex/spark";
s|Application {
    background-color: red;
which I compiled to a css-based swf file.  The code I am using to load the swf is like this:
// Called within a function
var dispatcher : IEventDispatcher = FlexGlobals.topLevelApplication.styleManager.loadStyleDeclarations(themeSwfUrl);
dispatcher.addEventListener(StyleEvent.ERROR, onStyleError);
dispatcher.addEventListener(StyleEvent.PROGRESS, onStyleProgress);
dispatcher.addEventListener(StyleEvent.COMPLETE, onStyleComplete);
private function onStyleError(event : StyleEvent) : void {
    trace("\tLoadThemeCommand.onIOError(event)");
    trace(event.errorText);
    Alert.show(event.errorText, "Theme Load Failure");
private function onStyleProgress(event : StyleEvent) : void {
    trace("\tLoadThemeCommand.onStyleProgress(event) " + event.bytesLoaded + " / " + event.bytesTotal);
private function onStyleComplete(event : StyleEvent) : void {
    trace("\tLoadThemeCommand.onLoadComplete(event)");
    trace('event.target: ' + (event.target));
    var dispatcher : IEventDispatcher = event.target as IEventDispatcher;
    trace('dispatcher: ' + (dispatcher));
    dispatcher.removeEventListener(StyleEvent.ERROR, onStyleError);
    dispatcher.removeEventListener(StyleEvent.PROGRESS, onStyleProgress);
    dispatcher.removeEventListener(StyleEvent.COMPLETE, onStyleComplete);
I see the following traces:
LoadThemeCommand.execute(pNotification)
LoadThemeCommand.onStyleProgress(event) 0 / 24042
LoadThemeCommand.onStyleProgress(event) 8192 / 24042
LoadThemeCommand.onStyleProgress(event) 16384 / 24042
LoadThemeCommand.onStyleProgress(event) 24042 / 24042
But I am getting this error:
Error: Compatibility version has already been read.
    at mx.core::FlexVersion$/set compatibilityVersion()
    at mx.core::FlexVersion$/set compatibilityVersionString()
    at TestTheme_mx_core_FlexModuleFactory()
I've looked around but can't find anything to help me.

I figured it out.  I was using FDT to compile the project and it was using the Flex 4 SDK to compile.  But when I compiled the css file to a swf, I was using the command prompt.  And my FLEX_HOME was still looking at the Flex 3.5 SDK.  Dumb noob mistake. 

Similar Messages

  • Flex application works locally, fails when online (connecting to PHP script to insert row into DB)

    Hi everyone,
    I've got a Flex application that works wonderfully when I test it on my machine locally. It uploads files and send variables to a PHP script (that inserts them into a DB) with no errors when I run it locally. As soon as I put it online, the upload continues to work but something between my Flex application and the PHP script fails because no data is committed to the DB. I know the PHP script works fine - not only does it work when I run the Flex application locally but when I go directly to the PHP file online, a new empty line is added to the DB.
    I initially thought that this was a cross domain issue so I added the following to the root of my hosted account:
    <cross-domain-policy>
    <site-control permitted-cross-domain-policies="all"/>
    <allow-access-from domain="*.MYURL"/>
    <allow-http-request-headers-from domain="*.MYURL" headers="*" secure="false"/>
    </cross-domain-policy>
    I based this off of what I found online which seems to have done nothing for me. I'd also be happy to provide an error message but I don't get one when I debug.
    Any thoughts would be greatly appreciated.

    Use a network monitor to see if the Flex app is truly requesting the right URL.
    -Alex

  • Flex/Zend channel connect failed error...

    Hi guys.
        I am using Flex and php to develop my project. Everything works great in my local machine. However, when I upload my files to my server (godaddy.com). I got the error when loading my flex application.
    The pop-up error message is
    send failed
    channel.connect.failed.error
    Netconnection.call.Badversion: url:
    http://mydomail/folder/gateway.php
    I have upload my ZendFramewrok folder into my server and amf_config.ini has been configured. (webroot =http://mydomain)
    I am not sure what's going on here. Please help. Thanks.
    Update: my gateway.php
    <?php
    ini_set("display_errors", 1);
    $dir = dirname(__FILE__);
    $webroot = $_SERVER['DOCUMENT_ROOT'];
    $configfile = "$dir/amf_config.ini";
    //default zend install directory
    $zenddir = $webroot. '/ZendFramework/library'; //I did upload the ZendFramwork folder
    //Load ini file and locate zend directory
    if(file_exists($configfile)) {
    $arr=parse_ini_file($configfile,true);
    if(isset($arr['zend']['webroot'])){
      $webroot = $arr['zend']['webroot'];
      $zenddir = $webroot. '/ZendFramework/library';
    if(isset($arr['zend']['zend_path'])){
      $zenddir = $arr['zend']['zend_path'];
    // Setup include path
    //add zend directory to include path
    set_include_path(get_include_path().PATH_SEPARATOR.$zenddir);
    // Initialize Zend Framework loader
    require_once 'Zend/Loader/Autoloader.php';
    Zend_Loader_Autoloader::getInstance();
    // Load configuration
    $default_config = new Zend_Config(array("production" => false), true);
    $default_config->merge(new Zend_Config_Ini($configfile, 'zendamf'));
    $default_config->setReadOnly();
    $amf = $default_config->amf;
    // Store configuration in the registry
    Zend_Registry::set("amf-config", $amf);
    // Initialize AMF Server
    $server = new Zend_Amf_Server();
    $server->setProduction($amf->production);
    if(isset($amf->directories)) {
    $dirs = $amf->directories->toArray();
    foreach($dirs as $dir) {
         // get the first character of the path.
         // If it does not start with slash then it implies that the path is relative to webroot. Else it will be treated as absolute path
         $length = strlen($dir);
         $firstChar = $dir;
         if($length >= 1)
          $firstChar = $dir[0];
         if($firstChar != "/"){
          // if the directory is ./ path then we add the webroot only.
          if($dir == "./"){      
           $server->addDirectory($webroot);
          }else{
           $tempPath = $webroot . "/" . $dir;
        $server->addDirectory($tempPath);
      }else{
          $server->addDirectory($dir);     
    // Initialize introspector for non-production
    if(!$amf->production) {
    $server->setClass('Zend_Amf_Adobe_Introspector', '', array("config" => $default_config, "server" => $server));
    $server->setClass('Zend_Amf_Adobe_DbInspector', '', array("config" => $default_config, "server" => $server));
    // Handle request
    echo $server->handle();
    Error from gateway.php if I call it directly.
    Warning: require_once(Zend/Loader/Autoloader.php) [function.require-once]: failed to open stream: No such file or directory in /home/content/79/4687979/html/parkerList/gateway.php on line 27
    Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader/Autoloader.php' (include_path='.:/usr/local/php5/lib/php:http://blackwheels.info//ZendFramework/library') in /home/content/79/4687979/html/parkerList/gateway.php on line 27
    gateway.php is the rat. but I still can't figure out what's wrong. Zend/Loader/Autoloader.php is under the server root "ZendFramework/library" folder. I don't understand why my application can't find it. Thanks again!

    You will get a better response if you repost your question on the Flex forums. This forum is for the Livecycle Data Services product.

  • Flex plugin for Eclipse failed

    Hello,
    I am trying to install the flex plugin for the first time.
    it says that the folder must contain eclipse.exe and a folder
    named configuration. (which it does)
    but the install script fails with that it does not
    (this install in on Vista BTW)
    Thanks for any help

    I know the chances of a reply are lower than the chances of IBM releasing a bug-free, backwards compatible product, but...
    Looking into this one myself (and I'm not optimistic).  What exactly are the problems you're seeing?

  • WSDL Introspection works in Flex Builder 3, but fails in Flash Builder 4.5

    Hi - I'm getting an error trying to introspect this service in Flash Builder 4.5:
    http://85.214.51.185/mercat/IgrWebService.asmx?WSDL
    Flex Builder 3 handles it just fine though. Both IDEs are running in OS X.
    Is this an issue with Flash Builder, or with the WSDL format? Is there anything I can do to fix it?
    Thanks.

    Hi - I'm getting an error trying to introspect this service in Flash Builder 4.5:
    http://85.214.51.185/mercat/IgrWebService.asmx?WSDL
    Flex Builder 3 handles it just fine though. Both IDEs are running in OS X.
    Is this an issue with Flash Builder, or with the WSDL format? Is there anything I can do to fix it?
    Thanks.

  • Can web service schema loading again by flex once it is failed ?

    Hello,
    I used cairngorm architecture and in that i used webservice.
    I show that service controller / flex load wsdl schema first in webservice object.
    Once loading is finished flex can use this schema to call the webservice function.
    I have one question is it . If some how during wsdl schema loading any error is occured then can flex loading again this schema ?
    Thanksl
    Mohit

    Hue sud.. Thanks for your answer.
    In fact I did saw this tutorial and I decided to make it work today. Which in fact I did, but got in trouble with a bunch of libraries. Now I do have my java classes in the database with their java sources. The tutorial also says to create a procedure since its static the way to call the class. The procedure creates sucessfully. But now I got the problem when I try to execute my procedure I get this error:
    04:11:45 p.m. ORA-29532: Java call terminated by uncaught Java exception: java.lang.IncompatibleClassChangeError
    04:11:45 p.m. ORA-06512: at "AMES_JAVA.MAIN", line 1
    04:11:45 p.m. ORA-06512: at line 5
    Do you know how to execute the procedure from the database once is up? I also tried creating a function but got the same result

  • Flex 4 Beta 2 spark: 'loadStyleDeclarations' has been deprecated since 4.0., IStyleManager2 ?

    Hi there,
    switching some code from Flex 4.0.0 Beta1 to Flex 4.0.0 Beta2 (build 12412), I need help to convert the following to the new syntax/approach:
              var myCssModuleStyleEvent:IEventDispatcher = StyleManager.loadStyleDeclarations(
                                                                    CONFIG_PATH+"fonts_glb.swf",
                                                                    true,
                                                                    true
              myCssModuleStyleEvent.addEventListener(StyleEvent.ERROR, loadCurrPresStylesErrorHandler, false, 0, true);//BECAUSE OF OFFICIAL BUG weak reference is used here http://bugs.adobe.com/jira/browse/SDK-14699
              myCssModuleStyleEvent.addEventListener(StyleEvent.COMPLETE, loadCurrPresStylesHandler);
    I find nowhere my answer thank you for you help.
    Best Regards.
    maddec

    Download the AIR 2 SDK, make a new copy of the Flex4 SDK (or whichever Flex SDK you want to use) and copy the AIR SDK over it. (If you are on the Mac, you have to be careful that the directories themselves aren't overwritten -- just the files inside them.) You then add the combined SDK to the list in the Flash Builder project properties dialogs.

  • Reloading CSS in SWFLoader loaded Flex app.

    Hello,
    I am having the following problem:
    I have a Main application with a SWFLoader that loads a child Flex application. When a button is pressed, SWFLoader loads a new child Flex application. Currently LoaderContext for SWFLoader is created as follows:
    var context:LoaderContext = new flash.system.LoaderContext(false, ApplicationDomain.currentDomain);
    Everything seems to work okay except that CSS style sheets definded in the first child application cannot be overwritten by the CSS style sheets in the second.
    After much research I see the following two options: 1. load style sheets externally using StyleManager.loadStyleDeclaration() method or 2. specify a different ApplicationDomain for the child Flex application.
    The problem with solution #1 is I would like to keep all style sheets embedded in either the main application or each child application. So, my question is, how do load/reset CSS styles while keeping the CSS (or CSS compiled to SWF) embedded when StyleManager.loadStyleDeclaration() only takes a URL as a parameter?
    The problem with solution #2 is as follows: when I change the ApplicationDomain property in the LoaderContext declaration to this:
    var context:LoaderContext = new flash.system.LoaderContext(false, new ApplicationDomain(ApplicationDomain.currentDomain));
    I get the following error when I load a second child application into the SWFLoader:
    TypeError: Error #1034: Type Coercion failed: cannot convert spark.components::VScrollBar@64d6851 to spark.components.VScrollBar.
    (See attached txt for full trace stack.)
    I'm using Flex 4.0 beta 2 and Flash Builder beta 2.
    Also, I found this article on per Module StyleManager which does not look like it has been implemented and is basically exactly what I'm trying to accomplish but with a SWFLoader instead ofModule.
    If someone could please explain or point me in the right direction on how to either 1. load Flex 4 beta 2 application as a sub application domain app without generating VScollBar error (and if that will even solve overwriting CSS styles issue). or 2. how to load StyleManager.loadStyleDeclaration() from an embedded css or swf, I would greatly appreciate it.
    Thank you in advance,
    Ilya Voloshin

    Alex, thank you for the quick reply -- I'll give it a shot. Where would I find the nightly builds? I found the source code repository, but if there's a nightly build I can check out, that would be much easier.
    Thanks,
    Ilya

  • Loading font at runtime for TLF in Flex 3.3

    Hey flexers,
    I have an app that's using the Flex 3.3 SDK.  We pulled the text layout swc from Flex 4 and are using a text flow in our app.  Previous to this we had been using the old TextField.
    How do I go about loading in a font swf at runtime and getting a text flow to use it?  I've tried several things as posted on the forum and around the web and it never actually takes effect in the text flow.  Here are a couple questions I came up with along the way though:
    When I compile the font swf from the font css, do I need to have embedAsCFF=true?
    Should I be able to use StyleManager.loadStyleDeclarations() to load in the font swf?  When I do, I get the following error:
    VerifyError: Error #1014: Class mx.modules::ModuleBase could not be found.
    Any idea why or know how I would load in the font swf?

    Let me clarify a bit.  Here it says that I need to set embedAsCFF=true to use the font with FTE:
    http://help.adobe.com/en_US/flex/using/WS0FA8AEDB-C69F-4f19-ADA5-AA5757217624.html
    It's my understanding that in order to use embedAsCFF=true I need to be using the Flex 4 sdk.  However, when I convert the CSS to a SWF and attempt to load it into my Flex 3.3 app using StyleManager.loadStyleDeclarations() I get the error:
    VerifyError: Error #1014: Class mx.modules::ModuleBase could not be  found.
    It would appear it's because I'm attempting to load a font "module" that was built in Flex 4 into an app built in Flex 3.3.  Is it possible to load a Flex 4 module into a Flex 3.3 app?  Is there some other workaround?

  • Changing themes of application in Flex 3

    Hi All ,below is my  mxml file , in which i am trying to change theme of my flex application by selecting the themes in combo box, but it is not working fine.Is there any bug in code ??? How to change the theme of flex application in Flex 3.. Plzz help...
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    <mx:Script>
    <![CDATA[
               import mx.controls.Alert;
                import mx.collections.ArrayCollection;
                import mx.styles.StyleManager;
                private var cssLoader:URLLoader;
              private var cssRequest:URLRequest;
              [Bindable]
                public var cards:ArrayCollection = new ArrayCollection(
                    [ {label:"Theme 0", data:0},
                      {label:"Theme 1", data:1},
                      {label:"Theme 2", data:2},
                      {label:"Theme 3", data:3} ]);
                   private function closeHandler(event:Event):void {
                   if(event.target.selectedItem.data == 1){
                    cssLoader = new URLLoader();
                    cssRequest = new URLRequest("Alert.css");
                    cssLoader.addEventListener(Event.COMPLETE, cssLoaderComplete);
                    cssLoader.load(cssRequest);
                if(event.target.selectedItem.data == 2){
                  cssLoader = new URLLoader();
                    cssRequest = new URLRequest("Alert1.css");
                    cssLoader.addEventListener(Event.COMPLETE, cssLoaderComplete);
                    cssLoader.load(cssRequest);
                if(event.target.selectedItem.data == 3){
                  cssLoader = new URLLoader(); 
                    cssRequest = new URLRequest("Alert2.css");
                    cssLoader.addEventListener(Event.COMPLETE, cssLoaderComplete);
                    cssLoader.load(cssRequest);
                 private function cssLoaderComplete(event:Event):void
                     var sheet:StyleSheet = new StyleSheet();
                     sheet.parseCSS(cssLoader.data);
                     Application.application.styleSheet = sheet;
    ]]>
    </mx:Script>
    <mx:Button label="Click Me"  x="337" y="148"/>
    <mx:ComboBox dataProvider="{cards}" id="themeCombo" width="100"  change="closeHandler(event);" x="308" y="205"/>
    </mx:Application>

    Hi Bhasker,
    I work for big bank sector corp - Citigroup.,i am using themes to load themes dynamically using style manager class.i wrote a application which have 3 themes as a combo box items. when theme selected the look and feel of the same application's UI screen has to change. for the loading i used below mxml application. please advise me as need to submit this task today to implement all our project.it will be very gr8 if u can help me.
    <?xml version="1.0" encoding="utf-8"?><s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="
    library://ns.adobe.com/flex/spark" xmlns:mx="
    library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
     <fx:Script><![CDATA[
    import mx.controls.Alert;
    import mx.styles.StyleManager;
    import mx.events.StyleEvent;
    [Bindable] private var themes:Array = [ "AeonGraphical","Spark","Halo" ];
    private function initApp():void {
    //Initialize the ComboBox to the first theme in the themes Array.
    themesCmbBox.selectedIndex = themes.indexOf(0);
    private function thmsCmbChangeHandler(themeName:String):void {
    themeName= themesCmbBox.selectedLabel;
    if (themeName!=null && themeName == "AeonGraphical") {
    styleManager.loadStyleDeclarations("assets/AeonGraphical/AeonGraphical.swf");
    if (themeName!=null && themeName == "Spark") {
    styleManager.unloadStyleDeclarations("assets/AeonGraphical/AeonGraphical.swf");
    styleManager.loadStyleDeclarations("assets/Spark/spark.swf");
    if (themeName!=null && themeName == "Halo") {
    styleManager.unloadStyleDeclarations("assets/Spark/spark.swf");
    styleManager.loadStyleDeclarations("assets/Halo/halo.swf");
    private function registrationComplete():void {
    Alert.show('Thank you for registering!');
    private function clickClear(event:KeyboardEvent=null):void {
    if(event==null || event.keyCode == 13 ) {
    person.text = "" ;
    addr.text = "" ;
    city.text = "";
    state.text = "" ;
    zip.text = "" ;
    ]]>
    </fx:Script>
     <mx:Form id="Themes">
     <mx:FormItem>  
    <mx:Label text="{'Themes Demo in Flash 4'}" fontSize="35"/>  
    </mx:FormItem>  
    <mx:FormItem label="Themes" >  
    <mx:ComboBox id="themesCmbBox" dataProvider="{themes}" change="thmsCmbChangeHandler(themesCmbBox.selectedLabel)" />  
    </mx:FormItem>  
    <mx:FormItem label="Person Name">
     <mx:TextInput id="person" />
     </mx:FormItem>
     <mx:FormItem label="Street Address">
     <mx:TextInput id="addr"/>
     </mx:FormItem>
     <mx:FormItem label="City">
     <mx:TextInput id="city"/>
     </mx:FormItem>
     <mx:FormItem label="State">
     <mx:TextInput id="state" />
     </mx:FormItem>
     <mx:FormItem label="ZIP Code">
     <mx:TextInput id="zip" />
     </mx:FormItem>  
    </mx:Form>
     <mx:HBox>
     <mx:Button id="sub" label="{'Submit'}" y="100" click="registrationComplete()" />
     <mx:Button id="reset" label="{'Reset'}" buttonDown="clickClear()" keyDown="clickClear(event)" />
     </mx:HBox> 
    </s:Application>
    and i given the compiler option: -theme=${flexlib}/themes/Halo/halo.swc,${flexlib}/themes/Spark/spark.css,${flexlib}/theme s/AeonGraphical/AeonGraphical.css
    i tried with locally project assets path, and framework path nothing work out. and added these themes in the flex-config.xml file also. please advise me ASAP
    Advance Thanks,
    Usha
    Optional Information:
    Computer OS: Windows XP
    Programming Language: mxml/as3
    Compiler: flash 4.1.0

  • Flex 4.5.1 - iOs - iPad 1 - Loading images bug

    Hi successfully adapt a standard flex project for the web to a mobile application with some adjustements. Congratulations for Adobe team for this fantastic work !
    My issue i am faced is a bit strange.
    When i run in debug mode my application on my iPad, after pushing the ipa with iPhone configuration utility, the images loaded dynamically works well. They are in an assets directory, and all is fine.
    When i compile the app for an ad-hoc installation, so near from a final version, after pushing the ipa with iPhone configuration utility, the images don't load dynamically ! When i dezip the ipa, i can see the assets directory in the app extracted.
    Someone was faced to this issue ?
    Thanks by advance

    I've had the same bug for iPad 1 when trying to load some a css at runtime by converting it into a SWF file.
    e.g.
    if(this.width>500)
         styleManager.loadStyleDeclarations("assets/styleTablet.swf");
    /* CSS file */
    @namespace s "library://ns.adobe.com/flex/spark";
    @media (application-dpi: 160)
         global
              fontSize: 24;
         .introtext
              fontSize:28;
    Works fine in the emulator but no images show up in the ad-hoc build
    If someone either has a solution for this or another solution for changing font size by width rather than just dpi I would be happy with that too.
    Thanks
    Edit: Reported bug https://bugbase.adobe.com/index.cfm?event=bug&id=2910342

  • Stylemanager.laodStyleDeclarations throws error while trying to laod a style swf

    I have a very simple prototype to depict how run time style sheets can be applied in FLex 4. Fow this I have first made a Theme SWC which contais a css and couple of skin classes.
    I have also created the swf of the css so that I can load swf at runtime. I have used the following link:
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7f8c.html#WS2d b454920e96a9e51e63e3d11c0bf69084-7e6d
    I am using the following code to load style sheet
                  styleManager.loadStyleDeclarations("../assets/runtimeStyles/ApplicationStyle.swf",true,tr ue, ApplicationDomain.currentDomain);
    But I am seeing an error whle runing the prototype from Flash Builder 4. The error is
    Error: Could not find compiled resource bundle 'controls' for locale 'en_US'.
        at mx.resources::ResourceManagerImpl/installCompiledResourceBundle()[E:\dev\4.0.0\frameworks \projects\framework\src\mx\resources\ResourceManagerImpl.as:340]
        at mx.resources::ResourceManagerImpl/installCompiledResourceBundles()[E:\dev\4.0.0\framework s\projects\framework\src\mx\resources\ResourceManagerImpl.as:269]
        at mx.core::FlexModuleFactory/installCompiledResourceBundles()[E:\dev\4.0.0\frameworks\proje cts\framework\src\mx\core\FlexModuleFactory.as:610]
        at mx.core::FlexModuleFactory/docFrameHandler()[E:\dev\4.0.0\frameworks\projects\framework\s rc\mx\core\FlexModuleFactory.as:580]
        at mx.core::FlexModuleFactory/docFrameListener()[E:\dev\4.0.0\frameworks\projects\framework\ src\mx\core\FlexModuleFactory.as:126]
    Point o notice is even after this error the style changes are applied but the error window pops up and I have to select continue.
    PLEASE LET ME KNOW WHERE IS THE PROBLEM

    It's a good idea to compile style modules with the -static-rsls option, which links the styles module without RSLs. Since RSL linking is on by default, the main application will load the default set of RSLs. There is no need for modules or sub-application to load the same RSLs again. I'll put the details of this issue in the bug as I get time to work on it.
    -Darrell

  • Completely different AMF request packets for same remote service call from Flex to PHP using ZendAMF

    I was trying to debug why one of the remote-services in our Flex application was failing randomly. What I found was interesting. Completely different AMF request packets were sent for same remote service call from Flex to PHP.
    When the service call succeeds the AMF request packet looks like the following:
    POST /video/flex/bin-debug/gateway.php HTTP/1.1
    Host: localhost
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Firefox/3.6.15
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 115
    Cookie: PHPSESSID=j6u30i8uu6c3cvp8f4kipcpf05
    Referer: http://localhost/video/flex/bin-debug/main.swf/[[DYNAMIC]]/5
    Content-type: application/x-amf
    C    ontent-length: 305
    Flex Message (flex.messaging.messages.RemotingMessage)     operation = getMemberFromEvent    clientId = 2F997CD0-7D08-8D09-1A9B-0000422676C8    destination = MembereventService    messageId = B46AB58D-2241-83F0-41E4-9FE745565492    timestamp = 0    timeToLive = 0    body =     [      280    ]    hdr(DSId) = nil
    And when the service fails the AMF request packet looks like this:
    ServiceRequest: getMemberFromEvent; RemoteService; getMemberFromEvent
    (mx.messaging.messages::RemotingMessage)#0
      body = (Array)#1
        [0] 250
      clientId = "1AA4FAAB-AEA5-8109-4B0D-000002B3A9A1"
      destination = "MembereventService"
      headers = (Object)#2
        DSEndpoint = (null)
        DSId = "nil"
      messageId = "2F92E6C0-FE92-A09B-B150-9FE2F28D9738"
      operation = "getMemberFromEvent"
      source = "MembereventService"
      timestamp = 0
      timeToLive = 0
    Also, following is the error message on Flex when the service fails:
    {Fault code=Channel.Call.Failed, Fault string=error, Fault detail=NetConnection.Call.Failed: HTTP: Failed, Destination=MembereventService}
    We are using Swiz as the micro-architecture for Flex development and Zend AMF for remoting between Flex and PHP.
    Any ideas what is wrong here, what is causing Flex to send different request packets for the same service & what I can do to fix it?

    Hi, I know that your post is almost 5 years ago, but have you found the solution to this issue?
    Thanks.

  • Flex with Hibernate using HTTP

    Hi All,
    am new to Flex. Can any one post a simple code on Flex with
    Hibernate using HTTP , i mean connecting to database using
    Hibernate and invoking the hibernate by using the HTTP service.
    can we have a sequence like
    Flex(MXML)->JSP->Hibernate->Database .Is it possible?
    Thanks in Advance

    > can we have a sequence like
    Flex(MXML)->JSP->Hibernate->Database .Is it possible?
    That's exactly what you're going to have and it certainly is
    possible. (Replace the JSP with Servlet, Struts Action, JSF or
    whatever)
    Usually you'll send data back -- output to JSP or write to
    HttpServletResponse object -- in XML or JSON format. The data would
    be delivered to the result event of the HTTService in Flex. If it
    fails for some reason, the fault event of HTTService class would be
    invoked.
    The important thing to realize about Flex is that it cannot
    directly connect to a DB; you need a server side action that would
    get data from wherever write it to response. It's more like Ajax
    calls to a JSP/Servlet.
    ATTA

  • Flex 4.1 Runtime CSS: CSS in module or just CSS

    Hi,
    I guess this question's answer is obvious but just in case I would like to ask.
    I have application which loads a module. I would like to load some fonts before I load the module, so when the module is loaded it displays it's text correctly. So to do that at the moment I load one plain module with a stylesheet in it where I have the embedded fonts, and then I load the module with the text.
    Should I not use a module with a stylesheet but compile a stylesheet separately and load it with StyleManager.loadStyleDeclarations() ?
    NOTE: Also using the StyleManager I can set true to the second parameter of loadStyleDeclarations which will force updating the styles. How can I do that without loading new stylesheet? I want to do that in case the styles apply for something that is already on screen and I load the module with the styles at a later time.
    Another thing is that If I recall correctly if I want to have the stylesheet in swf I need to compile it myself. And with the module with a stylesheet case that happens automatically.
    So.. thoughts ?

    Ok I read it (maybe for 5th time) to recall things a bit. So let me summarize after reading testing etc what I still don't understand:
    1) In my application I have 1 custom skin extending Skin.
    import custom.CSCSkin;
    public var testSkinnn:CSCSkin;
    and on creation complete I have:
    var testSkin:Class = loaderInfo.applicationDomain.getDefinition("custom.CSCSkin") as Class;
    trace(testSkin);
    This returns [class CSCSkin].
    But the same thing doesn't work in the module because the loaderInfo is null.
    So how do you access the applicationDomain of a module ?
    2) Looks like I can use almost any component as you say in the siblings and there is no problem, except for the managers classes and Alert. I guess that's because they are singletons with static vars and functions and they register their reference only once - for one application domain and get restrained by it.
    I just tried to use Alert only in a module. Application is empty, just a moduleLoader.
    import mx.managers.PopUpManager;
    private var popUpManager:PopUpManager;
    import mx.controls.Alert;
    private var alert:Alert;
    On creation complete I have:
    Alert.show("TESTING","bla");
    In the docs it says that registering the singletons/managers in module will make it throw error when you try to use it in a sibling module. But the fact is that the Alert doesn't work at all even in the module I registered them first - it throws error with the PopUpManager. To make the Alert work I had to move the Alert and PopUpManager declarations to the main application. Then they started working everywhere.
    Why the Alert is not working if used only in one module?

Maybe you are looking for

  • Lost AFP connections after upgrading to 10.6.7

    Hi all, I've just upgraded our OS X server to 10.6.7. All seemed to go fine, but for some reason now none of our users are able to connect to AFP shares any longer, they just get back an error in the Finder saying "connection failed". I've tried look

  • Trouble connecting iPhone to remote  IP Panasonic cameras- Ports issues

    Cannot connect remotely to camera DVR with the iPhone due to Java Applet issues not supported by Apple. I also cannot connect to the home panasonic IP cameras because the error "Not allowed to use restricted network port" appears. In order to connect

  • MacBook Pro Battery Recall

    Apparently my battery is in the recall range, but both the serial number of the MacBook Pro (a refurbished one) and the battery are flagged as not recognized. I've checked capitals and O/0s. Anyone else see this?

  • How to calculate the difference between intdate and getdate

    Hi, My requirement is to get the data for all the claims where the difference between transactiondate and getdate() should be less than or equal to 7 which means any claims that happened in the past week. So, my query would be something like this sel

  • PHP 5 and ORacle 9i Client?

    We would like to install PHP 5 on an windows 2003 and IIS 6 machine. Currently we have the oracle 9i client installed to access our 9i databases. Do we have to install the 10G client? Can anyone tell us how this will affect the 9i client install? Tha