Flash 고수님 봐주세요. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

Flash 고수님 봐주세요. 정보

Flash 고수님 봐주세요.

본문

코딩 부분은 php, asp, jsp가 아닌 프로그램으로 짠 것 같구요. Flash 부분은 XMLSocket으로 연결해서 테이터를 읽어와 보여주는 것 같습니다. 아래는 플래쉬의 액션 스크립트 부분이구요.
 
 
제가 궁금한 것은 host 변수는 있는데 ip값을 어떻게 집어 넣는지 하는 부분과
 
url_lv.load("/loadip"); <= 이것이 무엇인지?? host ip??
 
그리고 테이터를 해당 서버에 접속해서 파일에서 읽는 것인지 아니면 DB에서 읽는 것인지 모르겠더군요.
 
파일명이라면 파일이름이 궁금합니다.
 
 
 
- flash.swf -
 
.... 중략
 
var port = "9292";
var host;
 
... 중략
 
// [Action in Frame 12]
function load_first_make_Fn()
{
    trace(tank_first_str);
    if (tank_first_str == null || tank_first_str == undefined || tank_first_str == "")
    {
        return(undefined);
    }
    else
    {
        tank_id_array = tank_first_str.split("|");
        trace(tank_id_array.length);
        if (tank_id_array.length != 1)
        {
            for (i = 0; i < tank_id_array.length; i++)
            {
                for (j = 0; j < tank_id_array.length - i; j++)
                {
                    if (Number(tank_id_array[j]) > Number(tank_id_array[j + 1]))
                    {
                        var _l1 = tank_id_array[j + 1];
                        tank_id_array[j + 1] = tank_id_array[j];
                        tank_id_array[j] = _l1;
                    } // end if
                } // end of for
            } // end of for
        } // end if
    } // end if
    for (i = 0; i < tank_id_array.length; i++)
    {
        tank_add_id_num = tank_id_array[i];
        tank_add_move_Fn();
        table_add_move_Fn();
        tank_total_scroll_make_Fn();
        table_total_scroll_make_Fn();
    } // end of for
} // End of the function
var tank_first_str;
var url_lv = new LoadVars();
url_lv.onLoad = function (success)
{
    if (success)
    {
        tank_first_str = this.TANKS;
        host = this.SSG_IP;
        trace(this.TANKS);
        _root.test.text = host;
    } // end if
    load_first_make_Fn();
    play();
};
url_lv.load("/loadip");
var tank_first_boo = true;
stop();
// [Action in Frame 13]
function socket_connect()
{
    socket = new XMLSocket();
    socket.onConnect = handleConnect;
    socket.onClose = handleClose;
    socket.onXML = handleIncoming;
    if (!socket.connect(host, Number(port)))
    {
        gotoAndStop("connect를 실패 하였습니다");
    } // end if
} // End of the function
function handleConnect(success)
{
    if (success)
    {
        trace("접속이 되었습니다");
    }
    else
    {
        trace("접속이 실패 하였습니다");
    } // end if
} // End of the function
function handleClose()
{
    trace("접속을 끊어 졌습니다");
} // End of the function
function handleIncoming(doc)
{
    var _l4 = doc.firstChild;
    switch (_l4.nodeName)
    {
        case "add":
        {
            tank_add_id_num = Number(doc.childNodes[0].childNodes[2].firstChild.nodeValue);
            tank_add_check_Fn();
            tank_total_scroll_make_Fn();
            table_total_scroll_make_Fn();
            break;
        }
        case "delete":
        {
            tank_del_id_num = Number(doc.childNodes[0].childNodes[2].firstChild.nodeValue);
            tank_del_make_Fn();
            tank_total_scroll_make_Fn();
            table_total_scroll_make_Fn();
            break;
        }
        case "message":
        {
            var _l3 = Number(doc.childNodes[0].childNodes[2].firstChild.nodeValue);
            tank_info_id_num = _l3;
            pop_now_num = _l3;
            tank_info_array[_l3] = new Array();
            var _l1 = 0;
            while (_l1 < doc.childNodes[0].childNodes.length)
            {
                tank_info_array[_l3][_l1] = doc.childNodes[0].childNodes[_l1].firstChild.nodeValue;
                _l1++;
            } // end while
            tank_info_insert_Fn();
            table_info_insert_Fn();
            pop_insert_Fn();
            break;
        }
    } // End of switch
} // End of the function
var socket;
 
.... 중략

댓글 전체

앞에 http://abc.com 이라치고
웹브라우져에서 http://abc.com/loadip  라고 해보면 어떤 결과가 나오는지 보세요

url_lv.load 부분은 내용중에 나와 있다시피 url_lv 변수에 결과값을 담는것입니다.

예를 들어 &a=에이&b=비& 이런식으로 결과가 나오면 url_lv.a = 에이 url_lv.b=비 이런내용이 되겠죠

결과값을 필요한곳에 표현하면 되겠습니다.
전체 17 |RSS
그누4 질문답변 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1402호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT