Preloader with webservice (introspection wizard) please help!

hi guys, im having some trouble with displaying either a preloader, dosent matter if its eiter indefinite or definite.
This is the code i have for my webservice, and Mxml.
PageEditor.mxml :
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/halo" width="100%" height="100%"
     initialize="init();">
    <s:layout>
        <s:BasicLayout/>
    </s:layout>
    <fx:Script source="mainPageEditorScript.as" />
    <mx:HDividedBox width="100%" height="100%">
        <mx:DataGrid id="pageList" height="100%" width="200" dataProvider="{modules.PageEditor.pageEditor.pageListData}"
                itemClick="{modules.PageEditor.pageEditor.getPageInfo(pageList.selectedItem.Key)}">
            <mx:columns>
                <mx:DataGridColumn dataField="Value" />
            </mx:columns>
        </mx:DataGrid>
        <mx:VBox width="100%" height="100%">
            <mx:Accordion id="theAccordion" width="100%" height="100%">
            </mx:Accordion>
        </mx:VBox>
    </mx:HDividedBox>
</s:Group>
inside my pageEditor class i have
pageEditor.as
// ActionScript file
package modules.PageEditor{
    import flash.display.Loader;
    import mainScript.mainList;
    import mx.collections.ArrayCollection;
    import mx.controls.Alert;
    import mx.rpc.events.FaultEvent;
    import mx.rpc.events.ResultEvent;
    import services.pages.*;
//    import services.main.*;
    [Bindable] public class pageEditor{
        // variables
        public static var pageListData:ArrayCollection;
        public static var pageInfo:Object;
        public static var pageService:Pages = new Pages();
        public static var pageDetails:Pages = new Pages();
        public static var loading:Loader = new Loader();
        public static var isUpdated:Boolean = false;
        public static function init():void{
            pageService.addEventListener(ResultEvent.RESULT, resultReturn);
            pageService.showBusyCursor = true;
            pageService.addEventListener(FaultEvent.FAULT, faultEvent);
            pageService.GetSitePages(mainScript.mainList.siteId);
            //Alert.show("here");
        public static function resultReturn(event:ResultEvent):void{
            pageListData = event.result as ArrayCollection;
            isUpdated = false;
        public static function faultEvent(event:FaultEvent):void{
            Alert.show(event.fault.faultCode);
            Alert.show(event.fault.faultString);
        public static function getPageInfo(id:int):void{
            pageDetails.addEventListener(ResultEvent.RESULT, returnPageDetails);
            pageDetails.addEventListener(FaultEvent.FAULT, faultEvent);
            pageDetails.showBusyCursor = true;
            pageDetails.GetPage(id);
        public static function returnPageDetails(event:ResultEvent):void{
            //pageDetails.showBusyCursor = false;
            pageInfo = event.result;
I just want a preloader to pop up once the DataGrid with Id : pageList  is clicked.because once the item is clicked, it calls another webservice.
ive spent over a week trying ot figure this out, but with no avail!!
please help

Below is a simple app with a basic component that just flashes some text- hope this helps
Also the app can be disabled {FlexGlobals.topLevelApplication.enabled=false;} i commented this out in the code as it obviously won't allow you to press buttons
You could read up on popupmanager if you want to get into modal style window/dialog boxes.
David.
The App---
<?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/halo" width="385" height="400">
     <fx:Script>
          <![CDATA[
               private var PreLoad:waitLoad = new waitLoad();
               protected function button1_clickHandler(event:MouseEvent):void
                    myPanel.addElement(PreLoad); <---add the preloader
                    //FlexGlobals.topLevelApplication.enabled=false;
               protected function button2_clickHandler(event:MouseEvent):void
                    myPanel.removeElementAt(myPanel.getElementIndex(PreLoad)); <-- now remove it
                    //FlexGlobals.topLevelApplication.enabled=true;
          ]]>
     </fx:Script>
     <s:Button label="Start" click="button1_clickHandler(event)" horizontalCenter="0" top="10"/>
     <s:Button label="Stop" horizontalCenter="0" click="button2_clickHandler(event)" bottom="10"/>
     <s:Group id="myPanel" width="208" height="148" horizontalCenter="0" verticalCenter="0">
     </s:Group>     
</s:Application>
The Preloader  (waitLoad.mxml)
<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
           xmlns:s="library://ns.adobe.com/flex/spark"
           xmlns:mx="library://ns.adobe.com/flex/halo" verticalCenter="0" horizontalCenter="0" width="200" height="46"
               activate="group1_activateHandler(event)">
<fx:Declarations>
     <s:Animate id="flasher" target="{st}" repeatCount="0" duration="1000" repeatBehavior="reverse">
          <s:SimpleMotionPath property="alpha" valueFrom="0" valueTo="1.0"/>
     </s:Animate>     
</fx:Declarations>     
<fx:Script>
     <![CDATA[
          protected function group1_activateHandler(event:Event):void
            flasher.play();
     ]]>
</fx:Script>     
     <s:SimpleText id="st" text="Waiting..." fontFamily="Arial" fontSize="20" color="#DE1A1A" fontWeight="bold" textAlign="center"
                      width="128" height="28" horizontalCenter="0" verticalCenter="0" alpha="0"/>
</s:Group>

Similar Messages

  • Problem with Webservice Introspection Wizard in FB3 beta 2

    The wizard finishes, and I have a nice set of AS classes from
    the WSDL. However, when I try and use any of the classes, I get
    compile errors all over the place.
    Apparently, the wizard creates references to custom events in
    the main service class like this:
    * Dispatches when a call to the operation GetUserInfoEx
    completes with success
    * and returns some data
    * @eventType GetUserInfoExSoapOutResultEvent
    [Event(name="GetUserInfoExSoapOut_result",
    type="GetUserInfoExSoapOutResultEvent")]
    * Dispatches when a call to the operation FindUsers
    completes with success
    * and returns some data
    * @eventType FindUsersSoapOutResultEvent
    [Event(name="FindUsersSoapOut_result",
    type="FindUsersSoapOutResultEvent")]
    But, no supporting classes for the event types are generated.
    So, I get errors when the main class tries to do stuff like:
    * @see IADUtils#addGetUserInfoEx()
    public function
    addgetUserInfoExEventListener(listener:Function):void
    addEventListener(GetUserInfoExSoapOutResultEvent.GetUserInfoExSoapOut_RESULT,listener);
    * @private
    private function
    _GetUserInfoEx_populate_results(event:ResultEvent):void
    var e:GetUserInfoExSoapOutResultEvent = new
    GetUserInfoExSoapOutResultEvent();
    e.result = event.result as Object;
    getUserInfoEx_lastResult = e.result;
    dispatchEvent(e);
    The
    addEventListener call and the
    new GetUserInfoExSoapOutResultEvent generate errors because
    the compiler doesn't know anything about the custom event types.
    Is this a bug in the wizard, or am I supposed to code those
    custom event classes myself? And, if I'm supposed to code the
    custom events myself, are they just normal result events, or is
    there some additional code I don't know about?
    There doesn't seem to be any good documentation (flex docs,
    tutorials, sample code, etc) on how to use the code generated by
    the wizard. Does anyone know of any examples?
    TIA,
    Randy

    Hi Randy,
    This seems to be caused by a missing import in that class.
    Try adding this line on top of the file (next to the other import
    statements) and see if it solves the problem:
    import mx.utils.ObjectProxy;
    This should be fixed in the next release, but if you can file
    a bug and attach the wsdl file so we can reproduce the bug and
    confirm it does not happen anymore it would be very helpful.
    Thanks,
    Cristian

  • Fx Webservice Introspection wizard bug

    It seems the Fx Webservice Introspection is not interpreting
    the wsdl correctly. By using TCPMonitor I was able to capture my
    soap request from my java spring-ws junit test. The correct
    response is as follows:
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="
    http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Header/>
    <SOAP-ENV:Body>
    <ns4:ProcessChucksPick3LotteryNumberRequest
    xmlns:ns2="
    http://www.chuckspick3.com/WebserviceClient"
    xmlns:ns3="
    http://www.chuckspick3.com/lotterysystem/common-schemas"
    xmlns:ns4="
    http://www.chuckspick3.com/lotterysystem/schemas">
    <ns2:webServiceClient>
    <ns2:id>0</ns2:id>
    <ns2:customerName>test</ns2:customerName>
    <ns2:customerUserName>test</ns2:customerUserName>
    <ns2:custoemrPw>test</ns2:custoemrPw>
    </ns2:webServiceClient>
    <ns3:chucksPick3LotteryNumber>
    <ns3:number>345</ns3:number>
    <ns3:requestDate>2008-10-29T20:32:37.171-05:00</ns3:requestDate>
    <ns3:drawingType>MidDay</ns3:drawingType>
    </ns3:chucksPick3LotteryNumber>
    </ns4:ProcessChucksPick3LotteryNumberRequest>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Using the code generated from the Fx Webservice Introspection
    wizard I get the following invalid soap request:
    notice that there are no namespaces specified.
    <SOAP-ENV:Envelope>
    <SOAP-ENV:Body>
    <tns:webServiceClient>
    <tns:id>1</tns:id>
    <tns:customerName>test</tns:customerName>
    <tns:customerUserName>test</tns:customerUserName>
    <tns:custoemrPw>test</tns:custoemrPw>
    </tns:webServiceClient>
    <ns0:chucksPick3LotteryNumber>
    <ns0:number>234</ns0:number>
    <ns0:requestDate xsi:nil="true"/>
    <ns0:drawingType>Day</ns0:drawingType>
    <ns0:type>Customer Provided Winning Pick 3 Lottery
    Number</ns0:type>
    </ns0:chucksPick3LotteryNumber>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    I think there is a bug in the code generated from the Fx
    Webservice Introspection wizard. You can download or view my wsdl
    by clicking
    here.
    If this is not a bug, can some one please tell me what I am
    doing wrong.
    I hope someone will respond to this post as I really want to
    use flex for webservices; but have not been successful.
    Thanks!

    Hi Randy,
    This seems to be caused by a missing import in that class.
    Try adding this line on top of the file (next to the other import
    statements) and see if it solves the problem:
    import mx.utils.ObjectProxy;
    This should be fixed in the next release, but if you can file
    a bug and attach the wsdl file so we can reproduce the bug and
    confirm it does not happen anymore it would be very helpful.
    Thanks,
    Cristian

  • Hi there, I am trying to connect to my server at work from home using a vpn connection. It connects fine and the time ticks along, but when i click go - connect to server, it comes up with connection failed. Please help!

    Hi there, I am trying to connect to my server at work from home using a vpn connection. It connects fine and the time ticks along, but when i click go - connect to server, it comes up with connection failed. Please help!

    ... when i click go - connect to server, it comes up with connection failed.
    If you're trying to connect to a Bonjour server on the remote network, that won't work over a layer 3 VPN. Use something like Hamachi or one of the SSH-tunnelling Bonjour proxy apps for that.

  • I want to bring over music from my iTunes library on iMac to an ipod touch with another apple id. please help

    I want to bring over music from my iTunes library on iMac to an ipod touch with another apple id. please help. Is this possible. In former versions of itunes this was posible. I can't find the solution is iTunes 11

    Perhaps those apps require a newer version of iOS than is compatible with your iPod.

  • HT4199 I just got a new iPod touch 4th generation and I'm trying to connect to my router and my iPod says, 'Cannont find network.' I don't know what to do! No other networks come up on the list so I can't 'tag' along with thier wifi. Please help. I need a

    I just got a new iPod touch 4th generation and I'm trying to connect to my router and my iPod says, 'Cannont find network.' I don't know what to do! No other networks come up on the list so I can't 'tag' along with thier wifi. Please help. I need advice.

    What type network is yu router set up for? The 4G iPod can only connect and see 2.4 GHZ networl like B, G and the 2,4 GHz N. There is also a 5 GHz N but the iPod will not even seethat network.
    See:
    iOS: Troubleshooting Wi-Fi networks and connections
    iOS: Recommended settings for Wi-Fi routers and access points

  • What's wrong with my code? please help....

    when display button is clicked it must diplay the remarks but it didn't happen...
    what's wrong with my code? please help
    here is my code.....
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    public class Area extends Applet implements ItemListener,ActionListener
         {Label arlbl = new Label("AREA");
          Choice archc = new Choice();
          Label extlbl = new Label("EXPENDITURE TYPE");
          CheckboxGroup extchk = new CheckboxGroup();
              Checkbox fchk = new Checkbox("FOOD",extchk,true);
              Checkbox schk = new Checkbox("SHELTER",extchk,false);
              Checkbox echk = new Checkbox("EDUCATION",extchk,false);
              Checkbox uchk = new Checkbox("UTILITIES",extchk,false);
          Label exalbl = new Label("EXPENDITURE AMOUNT");
          TextField exatf = new TextField("",20);
          Label remlbl = new Label("REMARKS");
          TextField remtf = new TextField("",30);
          Button disbtn = new Button("DISPLAY");
          Button resbtn = new Button("RESET");
          String display;
          public void init()
              {add(arlbl);
               archc.add("MANILA");
               archc.add("MAKATI");
               archc.add("QUEZON");
               archc.add("PASAY");
               add(archc);
               archc.addItemListener(this);
               add(extlbl);
               add(fchk);
               fchk.addItemListener(this);
               add(schk);
               schk.addItemListener(this);     
               add(echk);
               echk.addItemListener(this);
               add(uchk);
               uchk.addItemListener(this);
               add(exalbl);
               add(exatf);
               add(remlbl);
               add(remtf);
               add(disbtn);
               disbtn.addActionListener(this);
               add(resbtn);
               resbtn.addActionListener(this);
         public void itemStateChanged(ItemEvent ex)
              {int n = archc.getSelectedIndex();
               if(n==0)
                   {if(fchk.getState())
                         {exatf.setText("10000.00");
                         display = archc.getSelectedItem();
                   if(schk.getState())
                        {exatf.setText("15000.00");
                        display = archc.getSelectedItem();
                   if(echk.getState())
                        {exatf.setText("24000.00");
                        display = archc.getSelectedItem();
                   if(uchk.getState())
                        {exatf.setText("8500.00");
                        display = archc.getSelectedItem();
              if(n==1)
                   {if(fchk.getState())
                        {exatf.setText("5000.00");
                        display = archc.getSelectedItem();
                   if(schk.getState())
                        {exatf.setText("11000.00");
                        display = archc.getSelectedItem();
                   if(echk.getState())
                        {exatf.setText("7500.00");
                        display = archc.getSelectedItem();
                   if(uchk.getState())
                        {exatf.setText("24000.00");
                        display = archc.getSelectedItem();
              if(n==2)
                   {if(fchk.getState())
                        {exatf.setText("13000.00");
                        display = archc.getSelectedItem();
                   if(schk.getState())
                        {exatf.setText("7000.00");
                        display = archc.getSelectedItem();
                   if(echk.getState())
                        {exatf.setText("27000.00");
                        display = archc.getSelectedItem();
                   if(uchk.getState())
                        {exatf.setText("6000.00");
                        display = archc.getSelectedItem();
              if(n==3)
                   {if(fchk.getState())
                        {exatf.setText("6000.00");
                        display = archc.getSelectedItem();
                   if(schk.getState())
                        {exatf.setText("9000.00");
                        display = archc.getSelectedItem();
                   if(echk.getState())
                        {exatf.setText("15000.00");
                        display = archc.getSelectedItem();
                   if(uchk.getState())
                        {exatf.setText("19000.00");
                        display = archc.getSelectedItem();
         public void actionPerformed(ActionEvent e)
              {if(e.getSource() == disbtn)
                    {String amtstr = exatf.getText();
                     int amt = Integer.parseInt(amtstr);
                        {if(amt > 8000)
                             {remtf.setText(display + " IS ABOVE BUDGET");
                        else
                             {remtf.setText(display + " IS BELOW BUDGET");
              if(e.getSource() == resbtn)
                   {archc.select(0);
                   fchk.setState(true);
                   schk.setState(false);
                   echk.setState(false);
                   uchk.setState(false);
                   exatf.setText("");
                   remtf.setText("");
    Edited by: lovely23 on Feb 28, 2009 11:24 PM

    Edit: thanks for cross-posting this question on another forum. I now see that I wasted my time trying to study your code in the java-forums to help you with an answer that had already been answered elsewhere (here). Do you realize that we are volunteers, that our time is as valuable as yours? Apparently not. Cross-post again and many here will not help you again. I know that I won't.

  • I have created a form which needs to be completed once a week for 6 weeks. On completing week 1, weeks 2 - 6 are completed at the same time with week 1 information. please help?

    I have created a form which needs to be completed once a week for 6 weeks. On completing week 1, weeks 2 - 6 are completed at the same time with week 1 information. please help?

    Hello, thanks for replying.
    Yes they just copy to the next page, the fields are the same. The document is an observation to school lessons so it needs to be consistent but with different data on.

  • Cant download itunes, because ' there is an error with windows installer package' please help?

    cant download itunes, because ' there is an error with windows installer package' please help?

    I am getting the same message when I try to install the latest version of iTunes, I am running on Windows Vista Home Premium. I have tried so many different things to try to correct this and have now completly unistalled it from my laptop..... Now I have no iTunes what-so-ever on it and still can't install it. I found an older versin of iTunes and it installed without any problems, but I can't access it because my library was created on a newer version! Talk about frustrated..... WE NEED HELP!!!!!

  • HT5312 I forget answer to my qustion with rescue email adrees please help me and send the answer to my main mail. Thank you very much

    I forget answer to my qustion with rescue email adrees please help me and send the answer to my main mail. Thank you very much

    We are fellow users here on these forums, you're not talking to iTunes Support.
    If you don't have access to your rescue email account, or you don't have one on your iTunes account, then you will need to contact iTunes Support / Apple to get the questions reset.
    Contacting Apple about account security : http://support.apple.com/kb/HT5699
    When they've been reset you can then use the steps half-way down this page to add/change a rescue email address for potential future use : http://support.apple.com/kb/HT5312

  • I want to put music on my iPhone but when I want to do it it keeps telling me that I can't to id with a sign. Please help me?

    I want to put music on my iPhone but when I want to do it it keeps telling me that I can't to id with a sign. Please help me?

    You will have to upgrade your operating system version and possibly your whole computer.  We cannot provide more information easily until we know more about your system.
    Get more information about your computer. Go to the Apple in the upper left corner of any window, then "About This Mac", then "More Info..."  Copy and paste the information here, but omit the serial number and Hardware UUID (if present).
    Apple does tell you about required equipment for the iPhone -- in 8 point medium gray type on a light gray box.   The Store associates kind of automatically assume everybody is running a new model computer and the one I met when we bought our iPhone had never seen a pre-2008 Mac and was somewhat puzzled why anybody would own such an antique.

  • I am trying to buy an app (Aperture). I don't see a "buy" icon in the app store. If I go to Apple site, there is a buy icon but when I click it, I get a dialogue box saying the link needs to be opened with an application. Please help. Thanks.

    I am trying to buy an app (Aperture). I don't see a "buy" icon in the app store. If I go to Apple site, there is a buy icon but when I click it, I get a dialogue box saying the link needs to be opened with an application. Please help. Thanks.

    Hi ...
    Installing the OS X Lion Update 10.7.3 (Client Combo) will reinstall the App Store for you.
    Restart your Mac after the combo is installed then try purchasing Aperture.

  • I need to install the find my iPhone app on my ipad, it's won't install. Any reasons. Do I need to change something in my settings? I am up to date with my ios7. Please help!

    I need to install the find my iPhone app on my ipad, it will not install. Any reasons. Do I need to change something in my settings? I am up to date with my ios7. Please help!

    Try closing the App Store app via the iPad's taskbar and then do a soft-reset and see if you can install it after the iPad has restarted. To close the App Store : double-click the home button to open the taskbar, and then swipe or drag the App Store app's screen from there up and off the top of the screen to close it, and click the home button to close the taskbar.
    Soft-reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • How do i update my camera raw? I can not find the download update I've just brought a new d4s and I'm using the iMac with cs6 version. PLEASE HELP..

    How do i update my camera raw? I can not find the download update I've just brought a new d4s and I'm using the iMac with cs6 version. PLEASE HELP..

    The Adobe auto updater is pretty decent in CS6.  Just go to the Photoshop Help menu > Updates.
    You will be able to update ACR, Photoshop and Bridge right there, if there are in fact updates available.

  • I reset my phone and it now receives calls that were meant for my husband. I know how to fix this with messaging and facetime, but can't seem to find how to make it stop with the calls. Please help.

    I reset my phone and it now receives calls that were meant for my husband. I know how to fix this with messaging and facetime, but can't seem to find how to make it stop with the calls. Please help.

    It may be due to Continuity
    The following quote is from  Connect your iPhone, iPad, and iPod touch using Continuity
    Turn off iPhone cellular calls
    To turn off iPhone Cellular Calls on a device, go to Settings > FaceTime and turn off iPhone Cellular Calls.

Maybe you are looking for