• Decrease font size
  • Reset font size to default
  • Increase font size
Merapi Forums
Welcome, Guest
Please Login or Register.    Lost Password?
Re:Anyway to create Bridge obj in AS without connect? (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:Anyway to create Bridge obj in AS without connect?
#260
shadowfist (User)
Posts: 14
graphgraph
User Offline Click here to see the profile of this user
Anyway to create Bridge obj in AS without connect? 1 Month, 3 Weeks ago Karma: 0  
Does anyone know a way to create a bridge instance in flex/flash that does not automatically attempt to connect to Java when it is being created?

Nothing I have tried has worked.
 
Logged Logged  
  The administrator has disabled public write access.
#282
jenswegar (User)
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
Re:Anyway to create Bridge obj in AS without connect? 3 Weeks, 5 Days ago Karma: 0  
Set the autoConnect property of the Bridge to false before creating your bridge instance, then call Bridge.connect() once you're ready to have the connection opened:


Code:

Bridge.autoConnect = false; var bridgeInstance:BridgeInstance = new BridgeInstance(); // When ready to open connection to bridge Bridge.connect();
 
Logged Logged  
  The administrator has disabled public write access.
#284
shadowfist (User)
Posts: 14
graphgraph
User Offline Click here to see the profile of this user
Re:Anyway to create Bridge obj in AS without connect? 3 Weeks, 1 Day ago Karma: 0  
Let me rephrase.

Anyway to create a Bridge object without connecting, attach event listeners for IOEventError.IO_ERROR, then connect?
 
Logged Logged  
  The administrator has disabled public write access.
#291
eldalai (User)
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
Re:Anyway to create Bridge obj in AS without connect? 5 Days, 23 Hours ago Karma: 0  
How?? if java is not present, i get this error. In my app, java-merapi not alwais is present

Error #2044: Unhandled IOErrorEvent:. text=Error #2031: Socket Error.
at merapi::Bridge$/connect()[/Users/adam/dev/os/merapi/svn/branches/private-beta-v2/core/flex/merapi-core/src/merapi/Bridge.as:169]


Code:

var bridgeInstance : BridgeInstance; private function init():void{ Bridge.autoConnect = false; bridgeInstance = new BridgeInstance(); bridgeInstance.addEventListener( IOErrorEvent.IO_ERROR, handleConnectFailureError ); bridgeInstance.addEventListener( SecurityErrorEvent.SECURITY_ERROR, handleConnectFailureError ); Bridge.connect(); }
 
Logged Logged  
  The administrator has disabled public write access.
#293
shadowfist (User)
Posts: 14
graphgraph
User Offline Click here to see the profile of this user
Re:Anyway to create Bridge obj in AS without connect? 4 Days, 19 Hours ago Karma: 0  
Correct. I am trying to catch that exception, but there is no way to create the Bridge object in Flex to allow you to catch that error.

This error is why I asked this question.
 
Logged Logged  
  The administrator has disabled public write access.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop