Diff for "FlashWorkBook" UserPreferences
 
Help Info Print View Search Diffs Edit
 À妽º   Ã£±â   Freeboard   Subjectless   Images   ÃÖ±Ù±Û 

Differences between version dated 2004-12-25 21:35:34 and 2004-12-25 21:42:09
Deletions are marked like this.
Additions are marked like this.

===== ¿ÀÈÄ 9:03 2004-12-25 =====
¹¹°¡ ÀÌ·¸°Ô º¹ÀâÇϳÄ..
{{{

 // ¿©±â¼­ºÎÅÍ ÇÊ¿äÇÑ ÄÚµå

 var kioskdata = _global.kioskdata;

 var wsc = kioskdata.wsc;

 

 // Å×½ºÆ® ÄÚµå

 kioskdata.GetServiceStatus();

 kioskdata.WebServiceResultCallBack(

  function()

  {

   switch(kioskdata.GetWebServiceCallStatus())

   {

    // ¾ÆÁ÷ ÁøÇàÁß

    case 'Progress':

     break;

    // À¥¼­ºñ½º ÀÀ´ä ¾øÀ½

    case 'ConnectionFail':

     trace('server down');

     break;

    // °á°ú ¹ÞÀ½

    case 'Stop':

     trace('results:' + kioskdata.WebServiceResults);

     break;

   }

  }

 );

}}}

 

°ªÀ» °¡Á®¿À´Â ÄÚµå´Â À§Ã³·³ ÁÙ¿©³õ±ä Çߴµ¥, ´öºÐ¿¡ ó¸®ÇÏ´Â Äڵ尡 ¿­¶ó ¸¹¾ÆÁ³´Ù.

 

{{{

 // À¥ ¼­ºñ½º °ü·Ã ÀÎÀÚ

 public var wsc;

 private var wsc_callback_interval;

 public var WebServiceCallStatus:String = 'Stop';

 public var WebServiceResults:String = '';

 

 // wsc(À¥¼­ºñ½ºÄ¿³ØÅÍ)ÀÇ status À̺¥Æ®¿¡ È£ÃâµÊ

 public function WebServiceOnStatus(code)

 {

  // ¿¬°á ÀÚü°¡ ºÒ°¡´É!

  if(code =='WebServiceFault')

  {

   WebServiceCallStatus = 'ConnectionFail';

  }

  trace('WebServiceOnStatus:' + code);

 }

 

 // wscÀÇ result À̺¥Æ®¿¡ È£ÃâµÊ

 public function WebServiceOnResult(results)

// ¿©±â¼­ºÎÅÍ ÇÊ¿äÇÑ ÄÚµå

var kioskdata = _global.kioskdata;

var wsc = kioskdata.wsc;

 

// Å×½ºÆ® ÄÚµå

kioskdata.GetServiceStatus();

kioskdata.WebServiceResultCallBack(

 function()

 {

  WebServiceCallStatus = 'Stop';

  WebServiceResults = results;

  trace('WebServiceOnResult:' + results);

 }

 

 // À¥¼­ºñ½ºÀÇ ÇöÀç »óŸ¦ üũ

 // È£ÃâÀÌ Ã³¸®µÇ°í ÀÖ´Â °æ¿ì ProgressÀÌ°í,

 // ±× ÀÌ¿ÜÀÇ °æ¿ì¿£ wsc_callback_intervalÀ» Ŭ¸®¾îÇؼ­ È£ÃâÀ» ¸ØÃá´Ù.

 public function GetWebServiceCallStatus()

 {

  switch(WebServiceCallStatus)

  switch(kioskdata.GetWebServiceCallStatus())

  {

   // ¾ÆÁ÷ ÁøÇàÁß

   case 'Progress':

    break;

   // À¥¼­ºñ½º ÀÀ´ä ¾øÀ½
   case 'ConnectionFail':

    trace('server down');

    break;

   // °á°ú ¹ÞÀ½
   case 'Stop':

    clearInterval(wsc_callback_interval);

    wsc_callback_interval = undefined;

    trace('results:' + kioskdata.WebServiceResults);

    break;
  }

  return WebServiceCallStatus;

 }

);

}}}

 

°ªÀ» °¡Á®¿À´Â ÄÚµå´Â À§Ã³·³ ÁÙ¿©³õ±ä Çߴµ¥, ´öºÐ¿¡ ó¸®ÇÏ´Â Äڵ尡 ¿­¶ó ¸¹¾ÆÁ³´Ù.

 

 // ÄݹéÇÔ¼ö ½ÇÇà ´ë¸®ÇÔ¼ö

 public function WebServiceResultCallBack(callbackfn)

{{{

// À¥ ¼­ºñ½º °ü·Ã ÀÎÀÚ

public var wsc;

private var wsc_callback_interval;

public var WebServiceCallStatus:String = 'Stop';

public var WebServiceResults:String = '';

 

// wsc(À¥¼­ºñ½ºÄ¿³ØÅÍ)ÀÇ status À̺¥Æ®¿¡ È£ÃâµÊ

public function WebServiceOnStatus(code)

{

 // ¿¬°á ÀÚü°¡ ºÒ°¡´É!

 if(code =='WebServiceFault')

 {

  if(undefined==wsc_callback_interval)

   wsc_callback_interval = setInterval(callbackfn, 100);

  WebServiceCallStatus = 'ConnectionFail';

 }

 trace('WebServiceOnStatus:' + code);

}

 

 // À¥ ¼­ºñ½º È£Ãâ

 private function CallWebService(op, param)

// wscÀÇ result À̺¥Æ®¿¡ È£ÃâµÊ

public function WebServiceOnResult(results)

{

 WebServiceCallStatus = 'Stop';

 WebServiceResults = results;

 trace('WebServiceOnResult:' + results);

}

 

// À¥¼­ºñ½ºÀÇ ÇöÀç »óŸ¦ üũ

// È£ÃâÀÌ Ã³¸®µÇ°í ÀÖ´Â °æ¿ì ProgressÀÌ°í,

// ±× ÀÌ¿ÜÀÇ °æ¿ì¿£ wsc_callback_intervalÀ» Ŭ¸®¾îÇؼ­ È£ÃâÀ» ¸ØÃá´Ù.

public function GetWebServiceCallStatus()

{

 switch(WebServiceCallStatus)

 {

  if(WebServiceCallStatus == 'Progress')

  {

   trace('CallWebService fail - it is progress');

   return;

  }

  WebServiceCallStatus = 'Progress';

  wsc.operation = op;

  wsc.params = param;

  wsc.trigger();

  // À¥¼­ºñ½º ÀÀ´ä ¾øÀ½

  case 'ConnectionFail':

  // °á°ú ¹ÞÀ½

  case 'Stop':

   clearInterval(wsc_callback_interval);

   wsc_callback_interval = undefined;

   break;

 }

 return WebServiceCallStatus;

}

 

// ÄݹéÇÔ¼ö ½ÇÇà ´ë¸®ÇÔ¼ö

public function WebServiceResultCallBack(callbackfn)

{

 if(undefined==wsc_callback_interval)

  wsc_callback_interval = setInterval(callbackfn, 100);

}

 

// À¥ ¼­ºñ½º È£Ãâ

private function CallWebService(op, param)

{

 if(WebServiceCallStatus == 'Progress')

 {

  trace('CallWebService fail - it is progress');

  return;

 }

 WebServiceCallStatus = 'Progress';

 wsc.operation = op;

 wsc.params = param;

 wsc.trigger();

}

}}}
 
ÀÌ°Å ³­¸®µµ ¾Æ´Ï±¸¸¸..

PythonPowered ShowText of this page
EditText of this page
FindPage by browsing, searching, or an index
Or try one of these actions: DeletePage, DeleteUploadedFile, LikePages, SpellCheck, UploadFile