📄 awflash220.html
字号:
<html>
<head><title>Macromedia Authorware - Flash Asset Xtra Command Reference: getError</title>
<script language="Javascript">
function swapImage(imgName,newImg){
if ((navigator.appName == 'Netscape' && parseFloat(navigator.appVersion) >= 3) || (parseFloat(navigator.appVersion) >= 4)){
eval('document.' + imgName + '.src = "' + newImg + '"');
}
}
</script>
</head>
<body link="#333399" vlink="#660033" alink="#000000" bgcolor="#FFFFFF">
<table border="0" cellspacing="0" cellpadding="0" width="95%">
<tr>
<font face="Arial, Helvetica, sans-serif" size="+1"><b>getError</b></font><br>
</tr>
<tr>
<td valign="top" align="right"><font face="Geneva, Arial, Helvetica, sans-serif" size="-1"><b>Syntax</b></font> </td>
<td valign="top"><code>result:=CallIcon(@"</code><font face="Geneva, Arial, Helvetica, sans-serif" size="2">IconTitle</font><code>", #getError)</code><font face="Geneva, Arial, Helvetica, sans-serif" size="2"></font><br> </td>
</tr>
<tr>
<td valign="top" align="right"><font face="Geneva, Arial, Helvetica, sans-serif" size="-1"><b>Type</b></font> </td>
<td valign="top"><font face="Geneva, Arial, Helvetica, sans-serif" size="-1">Method</font><br> </td>
</tr>
<tr>
<td valign="top" align="right"><font face="Geneva, Arial, Helvetica, sans-serif" size="-1"><b>Description</b> </font></td>
<td valign="top"><font face="Geneva, Arial, Helvetica, sans-serif" size="-1">This method indicates if an error occurred while streaming a Flash movie into memory. If an error did occur, the </font><code>getError</code><font face="Geneva, Arial, Helvetica, sans-serif" size="2"> method indicates the type of error. The </font><code>getError</code><font face="Geneva, Arial, Helvetica, sans-serif" size="2"> method returns these values:</font><p>
<table cellspacing="0" cellpadding="4">
<tr>
<td valign="top" width="14"><img src="images/tri.gif" width="14" height="10" vspace="2"></td>
<td valign="top"><code>FALSE</code><font face="Geneva, Arial, Helvetica, sans-serif" size="2"> No error occurred.</font></td>
</tr>
<tr>
<td valign="top" width="14"><img src="images/tri.gif" width="14" height="10" vspace="2"></td>
<td valign="top"><code>#memory</code><font face="Geneva, Arial, Helvetica, sans-serif" size="2"> There is not enough memory to load the Flash movie.</font></td>
</tr>
<tr>
<td valign="top" width="14"><img src="images/tri.gif" width="14" height="10" vspace="2"></td>
<td valign="top"><code>#fileNotFound</code><font face="Geneva, Arial, Helvetica, sans-serif" size="2"> The file containing the Flash movie could not be found.</font></td>
</tr>
<tr>
<td valign="top" width="14"><img src="images/tri.gif" width="14" height="10" vspace="2"></td>
<td valign="top"><code>#network</code><font face="Geneva, Arial, Helvetica, sans-serif" size="2"> A network error prevented the Flash movie from loading.</font></td>
</tr>
<tr>
<td valign="top" width="14"><img src="images/tri.gif" width="14" height="10" vspace="2"></td>
<td valign="top"><code>#fileFormat</code><font face="Geneva, Arial, Helvetica, sans-serif" size="2"> The file was found, but it appears to be of the wrong type, or an error occurred while reading the file.</font></td>
</tr>
<tr>
<td valign="top" width="14"><img src="images/tri.gif" width="14" height="10" vspace="2"></td>
<td valign="top"><code>#other</code><font face="Geneva, Arial, Helvetica, sans-serif" size="2"> Some other error occurred.</font></td>
</tr>
</table>
<p>
<font face="Geneva, Arial, Helvetica, sans-serif" size="-1">When an error occurs while a Flash movie is streaming into memory, Authorware sets the sprite icon's </font><code>state</code><font face="Geneva, Arial, Helvetica, sans-serif" size="2"> property to -1 to indicate that an error occurred. You can use the </font><code>getError</code><font face="Geneva, Arial, Helvetica, sans-serif" size="2"> method to determine what type of error occurred.</font><br> </td>
</tr>
<tr>
<td valign="top" align="right"><font face="Geneva, Arial, Helvetica, sans-serif" size="-1"><b>Example</b> </font></td>
<td valign="top"><font face="Geneva, Arial, Helvetica, sans-serif" size="-1">This routine checks to see if an error occurred for a Flash sprite icon named Flash Icon. If there was an error, the routine sets a custom variable with the message and then calls the </font><code>clearError</code><font face="Geneva, Arial, Helvetica, sans-serif" size="2"> method.</font><p>
<pre>
If GetIconProperty(@"Flash Icon", #state) then
Error:=CallIcon(@"Flash Icon", #getError)
CallIcon(@"Flash Icon", #clearError)
end
</pre>
</td>
</tr>
<tr>
<td valign="top" align="right"><font face="Geneva, Arial, Helvetica, sans-serif" size="-1"><b>Related Functions</b></font> </td>
<td valign="top"><code><a href="awflash250.html">state</a></code><font face="Geneva, Arial, Helvetica, sans-serif" size="2"> property, </font><code><a href="awflash27.html">clearError</a></code><font face="Geneva, Arial, Helvetica, sans-serif" size="2"> method</font><p>
<table border="0">
<tr>
<td><a href="awflash2.html" onmouseover="swapImage('back','images/contentsover.gif'); window.status='To Table of Contents';return true" onmouseout="swapImage('back','images/contents.gif')"><img src="images/contents.gif" name="back" border="0" vspace=1 alt="To Table of Contents"></a></td>
<td><a href="awflash219.html" onmouseover="swapImage('prev','images/prevover.gif'); window.status='Back to previous document';return true" onmouseout="swapImage('prev','images/prev.gif')"><img src="images/prev.gif" name="prev" border="0" vspace=1 alt="Back to Previous document"></a></td>
<td><a href="awflash221.html" onmouseover="swapImage('next','images/nextover.gif'); window.status='Forward to next document';return true" onmouseout="swapImage('next','images/next.gif')"><img src="images/next.gif" name="next" border="0" vspace=1 alt="Forward to next document"></a></td>
</tr>
</table>
<br><p>
</td>
</tr>
</table>
<br><p>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -