Creative COW SIGN IN :: SPONSORS :: ABOUT US :: CONTACT US
ADOBE FLASH: HomeFlash ForumFlash TutorialsFlash Video TutorialsWeb Streaming ForumAdobe FlashPodcast

xmlSocket help

Cow Forums : Adobe Flash
VIEW POSTS   •   ADD A NEW POST   •   SEARCH   •   CHANGE FORUM
Respond to this post   •   Return to posts index   •   Read entire thread


xmlSocket help
by Sol Martin on Nov 2, 2009 at 7:21:30 pm

Hi there,

I am unsure the best way to do this: I am making a standalone flash .exe, that when connected to the internet will load one frame, and when not connected, will load another frame.

My current code does this:

var xmlSocket:XMLSocket=new XMLSocket();
xmlSocket.onConnect=function() {
xmlSocket.send(new XML("TESTING CONNECTION"));
}
xmlSocket.onXML=function(myXML) {
trace(myXML.firstChild.childNodes[0].firstChild.nodeValue);
xmlSocket.close();
}
xmlSocket.connect("http://www.websiteurl.com");


And would like it to finish doing this, but in a way that works:

if XMLSocket == connected {
_root.gotoAndPlay(2);
}
else {
_root.gotoAndPlay(3);
}


Any suggestions on the best way to add this? AS2.0, Flash CS3.

Thanks!


Respond to this post   •   Return to posts index   •   Read entire thread


Current Message Thread:




Note: If you are a registered user please click here to login before posting.

Your post will not be accepted if your name and email address are not registered in our database. Click here if you do not have an account.

Name
E-Mail Address
Subject
E-Mail me when someone responds
Just This Message   Entire Thread   None  

Message:



Note: The following are HTML characters and may cause parts of your post to disappear if not used correctly: < > &
To include any portion of the post in your response, highlight the desired text and hit the "Q" key. Read more...



Add your message signature


 


Note: By clicking "Post Direct" button above, you are agreeing to the Creative Cow's Code of Conduct.



FORUMSTUTORIALSMAGAZINETRAININGVIDEOS - REELSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

© CreativeCOW.net All rights are reserved.

[Top]