Forums

ForumsProgramming Forum

Sending information back and forth thru a GoDaddy server? (as2)

Posted Sep 30, '13 at 2:22pm

weirdlike

weirdlike

463 posts

Knight

sigh... another case of symbol misinterpretation

//data on the XML file
everything after this^ has gaps

 

Posted Sep 30, '13 at 3:14pm

mightybob

mightybob

351 posts

Oh dang it sorry when I posted it removed all the code and just put down its content which was
"hey you!
100
xml-stuff"

Well what I meant was flash is reading the "100" part as a string, but I want it to see it as a number, so I can make an x or y position to be affected by that.

I've looked at many ways to convert strings to numbers, none of them seem to work. Is there anyway I could just tell the XML file that it's a number so when flash imports it, it sees it as one?

And I'm assuming once it is all working I'd have to upload the XML file to the server? (along with the swfs in the same folder?)

Even though that code there is as3, it did give me a few ideas. Thanks!

 

Posted Sep 30, '13 at 4:37pm

weirdlike

weirdlike

463 posts

Knight

read the bottom of my post before

"hey you!
100
xml-stuff"

-------------------------------

listen for events

group.addEventListener(NetStatusEvent.NET_STATUS, networkStatus);
function networkStatus(event):void
{
    switch(event.info.code)
    {
        case "NetConnection.Connect.Success":
            trace("NetConnection Success");
            break;
                   
        case "NetConnection.Connect.Failed":
            trace("NetConnection Failed");
            break;
                       
        case "NetConnection.Connect.Rejected":
            trace("NetConnection Rejected");
            break;
                   
        case "NetGroup.Connect.Success":
            trace("NetGroup Success");
            break;
                       
        case "NetGroup.Connect.Rejected":
            trace("NetGroup Rejected");
            break;
                       
        case "NetGroup.Connect.Failed":
            trace("NetGroup Failed");
            break;
           
        case "NetGroup.Posting.Notify":
            trace("NetGroup Notify");

            //RECEIVE DATA HERE

            break;
                   
        case "NetGroup.Neighbor.Connect":
            trace("NetGroup New Connection");
            break;
    }
}

then after you have it all setup you can send messages via

group.post("whatever you want");

again its as3, it doesn't need XML, and you can test it by opening the .swf 2 times do an action on the first window then see the response on the second

 
Reply to Sending information back and forth thru a GoDaddy server? (as2)

You must be logged in to post a reply!