Hi,
Would you happen to have more
than Flex UI running when running the example? If yes, the it might be the temp
UI generated in the upload.jsp is communicating with the wrong main Flex UI... I
have seen this happen myself.
I don't think there is any way
around this, the Flex UI in the upload.jsp will attempt to register with the
first Flex UI is finds, so if it doesn't happen to be the one you want, then the
messages won't be received by the proper UI. That's how I understand it
anyways.
Jimmy
Gianninas
Software Developer -
Optimal Payments
Inc.
From: tangomann123 [mailto:[EMAIL PROTECTED]
Sent: Friday, April 15, 2005 7:29 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] File upload from Jimmy Gianninas Prob
Hi, im new to flex and read the article about fileupload from Jimmy
Gianninas. Everything works fine but the refresh of the main app wont
work with my code.
i copied the part of the upload.jsp just like in the example:
<mm:mxml>
<mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"
width="1" height="1" initialize="initialize()">
<mx:Script>
var myConnection;
function initialize() {
myConnection = new LocalConnection();
myConnection.send("mainApp", "messagePosted", uploadSuccess");
myConnection. this, onStatus );
}
function onStatus( result ) {
getURL( "_javascript_:doClose()" );
}
</mx:Script>
</mx:Application>
</mm:mxml>
<script language="_javascript_">
function doClose() {
window.close();
}
</script>
Here is the code of my main as file:
function initApp():Void {
myConnection = new LocalConnection();
myConnection.messagePosted = mx.utils.Delegate.create( this,
messagePosted );
myConnection.connect("mainApp");
}
public function messagePosted( mess:Object ):Void {
alert("1");
if( mess == "uploadSuccess" ) {
alert("hi");
}
}
The Problem is: nothing happens after the file upload. (ok the js
works fine and closes the popup).
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.