繁忙的光标显示中的问题 [英] problem in busy cursor display

查看:73
本文介绍了繁忙的光标显示中的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于下面的代码,我想在loadvalues函数中添加繁忙的光标.所以我像下面的代码所示那样添加了繁忙的光标.但它不起作用.所以告诉我是什么问题.我是这个Flex的新手,所以请帮助我.........


Hi, For the below code i want add busy cursor in loadvalues function. So i added like busy cursor as show in below code. but its not working. So tell me what the problem. i''m new to this flex so pls help me in this.........


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
    creationComplete="loadValues()" horizontalAlign="center"
    verticalAlign="middle"  color="#080808" borderColor="#FFF8E0" backgroundColor="#FFF8E0"
    xmlns:local="*"
    xmlns:tInput="assets.actionScript.*"
    xmlns:controls="com.iwobanas.controls.*"
    initialize="initTimer()"
    xmlns:dataGridClasses="com.iwobanas.controls.dataGridClasses.*"
    applicationComplete="init(event)" height="100%" width="100%">

<mx:Style source="defaults.css" />

<mx:Script>
    <![CDATA[
        import assets.actionScript.Trim;
        import com.scottlogic.charts.DataGridExporter;
        import mx.controls.ComboBase;
        import assets.script.pods.view.Data;
        import org.alivepdf.layout.Unit;
        import mx.collections.ICollectionView;
        import assets.actionScript.EscalationDTO;
        import alarmSlide.TowerSelection;

        import flash.net.navigateToURL;
        import mx.binding.utils.BindingUtils;
        import mx.controls.dataGridClasses.DataGridItemRenderer;
        import mx.events.ListEvent;
        import mx.charts.chartClasses.DualStyleObject;
        import assets.actionScript.TowerInchargeRoleMappingDTO;
        import flash.utils.clearInterval;
        import flash.utils.setInterval;
        import alarmSlide.SendMessageForEscalation;
        import mx.skins.halo.BusyCursor;
        import alarmSlide.REForAlarmReport;
        import flash.events.*;

        import mx.managers.ToolTipManager;
        import mx.controls.ToolTip;
        import mx.collections.SortField;
        import mx.collections.Sort;
        import mx.messaging.messages.RemotingMessage;
        import mx.events.AdvancedDataGridEvent;
        import assets.actionScript.TowerStatus;
        import mx.rpc.events.FaultEvent;
        import mx.rpc.events.ResultEvent;
        import assets.actionScript.ValueObject;
        import mx.messaging.channels.AMFChannel;
        import alarmSlide.LEDChar;
        import mx.utils.URLUtil;
        import com.adobe.serialization.json.JSON;
        import com.adobe.serialization.json.JSONDecoder;
        import mx.collections.ArrayCollection;
        import mx.collections.IViewCursor;
        import mx.collections.IHierarchicalCollectionView;
        import mx.controls.Alert;
        import mx.managers.PopUpManager;
        import flash.net.FileReference;
        import mx.messaging.messages.IMessage;
        import mx.messaging.Channel;
        import mx.messaging.ChannelSet;
        import mx.messaging.channels.StreamingAMFChannel;
        import flash.display.StageDisplayState;
        import mx.collections.ArrayCollection;
        import mx.managers.CursorManager;

        private var sendMessageScreen:SendMessageForEscalation;
        private var escalationAlarmHistoryPopup:EscalationAlarmHistoryPopup;
        public var manualOrScheduleTicketing:ManualOrScheduleTicketing;
        public var editEscalationLevelPopup:EditEscalationLevelPopup;
        private var escalationLevelPopup:EscalationLevelPopup;
        private var escalationSiteDetailsPopup:EscalationSiteDetailsPopup;

        [Bindable] private var towerName:String = "NoData";
        [Bindable] private var contactNumber:String = "NoData";

        // Data Storgae variables
        [Bindable] private var energyConsumption:ArrayCollection = new ArrayCollection();
        [Bindable] public var dataColl:ArrayCollection = new ArrayCollection();
        [Bindable] public var closedTicketArrayColl:ArrayCollection = new ArrayCollection();
        [Bindable] private var towerDetails:ArrayCollection = new ArrayCollection();
        [Bindable] private var escalationData:ArrayCollection = new ArrayCollection();
        [Bindable] public var escalationLevelDetails:ArrayCollection = new ArrayCollection();
        [Bindable] public var towerEscalationLevelDetails:ArrayCollection = new ArrayCollection();
        [Bindable] private var escalationMasterList:ArrayCollection = new ArrayCollection();
        [Bindable] public var alarmDetailsList:ArrayCollection = new ArrayCollection();

        [Bindable] public var siteInformationList:ArrayCollection;
        [Bindable] public var communicationInfoList:ArrayCollection;
        [Bindable] public var operatorDetailsList:ArrayCollection;
        [Bindable] public var siteLiveDataList:ArrayCollection;
        [Bindable] public var siteLiveAlarmDetailsList:ArrayCollection;
        [Bindable] public var ticketEscalationStateList:ArrayCollection = new ArrayCollection();
        [Bindable]
        public var siteAndDistrictDisplayName:String="";
        public var categoriesArrColl:ArrayCollection = null;
        public var tempArrColl:ArrayCollection = null;
        public var userID:int = 0;
        public var customertId:int = 3;
        private var popupWin:PopupForTicketing;
        // to store tower configuration
        public static var data:ArrayCollection = new ArrayCollection();

        private var intervalUnit:uint;

        [Bindable]
        public var folderList:XMLList;
        // BlazeDS variables
       [Bindable] public var channelUrl:String;

        [Bindable] public var liveId:int=0;

        [Bindable]
        public var emailOrSmsMessageFormat:String = "";

        [Bindable]
        private var escalationEditOption:Boolean = false;

        [Bindable]
        private var swapCount:int = 0;

//  ---------------------------- To Control Session ------------------------- //
        public var myTimer:Timer;

        private function initTimer():void
        {
             myTimer = new Timer(1800000);
             myTimer.addEventListener("timer",logout);
             this.addEventListener(MouseEvent.MOUSE_MOVE, resetTimer);
             myTimer.start();
        }

        private function logout(event:Event):void
        {
            this.addEventListener(MouseEvent.CLICK,forward);
        }

        private function forward(event:Event):void
        {
            navigateToURL( new URLRequest("jsp/checkin/index.jsp"),"_self");
        }

        private function resetTimer(event:Event):void
        {
            myTimer.reset();
            initTimer();
        }
//  ---------------------------- To Control Session ------------------------- //
//***************************************************************************************************************************************//
            /**
            * This method will be called as soon as SWF loads in the browser , creating a AMF channel which communicates to Java
            **/
            private function loadValues():void{

                ticketViewStack.selectedChild = liveTicketVBox;
                    /*userID = Application.application.parameters.userId;
                customertId = Application.application.parameters.customerId;
                if("true" == Application.application.parameters.escalationEditOption.toString()){
                    escalationEditOption = true;
                }
                channelUrl = "./messagebroker/amf";
            */

                userID = 92;
                customertId = 3;
                escalationEditOption = true;
                channelUrl = "http://localhost:8080/Telecom/messagebroker/amf";

                var cs:ChannelSet = new ChannelSet();
                var customChannel:AMFChannel = new AMFChannel("my-amf",channelUrl);
                cs.addChannel(customChannel);
                remoteObject.channelSet = cs;
                remoteObject.getEscalationMaster();
                //Alert.show("its loading......");

                //Alert.show("its loading...133434...");
                cursorManager.setBusyCursor();
                remoteObject.getAllLiveEscalationDetails(userID,customertId,displayTower.selectedItem.data,ticketType.selectedItem.data);
                cursorManager.removeBusyCursor();
                displayTower.selectedIndex = 0;
                refereshTime.selectedIndex = 0;

            }

//***************************************************************************************************************************************//
            public var selectedTicketState:Number= 0;
            // Handle the recevied message.
            private function resultHandler(event:ResultEvent):void {
                var message:RemotingMessage = event.token.message as RemotingMessage;
                switch(message.operation)
                {
                    case "getAllLiveEscalationDetails":
                            dataColl = new ArrayCollection();
                            dataColl = event.result as ArrayCollection;
                            break;


****************************************************** **************************************


我在loadvalues()函数中添加了忙碌的游标.


************************************************************************************


i added busy cursor in loadvalues() function.

推荐答案

...但是您永远不会调用该函数loadvalues() ...

忙指示器(通常称为忙指示器")可以通过简单的Flex编码来使用:
...but you are never calling that function loadvalues()...

The Busy Indicator (That''s what this is called in general) can be used by simply Flex-Coding it: Display the busy indicator for long-running activity in a mobile application[^] @ adobe.com help


这篇关于繁忙的光标显示中的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆