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

📄 advanced4.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>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.style1 {	color: #003366;
	font-weight: bold;
}
.style2 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
}
.underline {	text-decoration: underline;
}
.style3 {
	font-size: 24px;
	font-weight: bold;
}
.mainlink {	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-style: normal;
	font-weight: bold;
	color: #000080;
}
a:link {
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: none;
}
a:active {
	text-decoration: none;
}
.style7 {font-size: 12px}
.style8 {
	color: #009933;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
}
.style15 {font-size: 16px}
-->
</style>
</head>

<body>
<table width="95%"  border="0">
  <tr>
    <td><h2 class="style2 style3"><span style='font-family:Verdana'>How to create a two-sided 3DPlane</span></h2>
      <p class="style2"><span style=''>1. Create a new Flash MX movie and save it under the name <span class="style1"> 'card.fla'</span>.</span></p>
      <p class="style2"><span style=''>2. Create a new MovieClip. Give it a name and linkage name, for example, <span class="style1">'card'</span>.</span></p>
      <p class="style2"><span style=''>3. Make two frames in your MovieClip and place and images showing the face of a playing card in the first frame and the back of a playing card in the second frame.</span></p>
      <p class="style2"><span style=""><img src="images/image41.gif" width="188" height="303"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/image42.gif" width="188" height="303"></span></p>
      <p class="style2"><span style="">4. Add the following ActionScript code to the first frame:</span></p>
      <p class="style8">stop();<br>
  function swap() {<br>
  if (_currentframe == 1) {<br>
  gotoAndStop(2);<br>
  } else {<br>
  gotoAndStop(1);<br>
  }<br>
  } </p>
      <p class="style2"><span style="">This code defined the <span class="style1">'swap'</span> function. This function will be automatically called whenever the 3DPlane turns over. You can also achieve this effect by creating two different movieclips and placing them in the same single frame. You could then switch the value of their<span class="style1"> '_visible'</span> property using the <span class="style1">'swap' </span>function.</span></p>
      <p class="style2"><span style="">5. Drag the <span class="style1">3DPlane</span> component onto the stage and test your movie (in order to create the advanced live preview swf). After doing this, enter the linkage name in the <span class="style1">&quot;Content&quot;</span> parameter of the 3DPlane component.</span></p>
      <p class="style2">
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="220" height="220">
          <param name="movie" value="images/image43.swf">
          <param name="quality" value="high">
          <embed src="images/image43.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="220" height="220"></embed>
        </object>
      </p>
      <p class="style2"><span style="">You may also choose to create more than two frames for a fun effect:</span></p>
      <p class="style2">
        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="250" height="250">
          <param name="movie" value="images/image44.swf">
          <param name="quality" value="high">
          <embed src="images/image44.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="250" height="250"></embed>
        </object>
      </p>
      <p class="style2"><span style="">In this example, where we have more than two frames, we can use the following <span class="style1">'swap'</span> function instead:</span></p>
      <p class="style8">stop();<br>
  function swap() {<br>
  if (_currentframe == _totalframes) {<br>
  gotoAndStop(1);<br>
  } else {<br>
  nextFrame();<br>
  }<br>
  }</p>
      <p class="style2"><span style="">The <span class="style1">'swap'</span> function is also used for z-sorting. This is explained in the section &quot;<span class="mainlink"><a href="advanced5.htm" target="_self" class="mainlink">Rotating around other objects using z-sorting</a></span>&quot;.</span></p>
    <p class="style7">&nbsp;</p></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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