FlexTips - XMLSocket connect() after disconnect from server
July 24th, 2007 at 08:40am Administrator
If you're new here, you may want to subscribe to my RSS feed. If you like my site, consider linking back. I prefer text "Free Flash Tutorials" to http://www.franto.com
Thanks for visiting my site! If you need anything just contacting through Contact page
Here is another Flex tips I came across in our project. I don’t know if this was in AS2.0 as well, but in AS3.0 when you receive event that XMLSocket is disconnected (server is disconnected, your net connection is broken), you can’t call xmlsocket.connect() immediately, but you have to wait for a while. So add there Timer(), or call it with function callLater(). It seems it must be called on next frame. I will not upload any example, because I don’t have running test XML server, but I think it is clear what you have to do.
Let me know, if you have similar issue in your projects.
»Related posts:
- FlexTips - mx:Text vs. mx:TextArea
- Adobe’s Xmas presents - Flex, AIR, BlazeDS
- Hossy.net - SWF server side compiler
- FlexTips
- FlexTips: How to add Bitmap to UIComponent
- Problem with video chat, please help
- FlexTips: Problem with masks and scalable Flash
- Games for you
- FlexTips: Tween in AS3.0 project
- Dofus:Flash tactical MMPORG
- Support Franto.com
- Another bug: LoadVariables?
- FlexTips - Stop displaying Focus
- Who steals your Flash movies?
- WampServer - all you need for your localhost
- Franto.com Supporters
- AirTips: Problem with app.xml in Flex 3
- Best Project Management Software for IT company








July 24th, 2007 at 9:12 am
“It seems it must be called on next frame. ”
Frame? you’ve thrown me there. I don’t come to Flex with a Flash background. I actually don’t think in Frames for Flex at all even though I know the final outcome is a swf.
how do I know when the “next frame” is to make the call? if I use callLater(), that should automatically kick in when it’s ready, yes?
many thanks
July 24th, 2007 at 10:08 am
Ok, you’re right, there are no frames. I call it “frame” because of good old flash, but you’re right, it means when it is ready.
callLater() works, we have it in our project, and it works
January 22nd, 2008 at 9:48 pm
do you now if it is perfectly possible to have a flex app in a browser that works with a server that goes down from time to time?
(supposing you can code your client app so that it takes care of it)
do you need to use xmlsockets?
does it work with flex/livecycle data services:
thus do the remoteobject, dataservice,… things also work?
adg