Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
qikeyang81 #1
How to communicate between two application mxml?
I want to communicate another application mxml.How can do it?
eg,
A.mxml
--------------------------------------------------------------------------------
--------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">
<mx:Label text="User Name"></mx:Label><mx:TextInput id="userName"<mx:Button label="jump to another allication mxml"></mx:Button>></mx:TextInput>
</mx:Application>
--------------------------------------------------------------------------------
--------------------------------------
B.mxml
--------------------------------------------------------------------------------
--------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml">
<mx:Label text="User Name(input by A.mxml)"></mx:Label><mx:TextInput
id="userName" ></mx:TextInput>
</mx:Application>
two mxml can send the simple String value.
who can help me to solve this problem?
help! thanks very much!
qikeyang81 Guest
-
Displaying a jsp file using mxml application
Hi, i need to display a jsp, file when a click event is fired in mxml application. i know it can be done using getURL("abc.jsp"); other than... -
mxml application finishings
Hi, Our applicaiton is completed. Thanks a lot for our team to help us in a lot of situations. It is time to deploy our first phase. We have... -
Passing values from one mxml application to anotherapplication in Flex 1.5.
Hi i want to know about passing variables from one mxml file to another mxml file in Flex 1.5. both will be different application or i want... -
How to use a Sprite or a MoveClip as content of aPanel/Container in MXML application
I've been writing a MXML application, where i want to control some animation. A animation is being acheived thru creating a custom MovieClip using... -
Communicate between activex DLL and exe application?
How is this possible? I need to send a message from my DLL (from ASP) to an exe app that i've written. Thanks --- Outgoing mail is... -
prdv #2
Re: How to communicate between two application mxml?
See flash.net.LocalConnection clas, i allows you to make calls between flex applications given that they are running in the same computer.
Regards
prdv Guest
-
-
ntsiii #4
Re: How to communicate between two application mxml?
You did not say how the two applications were going to be run.
If each app is running in a separate browser, then prdv's solution is correct.
If this is not what is going to happen, then post back with more details.
I have a LocalConnection example in Flex 1.5, but have not migrated it to 2.0
yet.
Tracy
ntsiii Guest
-
qikeyang81 #5
Re: How to communicate between two application mxml?
Hi ntsiii ,can you give me the sample,Thanks very much!
qikeyang81 Guest
-
ntsiii #6
Re: How to communicate between two application mxml?
Sure.
Tracy
--LocalConnectionReceive.mxml--
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"
initialize="initialize()">
<mx:Script>
var myConnection;
function initialize() {
myConnection = new LocalConnection();
myConnection.messagePosted = mx.utils.Delegate.create(this,
messagePosted);
myConnection.connect("receivingapp");
}
function messagePosted(message) {
messageList.text = message;
}
</mx:Script>
<mx:TextArea id="messageList" width="300" height="300"/>
</mx:Application>
--LocalConnectionSend.mxml--
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"
initialize="initialize()" creationComplete="sendMessage(event)"
mouseDown="sendMessage(event)">
<mx:Script>
var myConnection;
function initialize() {
myConnection = new LocalConnection();
}
function sendMessage(event) {
myConnection.send("receivingapp", "messagePosted",
event.target.text);
}
</mx:Script>
<mx:TextArea id="tiSend" change="sendMessage(event)" width="300"
height="300"/>
</mx:Application>
ntsiii Guest



Reply With Quote

