In the data push sample "feed", every thing is ok. I copy the source to my own project, but I couldn't work.
In the sample project, when I click the <Subscribe to 'feed' destionation> button, I catch the Http content, and the type is like this:
"application/x-amf>".
But to my own projectm, when I click the <Subscribe to 'feed' destionation> button,the Http type is like this:
"text/html;charset=utf-8".
I think the difference is the reason of this problem.
Source is very simple. Like this:
-----------------------------------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" backgroundColor="#FFFFFF">
<mx:Script>
<![CDATA[
import mx.messaging.messages.IMessage;
private function messageHandler(message:IMessage):void
{
pushedValue.text = ""+ message.body;
}
]]>
</mx:Script>
<mx:Consumer id="consumer" destination="feed" message="messageHandler(event.message)"/>
<mx:Button label="Subscribe to 'feed' destination" click="consumer.subscribe()" enabled="{!consumer.subscribed}"/>
<mx:Button label="Unsubscribe from 'feed' destination" click="consumer.unsubscribe()" enabled="{consumer.subscribed}"/>
<mx:TextInput id="pushedValue"/>
</mx:Application>
-----------------------------------------------------------------------------------------------------------------------------------------------------------
Views
Replies
Total Likes
There is something wrong in the problem description. I should continue find the true reason.
Views
Replies
Total Likes