Flex中如何利用Gumbo SDK(4.0.0.3584以上)实现3D的FxRotate3D效果的例子

By Minidxer | May 3, 2009

接下来的例子演示了Flex中如何利用Gumbo SDK(4.0.0.3584以上),实现3D的FxRotate3D效果。

让我们先来看一下Demo可以右键View Source或点击这里察看源代码):


下面是完整代码(或点击这里察看):

Download: main.mxml
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FxApplication name="FxRotation3D_test"
  3.         xmlns="http://ns.adobe.com/mxml/2009">
  4.     <layout>
  5.         <BasicLayout />
  6.     </layout>
  7.  
  8.     <Declarations>
  9.         <FxRotate3D id="fxRotate3DX"
  10.                 target="{image}"
  11.                 xFrom="0"
  12.                 xTo="360"
  13.                 duration="2000" />
  14.  
  15.         <FxRotate3D id="fxRotate3DY"
  16.                 target="{image}"
  17.                 yFrom="0"
  18.                 yTo="360"
  19.                 duration="2000" />
  20.  
  21.         <FxRotate3D id="fxRotate3DZ"
  22.                 target="{image}"
  23.                 zFrom="0"
  24.                 zTo="360"
  25.                 duration="2000" />
  26.     </Declarations>
  27.  
  28.     <VGroup id="vGroup" left="10" top="10">
  29.         <FxButton id="fxButtonX"
  30.                 label="FxRotate3D X-axis"
  31.                 click="fxRotate3DX.play();" />
  32.         <FxButton id="fxButtonY"
  33.                 label="FxRotate3D Y-axis"
  34.                 click="fxRotate3DY.play();" />
  35.         <FxButton id="fxButtonZ"
  36.                 label="FxRotate3D Z-axis"
  37.                 click="fxRotate3DZ.play();" />
  38.     </VGroup>
  39.  
  40.     <Image id="image"
  41.             source="@Embed('assets/fx_appicon.jpg')"
  42.             horizontalCenter="0"
  43.             verticalCenter="0"
  44.             width="100"
  45.             height="100" />
  46.  
  47. </FxApplication>
代码:Peter deHaan 翻译/整理/编译:中文Flex例子

Topics: Gumbo, Other | No Comments » | Tags: , , , , , , ,

Search Posts