Flash call the flex application method

In a flex application, I use the SWFLoader for loading a flash, the code:

<? XML version = "1.0" encoding = "utf-8"? >
"< mx:Application xmlns:mx ="http://www.adobe.com/2006/mxml"fontSize ="12">"
< mx:Script >
<! [CDATA]
Import mx.controls.Alert;

public function testResult (): void {}
Alert.Show ("Hello World");
}
[]] >
< / mx:Script >
< mx:SWFLoader id = 'flash' source="flash/test3.swf"/ >
< / mx:Application >

There is a button in the flash(flash/test3.swf) shipped,

When I click on this button, how to call the method testResult to the flex application? Thank you!

In your Action Script (flash/test3.swf) to make one:

Import mx.core.Application;

and then in your button:

Kind regards

SAM

Tags: Flex

Similar Questions

  • fail to call the remote RPC method

    I did ping DTC and got the following error
    fail to call the remote RPC method
    Error (0x6BA) to dtcping.cpp @303
    --> Ping RPC exception
    --> 1722 (the RPC server is unavailable).
    Please help me

    Hi read,

    I suggest you to ask your question on the TechNet Forums

    http://social.technet.Microsoft.com/forums/en-us/category/windowsxpitpro

    I hope this helps.

  • Run the Flex application function in Flash swf

    Hello

    I have Flash Web site (embed) calls my flex swf built (some form of contact). When I click on the button "submit" in my Flex application, I need to perform a function that is written on the side of Flash. So I need access to Flash public service so a side event could be triggered.

    Is this possible and how it's done.

    Thnx in advance

    Two options:

    One is to use LocalConnection between two sovereign wealth funds.

    Another is to use the external Interface of Flex to talk about javascript in the browser and then use javascript to describe the Flash swf file.

    Tracy

  • Dynamically change the title of the browser in the Flex application

    In order to make my Flex application more accessible to those who use screen reader software, I need to change the text of the title bar of the browser that the user selects different tabs. I thought I could use FlexGlobals.topLevelApplication.pageTitle = "xxx" to it or define a public function in the MXML application file and use topLevelApplication to call it.  However, this does not seem to work, the title bar is not changed. I wonder if this requires flex 4.6 (I currently use 4.5).  Any ideas on how I could do this would be appreciated.

    Hello

    BrowserManager allows to change title and browser header text.

    http://help.Adobe.com/en_US/Flex/using/WS2db454920e96a9e51e63e3d11c0bf69084-7cbb.html

  • Recover data from the flex application

    Hello

    We use html data in Flex via Flashvars, I want to use the HTML flex application data, how can I do?

    I know we use javascript for it functions, but I need an example.

    Kindly help.
    Mandeep

    You can see this FB 2.0.1 topic help (or via LiveDocs on the web):
    Access Flex from JavaScript

    -------------------------- MXML ---------------------------


    http://www.Adobe.com/2006/mxml"creationComplete =" initApp () ">"

    flash.external import. *;

    public function initApp (): void {}
    ExternalInterface.addCallback("IsStatic",IsStatic) ("myFlexFunction", myFunc);
    }

    public void myFunc(s:String):void {}
    S = L1.text;
    }

    ------------------------------- HTML ----------------------------

    wrapper/AddCallbackWrapper.html

    AddCallback Wrapper


    Enter a new title:






    http://download.Macromedia.com/pub/Shockwave/cabs/Flash/Swflash.cab#version=9, 0,0,0' height = "200" width = "400" >


    http://www.Macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' height = 100% "width = 100% ' flashVars =" / > "

  • call the default Java methods UCM services?

    Hello!

    I have a custom Java method that I call the definition of custom service UCM. This method of Java, one of the tasks is to call standard UCM UPDATE_DOCINFO service to update the metadata for that document. What is the right way to call the AAU services the default JAVA methods?

    Thanks a lot for your help!

    I use the lines below...

    DataBinder binder = new DataBinder();
    String cmd = "";
    this.m_requestImplementor.executeServiceTopLevelSimple(binder, cmd, this.m_userData);
    

    You can add the parameter to the service of "binder".

    binder.putLocal("", "");
    

    This doesn't cause pollution data.

  • Save the Flex application as a service

    Hello

    Is it possible to save Flex applications as services? And by here I mean--taking the example of Android - the app is closed, but still running in the background (not visible in the Task Manager).

    The reason why I ask, is that if for example I want to have notifications in real time, of events at certain times or things of the location function, I need the application to be "aware" all the time but taking place as few resources as possible.

    Also, it would have been nice setting to start at system startup and so on.

    Thank you.

    Well, he gives examples of what you can do with this thing, but you can do much more... On a native android app, you start a service at the launch of the system in the background to check what you want to check.

    In this example, we start a service when we start to demand... You can change to start the service at the launch of the system and start the main activity (to launch your swf) from the service!

  • Refresh the browser of the Flex application?

    What is the syntax to issue a command to refresh the current browser window?

    I think it's a quick and easy way for the user to 'start from scratch' in my Flex application.

    Here you go, more easily:

    navigateToURL (new URLRequest('JavaScript:location.reload\(true\)'), "_self")

  • How to create the flex application progress bar?

    Hi guys

    I'm doing a progress bar to show the my application status of loading. I googled a lot, but it shows how to use the progress bar for the elements (ex: images, datagrid). I need to know the configuration of progress for the whole of the application bar. I'm sorry if this is a noob question. My brain does not work now. Thanks for any help.

    You can see this link which gave the complete code to do...

    http://blog.preinvent.com/node/6

    If this post answers your question or assistance, please mark it as such.

  • Call the Web service method

    Hello
    I use a webservice in my Flex 2 project:
    "" < mx:WebService id = "WStest" wsdl = " http://192.xxx.x.xx/Service.asmx?WSDL" showBusyCursor = "true".
    < mx:operation name = "Test_me" result = "test ()" >
    < mx:request >
    < int > 0 < / int >
    < / mx:request >
    < / mx:operation >
    < mx:operation name = "OperatorExists" fault = "faultHandler (event)" resultFormat = "xml" > "
    < mx:request >
    < name > aaa < / name >
    <>aaa password < / password >
    < / mx:request >
    < / mx:operation >
    < / mx:WebService >
    "Test_me()' method works if I write" WStest.Test_me.send (0). I would like to know how can I call 'OperatorExists' method with 2 parameters? I tried with WStest.OperatorExists.send('aa',aaa'), WStest.OperatorExists.send(aaa,aaa) and WStest.OperatorExists.send(name:"aaa",password:'aaa'), but still no results. This method should return 'true' if the user name and password are good and "false" if not.
    Pleas help me if you can.
    Thank you
    Tudor

    I use:

    http://somewhere.in.Holland:50100/WSDL/mios_GetDataForView_Request_V6_1.wsdl ".
    ID = "myWebservice".
    result = "handleResult (Event)" "
    showBusyCursor = "true".
    Fault = "handleFault (Event)" "
    >



    {aanvraagproces_id}
    1
    120



    and then:

    private void DoInitialization (): void {}
    aanvraagproces_id = parameters.id;
    Model.aanvraagprocess_id = parameters.id;
    myWebservice.mios_GetDataForView_Request ();
    }

  • Why do I get this error:? Permission denied for my {URL} call the UnnamedClass.toString method on.

    When I click on links to external sites on my site, I get the following error, like 5 times, and yet, it always opens the other site after clicking the OKs. For example, click on "Host Hotel' on the left NAV.

    Error: Permission denied to call method UnnamedClass.toString on.

    URL of affected sites

    http://www.TGIF-classic.org

    Norton Toolbar is the culprit. I work with Norton to get addressed.

  • Detect the mouse outside the Flex Application action *.

    Hello

    When the mouse action is performed on demand, it's a very simple job to capture the mouse event.
    But what about the mouse action which performed outside the window of the application?

    Anyone know how to capture the mouse event that outside in? Help, please!

    Thank you.

    You can capture the actions of the mouse in the JavaScript in the application wrapper. You'll probably be then to use the ExternalInterface to communicate with the envelope on the actions of the mouse.

    Here is some info on the use of ExternalInterface:

    http://livedocs.Adobe.com/Flex/3/HTML/passingarguments_1.html
    and
    http://livedocs.Adobe.com/Flex/3/HTML/Help.HTML?content=19_External_Interface_04.html
    and
    http://learn.Adobe.com/wiki/display/Flex/external+interface

    HTH,
    Matt Horn
    Flex docs

  • What is the best place to call the HomeScreen.setNewState method?

    Hello

    I have a requirement where I need to remove the 'Asterix' around my candidacy. So what is the best place to keep the code in HomeScreen.setNewState (false) which has been determined by an electronic mail message?

    THX

    Srinivas

    You want to delete when you know that your applicaitn has been invoked, so I consider this "reset" in the activate method (() of UiAppplication)

  • Implementation error when you call the native application to view Document.

    Hi all

    I have a list of documents that are in my server. Now, I want to open these documents as pdf, txt, doc, ppt, etc..

    For this I do it like this:

    When the user will trigger a line any list I download the particular document in my camera, and when it downloads successfully I'm passing it's respective device path to the app to view native document as pdf Adobe Reader and the other DocToGo.

    For the pdf files, it works fine, but for all the rest files that is showing the error that is fixed in the screenshots.

    Then please tell me why this error is coming.

    Thanks in advance.

    I found the solution.

    I did mistake when setting the target.

  • Hairstyle the initial load of the flex application.

    Any thoughts on how I could do this?

    Picture 1.png

    Watch this tutorial...

    http://www.gotoandlearn.com/play?ID=108

    CyA

Maybe you are looking for