|
Mailing Lists
|
Home /
Groups /
Adobe Integrated Runtime (AIR)
Bug in Adobe AIR apps when used with FDMSBridge swf
Author: Andy Matthews
Short Link: http://www.houseoffusion.com/groups/adobe-integrated-runtime/thread.cfm/threadid:1644#5165
I've been working on an HTML/JS based AIR application for my company, a sort of
one-way instant messenger. It will allow managers and IT staff to instantly push
messages to all employees using BlazeDS.
It's been a long road due to the fact that neither HTML based AIR apps, nor
BlazeDS itself have all that much real-world documentation. I'd finally gotten
everything working in a test environment when I went to port the working code
into my already working transparent, custom chrome AIR app. Then it stopped
working. The same exact code would not work at all.
After manipulating code for the better part of a day, I found the reason, or at
least part of it. It appears that an AIR app which uses the FDMSBridge.swf
provided by Adobe WILL NOT work when the app has transparency. I took the
following steps to test this behavior and it worked (or didn't work) as expected
in all cases.
In my sample app
-----------------
1) I opened my sample code (without transparency), and compiled it.
2) I pushed a message to the gateway and the message was successfully received in
the app.
3) I then changed the transparency setting in the App.xml file from false to true
and recompiled the app.
4) I pushed another message to the gateway and received nothing.
In the final app
---------------------------------------------
1) Transparency was already set to true, so I compiled the app
2) I pushed a message to the gateway, and received nothing.
3) I then changed transparency to false, recompiled the app
4) Pushed a message and successfully received it.
Further, when the app first loads, it correctly displays the alert window when
transparency is set to false, but not when it's set to true.
------------------------
Here's a small code sample:
FDMSLibrary.load("FDMSBridge.swf", initBlazeDSCode);
function initBlazeDSCode() {
alert('why me');
var cs = new ChannelSet();
cs.addChannel(new AMFChannel("cf-polling-amf","http://domainname.com/flex2gateway/cfamfpolling"));
consumer = new Consumer();
consumer.setDestination("ColdFusionGateway");
consumer.addEventListener("message", messageHandler);
consumer.setChannelSet(cs);
consumer.subscribe();
}
function messageHandler(e) {
alert('got a message! I GOT A MESSAGE!');
}
|
March 19, 2010
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||