⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 controlvr_onloaderror.htm

📁 基于actionscript3.0的flashLoading控件
💻 HTM
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>controlVR.onLoadError</title>
<link href="../shares/help.css" rel="stylesheet" type="text/css">
</head>

<body>
<h1><a href="controlvr_class.htm">controlVR</a>.onLoadError</h1>
<H4>Availability</H4>
<p>Flash Player 7 </p>
<H4>Edition</H4>
<p>Flash MX 2004.</p>
<H4>Usage</H4>
<pre><EM>vr_mc</EM>.onLoadError = function(<em>error:String</em>,<em>code:String</em>) {
  // your statements here
}
</pre>
<H4>Returns</H4>
<p>Returns an error and code parameter </p>
<h4>Description</h4>
<p>The contorlVR instance will call the onLoadError for any error that may occur. The onLoadError will always return an error and code parameter.</p>
<p>The following table lists the errors and their codes which are applicable to the specific error. </p>
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <th>Error</th>
    <th>Code</th>
  </tr>
  <tr>
    <td>XMLLoadError</td>
    <td>url </td>
  </tr>
  <tr>
    <td bgcolor="#f8f8f8">XMLParseError</td>
    <td bgcolor="#f8f8f8"><ul>
      <li>-2 A CDATA section was not properly terminated. </li>
      <li>-3 The XML declaration was not properly terminated. </li>
      <li>-4 The DOCTYPE declaration was not properly terminated. </li>
      <li>-5 A comment was not properly terminated. </li>
      <li>-6 An XML element was malformed. </li>
      <li>-7 Out of memory. </li>
      <li>-8 An attribute value was not properly terminated. </li>
      <li>-9 A start-tag was not matched with an end-tag. </li>
      <li>-10 An end-tag was encountered without a matching start-tag. </li>
    </ul>
    </td>
  </tr>
  <tr>
    <td>URLNotFound</td>
    <td>url</td>
  </tr>
  <tr>
    <td bgcolor="#f8f8f8">LoadNeverCompleted</td>
    <td bgcolor="#f8f8f8">url</td>
  </tr>
  <tr>
    <td>VRObjectError</td>
    <td><ul>
      <li>-2 When there are not the same amount of images in each layer.</li>
    </ul></td>
  </tr>
</table>
<H4>&nbsp;</H4>
<H4>Example</H4>
<p>In the following example you will have to give your controlVR instance a name <strong>vr_mc </strong>and place the following code in the main timeline. The following code will generate a text field that will display any error that the <strong>vr_mc</strong> instance may generate. </p>
<code><pre>
vr_mc.onLoadError = function(error ,code){
	this.createTextField("error_txt",this.getNextHighestDepth(),1, 50, 200, 100);
	this.error_txt.multiline = true;
	this.error_txt.wordWrap = true;
	this.error_txt.border = true;
	this.error_txt.background = true;
	trace(error+code)
	if(error == "XMLLoadError"){
		this.error_txt.text += "sdfdfsgfd"+" : "+code+"\n";
	}
	if(error == "XMLParseError"){

		switch (code){
			case "-2" : this.error_txt.text += error+" A CDATA section was not properly terminated.\n";
				break;
			case "-3" : this.error_txt.text += error+" The XML declaration was not properly terminated.\n";
				break;
			case "-4" : this.error_txt.text += error+" The DOCTYPE declaration was not properly terminated.\n";
				break;
			case "-5" : this.error_txt.text += error+" A comment was not properly terminated.\n";
				break;
			case "-6" : this.error_txt.text += error+" An XML element was malformed.\n";
				break;
			case "-7" : this.error_txt.text += error+" Out of memory.\n";
				break;
			case "-8" : this.error_txt.text += error+" An attribute value was not properly terminated.\n";
				break;
			case "-9" : this.error_txt.text += error+" A start-tag was not matched with an end-tag.\n";
				break;
			case "-10" : this.error_txt.text += error+" An end-tag was encountered without a matching start-tag.\n";
				break;
		}
	}
	if(error == "URLNotFound"){
		this.error_txt.text = error+" : "+code+"\n";
	}
	if(error == "LoadNeverCompleted"){
		this.error_txt.text = error+" : "+code+"\n";
	}
	if(error == "VRObjectError"){
		switch (code){
			case "-2" : this.error_txt.text += error+" Not the same amount of images per layer.\n";
				break;
		}
	}
}
</pre></code>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -