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

📄 advanced5.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;
}
.style16 {
	color: #009933;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 12px;
}
.style17 {color: #000000}
.style18 {font-size: 12px; font-style: normal; color: #000080; font-family: Verdana, Arial, Helvetica, sans-serif;}
-->
</style>
</head>

<body>
<table width="95%"  border="0">
  <tr>
    <td><h2 class="style2 style3">Rotating around other objects using z-sorting </h2>
      <p class="style2"><span style="">1. Let's take our first movie <span class="style1">'butterfly.fla'</span> and upgrade it (you can use your own objects as well, the principles remain the same).</span></p>
      <p class="style2"><span style="">2. Give the 3DPlane instance a height of '100' as shown below:</span></p>
      <p class="style2"><span style=""><img src="images/image51.gif" width="559" height="116"></span></p>
      <p class="style2"><span style=""> Now the 3DPlane contaning the butterfly picture will rotate at 100px above the zero point (you can check this by testing your movie), i.e. by spherical trajectory. We can increase this visual effect by placing a sphere under the butterfly.</span></p>
      <p class="style2"><span style="">3. Draw a circle on your main timeline with radius 95 (width: 190, height: 190) and give it a radial gradient:</span></p>
      <p class="style2"><span style=""><img src="images/image52.jpg" width="200" height="202"></span></p>
      <p class="style2"><span style="">4. Convert the circle into a movieclip (F8 button) and give it the instance name <span class="style1">'sphere'</span></span></p>
      <p class="style2"><span style=""><img src="images/image53.gif" width="468" height="116"></span></p>
      <p class="style2"><span style="">5. Position the center of the sphere exactly underneath the 3DPlane center (ensure that the sphere MovieClip is positioned under the 3DPlane). </span></p>
      <p class="style2"><span style="">6. Add any background art that you desire:</span></p>
      <p class="style2"><span style=""><img src="images/image54.jpg" width="427" height="378"></span></p>
      <p class="style2"><span style=""><br>
  By default, the <span class="style1">3DPlane</span> creates a 3D effect in one plane only. Using <span class="style1">'z-sorting'</span> we can make objects appear both on top and underneath the <span class="style1">3DPlane</span>. In this example, we know that when we can see the top of the butterfly, it must appear above the sphere, otherwise it must be underneath the sphere. The 'swap' function is called whenever the <span class="style1">3DPlane</span> is overturned. Add the following <span class="style1">'swap'</span> function to the <span class="style1">3DPlane</span> instance: </span></p>
      <p class="style16">onClipEvent (load) {<br>
  function swap() {<br>
  this.swapDepths(_parent.sphere);<br>
  }<br>
  }</p>
      <p class="style2">You can now test the movie. </p>
      <p class="style2"><span style="">
        <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="450" height="450">
          <param name="movie" value="images/image55.swf">
          <param name="quality" value="high">
          <embed src="images/image55.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="450" height="450"></embed>
        </object>
      </span></p>
      <p class="style2"><br>
          <span style="">In some cases you may want to create a more rigid 3D rotation that is not as free as the the rotation used in this example. See <span class="mainlink"><a href="advanced6.htm" target="_self" class="mainlink"><span class="style17">&quot;</span>Controlling the 3D rotation</a><span class="style17">&quot;</span></span><span class="style18"><span class="style17">.</span></span></span></p></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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