Flex and Webservices

Good morning!
I have written a WSDL that soapClient.com reads ok. My problem is, Flex doesn't, and complains that there is no operation. What am I doing wrong?
Is there a peculiarity in Flex's interpretation of WSDL?
Thanks in advance for any idea !

You have to mention Web Method name to be called of the web service.
Suppose,
I have created WebService Obj "ws" at flex end
I have web method "CallDummyData" at server side
then syntax would be:
var ws:WebService = new WebService();
ws.CallDummyData.send();
If you want to pass parameters to web method then you can pass it using:
-- String --
ws.CallDummyData.send("Param1");
-- Object --
var objVal:Object = new Object();
objVal.name = "MyName";
ws.CallDummyData.send(objVal);
If you are getting web method name dynamically then syntax should be:
var _wsGeneralMethod:String = "CallDummyData" // Could be retrieved from server at run time
ws.getOperation(_wsGeneralMethod).send();
I guess this would help to resolve you problem. let me know if you need more details.
If this helps you then please mark it as answered.
Best Regards,
Yogesh

Similar Messages

  • Problem with the flex and the webservice

    Hey everyone,
    I have a problem with flex; I declared a web service ( that I
    test it and it works ) inside flex and declared also the operation.
    But it seems that flex doesn't recognize the web method so
    when i use something like
    ws.Getheader.send()
    it pop up an error : Property Send not found on ....
    and in the intellisens menu after I write ws. I don't find my
    method
    here is a fragment of the code :
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute"
    xmlns:local="*"
    creationPolicy="all"
    backgroundColor="white"
    backgroundGradientColors="white"
    themeColor="#8190b7"
    width="970"
    creationComplete="initVars()">
    <mx:WebService id="ws" wsdl="
    http://localhost/csp/SearchWS.asmx?WSDL"
    useProxy="false">
    <mx:operation name="SearchHeaderText" />
    </mx:WebService>
    <mx:Script>
    <![CDATA[
    import mx.events.ListEvent;
    import flash.net.*;
    import mx.rpc.soap.*;
    import mx.controls.Alert;
    import mx.rpc.events.ResultEvent;
    import mx.rpc.events.FaultEvent;
    import mx.utils.ObjectUtil;
    import mx.rpc.http.HTTPService;
    private function initVars():void
    ws.SearchHeaderText.Send()
    ]]>
    </mx:Script>

    Have you tried the data wizard in Flex Builder 3 ?
    Data > Import Web Service (WSDL).
    It will create all the classes automatically for you from the
    WSDL. More about this here:
    http://www.adobe.com/devnet/flex/articles/flex_ws.html?devcon=f4

  • Flex and Java on Desktop

    Hi
    We are having this requirement , we want to develop a
    application using flex for adobe AIR runtime which will communicate
    with java in the desktop, we are not having any servers here, so
    flex application want to communicate with java classes with out the
    help of any server so I can't use httpservice, webservice or
    remoting .
    I like to know the ways to communicate from flex 3.0(Adobe
    AIR) to java files (java takes care of splitting PowerPoint
    files and converting it into serious of jpeg files, and
    creating ppt files from the objects returned from flex ).
    Is there any other way to communicate form between flex and
    java in the desktop ??? please give inputs
    Thiru

    Hi,
    you could use XMLSocket or Socket classes depending on the
    type of communication you want to stablish.
    I have been testing this for a while although not for a
    project.
    However my impression is that you need to install the AIR app
    which is self-extracted and installed, but in second hand, you have
    to install the Java app, that acts as a server, and it must be
    executed every time your AIR app is, and the other way around.
    Untill now I haven't got any idea on doing this without too
    much work, but you can take a look at the Merapi project.
    Manu

  • Bindable variable and WebServices

    Hi,
      I am new to flex and am trying to create a simple interactive application which interacts with a Web service.
    I am using a button to trigger the web service call and want to display the data in a data grid component. I also have a Combo box which i am populating with the first column of the same web service's result set.
    The problem I am facing is that both the components seem to have a lag of one click. Which means, when i click the Get Data button to trigger the web service call the first time, the web service returns data (verified by the web service logs) but it is not displayed on the data grid. The next time i click on the Get Data button, the data is displayed.
    I have pasted the code below. Please let me know where i have gone wrong in it.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    backgroundGradientColors="[0xFFFFFF,0xAAAAAA]"
    horizontalAlign="left"
    verticalGap="15" horizontalGap="15" >
    <mx:WebService id="dataFetching"
    wsdl="http://localhost:8080/SRS/services/KeyDriversChainDataService?wsdl"
    fault="mx.controls.Alert.show(event.fault.faultString)"
    >
         <mx:operation name="getMRSMarkets">
            <mx:request>
                  <viewType>DSB</viewType>
                 <category>HOTS</category>
                 <segment>ALL</segment>
                 <tradingCo>ALL</tradingCo>
                 <brand>ALL</brand>
                 <timeframe>Weekly-TABLE</timeframe>
                 <analyticType>SUMMARY</analyticType>
                 <market>Total Coverage</market>
                 </mx:request>
        </mx:operation>
    </mx:WebService>
    <mx:Script>
         <![CDATA[
                  import mx.collections.ArrayCollection;
                  import mx.rpc.events.ResultEvent;
                  import mx.rpc.events.FaultEvent;
                  [Bindable]
                  public var distinctMrkt:ArrayCollection;
              private function getMarkets(): void{
                   dataFetching.getMRSMarkets.send();
                   distinctMrkt = dataFetching.getMRSMarkets.lastResult as ArrayCollection;
                   table.dataProvider = distinctMrkt;
              private function showGraph(market:String):void{
                   selected.text=market;
    ]]>
    </mx:Script>   
    <mx:Button id="datafetch" label="Get Data" click="getMarkets()"/>
    <mx:DataGrid id="table" width="100%" >
         <mx:columns>
              <mx:DataGridColumn dataField="a1_market" headerText="Market"/>
              <mx:DataGridColumn dataField="a2_analytic_type" headerText="Analytic Type"/>
         </mx:columns>
    </mx:DataGrid>
    <mx:ComboBox id="dropdown" dataProvider="{distinctMrkt}" labelField="a1_market"
    click="showGraph(dropdown.selectedLabel)"/>
    <mx:HBox>
              <mx:Label text="Selected item is: "/>
              <mx:Label id="selected" />
    </mx:HBox>
    </mx:Application>

    Hi Abdellatif,
    Ok, that would clarify things.
    You have an idea if this is documented somewhere?
    Reason we ask:the "xi3-1_designer_en" guide, the specification for the @variable function states:
    "BusinessObjects system variables. ...
    Report variables. ...
    Operating system variables. You can enter Windows environment variables in order to obtain information about your installation.
    Custom variables. With Desktop Intelligence, you can use a predefined text file to provide a list of fixed variable values."
    There's no explicit referal to DeskI only for OS system variables, like there is for custom variables.
    Thanks!
    Raf

  • Purchase Order Dashboard using Adobe Flex and AIR

    Hi ,
      I have written a AIR apps for displaying the Purchase Order using OPen source Flex and AIR making Web Service calls to our SAP R3  6.20 Backend System . If anybody would be interested in taking a look at it and expanding the apps please free to post at those forum with the your email ID . I can send the AIR apps along with the source code .
    Thnks
    V

    I have uploaded the zip file containing my code . If anybody is interested can download from this link .
    http://www.mediafire.com/?8mfesdczsuv
    Vinod

  • Problem in creating client side PDF with image using flex and AlivePD

    I need a favor I am creating client side PDF with image using flex and AlivePDF for a web based application. Images have been generated on that pdf but it is creating problem for large size images as half of the image disappeared from that pdf.I am taking the image inside a canvas . How do i control my images so that they come fit on that pdf file for any image size that i take.
    Thanks in advance
    Atishay

    I am having a similar and more serious problem. It takes a
    long time to execute, but even attaching a small image balloons the
    pdf to 6MB plus. After a few images it gets up to 20MB. These are
    100k jpeg files being attached. The resulting PDF is too large to
    email or process effectively. Does anyone know how to reduce
    size/processing?

  • Directory structure for servlets and webservices in one application

    hi,
    Can any one help me for creating servlets and webservices in one
    application and deploying in Jboss 4.2.0.
    I want to know exactly what is the directory structure for creating this
    application and what are the additional .xml files for deploying this application.
    if any one know this answere please tell the answere.

    I figured out a solution - it's a problem of policies. In detail: Server1's codebase entry (file:) refers to the class directory of Server1's project. In the simple case of only Client1, which has no codebase entry, it works fine without a file permission on the side of Server1. In the complex case of Client1+Server2, which has to have a codebase entry (file:) refering to the class directory of the Server2's project on a separate machine, for exactly the same method call from Client1 to Server1 a file permission entry on the side of Server1 is needed for Server1's class directory. But WHY ???
    It seems to be a little confusing with the codebase entries, many of the posts are contrary to others and to my personal experiences. Some comments given by Adrian Colley throw a little light upon some aspects. Is there anybody, who can explain the whole topic, when, why, and which part of RMI application deals with codebase entries, also in case of not dynamic code downloading ? May be there is also a reference into the java docs, which I didn't found up to now.
    Thanks in advance
    Axel

  • How do I save a file to a server using flex and coldfusion?

    How do I save a file to a server using flex and coldfusion?
    On the CF side I might need to use this:
    <cffile action="UPLOAD" filefield="Filedata"
    destination="#expandpath('..\somepath)#"
    nameconflict="overwrite">
    And on the flex side I might need to use something like this:
    var sendVars:URLVariables = new URLVariables();
    sendVars.action = "upload";
    var request:URLRequest = new URLRequest();
    request.data = sendVars;
    request.url = _strUploadScript;
    request.method = URLRequestMethod.POST;
    _refUploadFile = new FileReference();
    _refUploadFile = _arrUploadFiles[_numCurrentUpload].data;
    _refUploadFile.addEventListener(ProgressEvent.PROGRESS,
    onUploadProgress);
    _refUploadFile.addEventListener(Event.COMPLETE,
    onUploadComplete);
    _refUploadFile.addEventListener(IOErrorEvent.IO_ERROR,
    onUploadIoError);
    _refUploadFile.addEventListener(SecurityErrorEvent.SECURITY_ERROR,
    onUploadSecurityError);
    _refUploadFile.upload(request, "file", false);
    I just don't know how to put it all together in Coldfusion.

    try this...
    http://cf-creations.co.uk/blog/index.cfm/2008/9/20/Flex--File-Upload-Form--Part-One--Build ing-The-Initial-Form

  • Sharing code between Flex and AIR versions using library project

    Hello everyone,
    I'm developing an application that has both Flex and AIR versions. In order to share code between these apps, I created a library project and added all my code there. Now I've set the library project as a dependency for both Flex and AIR projects. Since there are some components that use the DataService object, I've added fds.swc and fds_rb.swc and fiber_rb.swc modules to the libs directory of the library project. No compile errors. Now, if I try to run my Flex application, I'm getting this error:
    Variable mx.data::LocalStoreFactory is not defined.
    I know that this error comes up when playerfds.swc is not present in the path. But that is not the case here. I have added playerfds.swc, fds.swc and related lib files to the build path.
    If I go back and add the playerfds.swc file to the original library project, the error no longer appears. This is not a proper solution for me, since I need to share this project with AIR version also, and I cannot have both playerfds.swc and airfds.swc in the same project.. Has anyone faced an issue like this before?? What am I doing wrong??

    Hello everyone,
    I'm developing an application that has both Flex and AIR versions. In order to share code between these apps, I created a library project and added all my code there. Now I've set the library project as a dependency for both Flex and AIR projects. Since there are some components that use the DataService object, I've added fds.swc and fds_rb.swc and fiber_rb.swc modules to the libs directory of the library project. No compile errors. Now, if I try to run my Flex application, I'm getting this error:
    Variable mx.data::LocalStoreFactory is not defined.
    I know that this error comes up when playerfds.swc is not present in the path. But that is not the case here. I have added playerfds.swc, fds.swc and related lib files to the build path.
    If I go back and add the playerfds.swc file to the original library project, the error no longer appears. This is not a proper solution for me, since I need to share this project with AIR version also, and I cannot have both playerfds.swc and airfds.swc in the same project.. Has anyone faced an issue like this before?? What am I doing wrong??

  • I have built a android application using adobe flex, and i have exported it with native air. The application is working fine on samsung phones whereas it is getting crashed on Moto Phones, which runs on android kitkat, is there any compatibility issue ?,

    I have built a android application using adobe flex, and i have exported it with native air. The application is working fine on samsung phones whereas it is getting crashed on Moto Phones, which runs on android kitkat, is there any compatibility issue ?, I have built a android application using adobe flex, and i have exported it with native air. The application is working fine on samsung phones whereas it is getting crashed on Moto Phones, which runs on android kitkat, is there any compatibility issue ?, I have built a android application using adobe flex, and i have exported it with native air. The application is working fine on samsung phones whereas it is getting crashed on Moto Phones, which runs on android kitkat, is there any compatibility issue ?

    Thanks, Flex harUI, for the direction in regards to isolating build changes. That aside (still working on it), can you offer any direction in regards to my original question on SDK and AIR compatibility? I'm specifically looking for a version compatibility mapping or anything that definitively states, "Flex SDK x.y.z works with the following versions of AIR". This information is crucial for us in order to more specifically plan our own roadmap built upon these two frameworks as we consider both existing installations of our software and future distributions.

  • Flex and BlazeDS Compile for Deployement

    Hi,
    I've been following the Flex + BlazeDS tutorial on the Message Service from adobe to start learning working with blazeds. Everything worked out great on the local server of course but I got stuck when it came to moving the files to a remote server. I've looked around quite a lot and found out it's because the compiler feeds the services-config.xml upon compile and at lease in my case won't take and external file. The solution everyone has been posting on the net is writing the channels in actionscript within flex and feedin it the valid endpoint that would be found in the xml configuration file. That's all nice and dandy but everyone has been talking and showing examples of this being done for RemoteObject and I haven't managed to find any examples for Messaging.
    Can anyone help me out with an example on how to deploy my application to a server? (either by coding the channels in AS or otherwise) The application itself is pretty basic...
    <?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="200" minHeight="480" creationComplete="consumer.subscribe()" width="250" currentState="EnterName">
    <fx:Script>
      <![CDATA[
       import mx.messaging.events.MessageEvent;
       import spark.events.TextOperationEvent;
      ]]>
    </fx:Script>
    <s:states>
      <s:State name="Chat"/>
      <s:State name="EnterName"/>
    </s:states>
    <fx:Declarations>
      <s:Producer id="producer" destination="chat"/>
      <s:Consumer id="consumer" destination="chat" message="messageHandler(event.message)"/>
    </fx:Declarations>
    <fx:Script>
      <![CDATA[
       import mx.messaging.messages.AsyncMessage;
       import mx.messaging.messages.IMessage;
       private function send():void{
        var message:IMessage = new AsyncMessage();
        message.body.chatMessage = user.text + ":" + " " + msg.text;
        producer.send(message);
        msg.text = "";
       private function messageHandler(message:IMessage):void{
        log.text += message.body.chatMessage + "\n";
      ]]>
    </fx:Script>
    <s:Panel title="Chat" width="100%" height="100%">
      <s:TextArea id="log" height="377" x="10" y="10" width="228" includeIn="Chat"/>
      <mx:ControlBar width="246" height="52" x="1" y="395" includeIn="Chat">
       <s:TextInput id="msg" width="100%" enter="send()"/>
       <s:Button label="Send B" click="send()"/>
       </mx:ControlBar>
      <s:TextInput includeIn="EnterName" x="60" y="177" id="user" />
      <s:Button includeIn="EnterName" x="87" y="207" label="Start Chat" id="chat" click="chat_clickHandler(event)"/>
      <s:Label includeIn="EnterName" x="57" y="157" text="Please Enter Your Name"/>
      </s:Panel>
    </s:Applicatio>
    And besides that in the messaging-config.xml file on the server a destination with the id="chat" is created and that's it.
    Any help or pointing in the right direction will be greatly appreciated.
    Thank you,
    Nick

    Update:
    Ok...I finally figured out that by replacing the tokens in the services-config.xml file with the physical address of the server everything works.
    Anyway...this means the application needs to be compiled everytime it is moved to a new server or even a different folder on the same server for that matter. Is there any way to pass the {server.name}, {server.port} and {context.root} tokens to the application at runtime for messaging?
    Thanks,

  • Getting Started with Flex and Java RPC for Free?

    Good Morning,
    Please forgive me if this is the wrong place to post- I'm
    just having trouble wrapping my head around what is and what isn't
    available for free in the Adobe Flex world.
    I've been working on an application for the last few months
    using Open Laszlo (
    http://www.openlaszlo.org/),
    but I've been running into frustrations with their lack of
    up-to-date documentation, and I've found it difficult to bring new
    people into the project, since the set of users who know it is so
    small.
    While I do like that I can compile to DHTML, that's not
    enough to hold me there.
    I've been looking into Adobe Flex, and it seems like a good
    alternative- I'm comfortable paying $500 for the IDE-
    I use Eclipse currently, so having a plugin for it sounds
    ideal. That said, when I look into ways to talk to a Java backend,
    everything points to Flex Data services, which is now part of some
    larger package costing tens of thousands of dollars.
    I don't need advanced messages, or data synchronization, as
    nice as it would be.. All I really need is the ability to call a
    Java method, and get an object back, which I can then work with in
    Flex.
    I see the forum message that asks
    "How
    do I 'do' Flash for free?, but this only talks about RPC very
    broadly. Given that the message is from over a year ago, I thought
    it would be better form to start a new topic, than replying to it.
    Can someone explain to me what components I'd need, both on
    the client side and the server side?
    Is there a set of manuals that explain how to do Flex RPC
    from Java?
    Can Flex compile to any versions of flash earlier than 9?
    (Flash 6/7 is still in wide deployment)
    Do I want to start using Flex 2, or Flex 3? Are the
    components compatible? Will the F3 docs be ready?
    Finally, where can I purchase the Charting components? The
    ability to create charts such as
    this
    overcome a decent price barrier.
    Thank you for any insight you can offer, and direction you
    can provide.

    quote:
    Originally posted by:
    cunparis2day
    On our project they made a proxy in java where they passed in
    the name of the method as a string, and an array of objects for the
    parameters. The proxy then sent the request via RMI and returned
    the result. Kind of a hack but they say it worked (I wasn't here
    when they did it).
    What did the RMI talk to? Are there docs on this?
    quote:
    Another approach, generate the proxy from the java
    interfaces. Or better yet, generate it dynamically with CGLIB.
    quote:
    Finally, I'm investigating using Mule for the integration.
    Let me know what you think about those suggestions.
    We have our own messages, but how would MULE translate them
    to Flex?
    You know quite a bit more about this, can you take a step
    back, and explain?

  • Dynamic value objects in flex and coldfusion 9

    I'm writing a program for a company that does registrations for conventions and trade-shows.  The problem I'm having is that each different client wants to store different data for each show.  Most of the data is the same (attendee's name, address, etc...), but each show has some customizations that it wants to have...  So each database for each show is going to be different...
    Right now, the only way I know how to transfer data from Flex to ColdFusion is via a Value Object.  (Well, the only good way to do it, that is.)  My problem comes when a client wants a particular database customized.  I have MANY questions about this...
    1) How do I tell my Value Object what fields we've added to or changed in the database without re-writing the entire VO (in both the .AS and .CFC files) and re-compiling my program?  In other words, I need a dynamic VO that changes automatcially with the database.
    2) If there is a way to dynamically create a VO in Flex (and from a few blog posts I've seen, it seems there is a way), how do I tell CF9 what the structure of that dynamically-created VO is?  Without re-writing a bunch of .CFC files every time I add or change a field in the database, that is...
    3) How do I reference the dynamically-created fields in my Flex program?  Right now, for example, I can define a variable called attendeeInfo as type attendeeInfoVO, and then reference things like attendeeInfo.first_name, attendeeInfo.last_name, etc...  How do I reference a field programmatcially when I don't know what it's going to be called beforehand?
    4) How do I make my program display/modify those dynamically-created fields?  Right now, using the attendeeInfo example above, I can create a TextInput with an id="firstNameInput" and just say firstNameInput.text = "{attendeeInfo.first_name}".  That won't work when I have no clue how many dynamically-created fields there are, or even what kind of data they're going to store...  How do I deal with this?
    5) Is there something other than VOs that would fit this situation better?  Am I limiting myself by using VOs in the first place?  Is it just plain impossible to do this with VOs?  And if so, what are my alternatives?  I need a structured object that can be passed around with a single reference -- I absolutely DO NOT want to pass a bunch of references to a bunch of different variables -- that's why I used VOs from the very beginning.
    6) Can I simply PAY someone at Adobe for one-on-one help here?  Do they have experts that you can "buy" for a few hours?  What's the charge for that, if such a thing is available?  Or, is this problem well-explained somewhere on the Web, and I just haven't found it yet?
    I'm very confused here, and it seems like I might have to re-write a ton of code, which I'm not looking forward to...  Ugh...  I appreciate any help you can give me...
    Thanks,
    Laurence MacNeill
    Mableton, Georgia, USA

    This blog post is pretty close to what I want:
    http://justinjmoses.wordpress.com/2008/10/10/flex-dynamic-bindable-value-objects/
    So there are the dynamic value objects I was looking for.  But the blog-poster is using LINQ and .Net 3.5.  I'm using ColdFusion9.
    So, how do I get ColdFusion9 to deal with that?  How do you get CF9 to recognize the fact that you've changed the VO, and deal with it appropriately?
    Thanks,
    L.

  • Making a call over HTTPS with LoadVars, XML.load(), and WebService - Yes or No?

    Hello, do LoadVars, XML.load(), or WebService support HTTPS-based endpoints, Yes or No?
    BACKGROUND
    ============
    I've been trying to get a LoadVars to actually make a call to an HTTPS endpoint. There is nothing in the documentation that says it can't. I know that there's also XML.load() and WebService class, but from the looks of it they don't do HTTPS.
    During my tests I have absolutely no issues with making calls to the same service over HTTP. When I change it to HTTPS I don't see HTTPStatus or even failures. Also, netstat on my server will show a connection being established with the endpoint when using HTTP but not when using HTTPS. I've also tried setting SSLVerifyCertificate to "false" in my Server.xml and after a restart of AMS it doesn't help, same symptom.
    I've also googled and looked through all Adobe forum posts that I can find:
    https://forums.adobe.com/message/4938426#4938426
    https://forums.adobe.com/thread/1661461
    https://forums.adobe.com/thread/782037
    https://forums.adobe.com/message/74981
    https://forums.adobe.com/message/5107735#5107735
    https://forums.adobe.com/message/7815#7815
    https://forums.adobe.com/message/53870#53870
    https://forums.adobe.com/message/87797#87797
    WebService Class - http://stackoverflow.com/questions/5619776/webservice-and-fms
    The best I found from the posts above is a non-commital answer from adobe staff at https://forums.adobe.com/message/4938426#4938426 and a 3rd party person saying that Webservice doesn't work at http://stackoverflow.com/questions/5619776/webservice-and-fms.
    All I need is an official supported/not-supported from the Adobe staff. Shouldn't be to hard after 5 years or so of ignoring the questions in the forum right?

    Adobe, please provide some details to your current and possibly potential customers, in at least one of the many unanswered posts about making HTTPS requests from AMS.
    P.S.
    realeyes_jun,
    RealEyes Media has been an inspiration to me for many years, and I would like to thank them for their efforts to better the media streaming community.
    Also, would it be possible to please release the source to REDbug?

  • Flex and HTML display shift in Safari in Mac OS

    When a popup is displayed in Flex app, the Flex display gets shifted down in Safari in Mac OS alone. However, even if the display is shifted down, the controls seem to be in the correct position. For example, for clicking a button, the cursor has to be some pixels above the shown display. Not only the Flex display shifts down. HTML Links display also shifts down along with Flex and Links are clickable some pixels above the display.
    The problem happens only while triggering the Flex popup display in long flex screen. On a Flex screen within the browser height, with the same actionscript and Javacsript code, there is no problem.
    This works fine in all other browsers including Safari in windows.
    Has anyone faced this scenario? Any help will be highly appreciated.
    For the popup to be displayed in center of viewable area, the following code is used.
    callLater(SMBObjectUtil.changePosition,args);
    In SMBObjectUtil.as file,
    public static function changePosition(x:int, y:int, obj:UIComponent):void {
         var yPos:int = ExternalInterface.call("findScrollTop");      var winHeight:int = ExternalInterface.call("getWindowHeight");
         var appHeight:int = Application.application.height;
         var objectWidth:int = obj.width;
         var objectHeight:int = obj.height;
         var calculatedX:int = 0;
         var calculatedY:int = 0;
         if(Application.application.width>obj.width) {
              try {               calculatedX = (Application.application.width - obj.width)/2;
                   if(yPos <= 0){                    calculatedY = ((winHeight-objectHeight)/2-100)>0?(winHeight-objectHeight)/2-100:50;
    else if(yPos<=(appHeight-winHeight)){                    calculatedY = (((winHeight-objectHeight)/2)+yPos-100)>0?((winHeight-objectHeight)/2)+yPos-100:50;
    else if(yPos>(appHeight-winHeight)){                    calculatedY = appHeight - objectHeight - (winHeight-objectHeight)/2;
              catch(e:Error){          }
         }else {
    obj.x = calculatedX;
    obj.y = calculatedY;
    Javascript functions used are:
    function findScrollTop()
      var ScrollTop = document.body.scrollTop;
      if (ScrollTop == 0)
       if (window.pageYOffset)
        ScrollTop = window.pageYOffset;
       else
        ScrollTop = (document.body.parentElement) ? document.body.parentElement.scrollTop : 0;
      return ScrollTop;
    function getWindowHeight()
      var y = 0;
      if (self.innerHeight) {
       y = self.innerHeight;
      } else if (document.documentElement && document.documentElement.clientHeight) {
       y = document.documentElement.clientHeight;
      } else if (document.body) {
       y = document.body.clientHeight;
      return y;

    Found a fix for this. CallLater() was giving the problem in Safari. Once I removed CallLater and directly called my function, the problem was resolved.

Maybe you are looking for

  • How can I use Boot Camp in Mountain Lion to mount Windows XP?

    I would like to use Windows XP on my 2009 13" MBP in Boot Camp? I have tried and it only asks for Windows 7 and when I use XP it says unable to install. 1. Is this usual? 2. If so, is there a work around? I do not have Windows 7 nor will I purchase i

  • Depreciation planned but not posted.

    Hi all, There is the following case. In asset explorer there is planned depreciation which is not posted for prior year. I want to erase this planned depreciation (is incorrect) in prior year without affecting G/L. Could you please advise? If this is

  • Average in Results row in calculation properties for Bex Key figure does not work in Analysis for Office 1.4.7

    We are moving from Bex 3.5 to Bex 7.0 and using Analysis for Office 1.4.7 We have queries that do an average for the results rows of dynamic calculations and the queries will not open in Analysis for Office 1.4.7 (example is below) We get an error me

  • UCCX 8.5.1 and Nuance TTS

    Hello, I am trying to get TTS features in UCCX using Nuance Vocalizer for Network. I configured UCCX and the status of TTS Provider is "IN_SERVICE" (The Provider is defined as Nuance Volcalizer 4.0 as there is no 5.0 opton). In the UCCX scrip I confi

  • Cannot connect to itunes store on iphone 4

    I just got the iPhone 4 and everytime I try to download a app, a alert pops up telling me I cannot connect to the iTunes Store. I signed out of iTunes and then back on and tried disconnecting the wifi and then connecting it back, still no results. I