HonorLee 6 years ago
commit
bfaaed4bc3
100 changed files with 5580 additions and 0 deletions
  1. 86 0
      FDMSv2.0.as3proj
  2. BIN
      FLASH站组装程序结构设计规划.doc
  3. 0 0
      README.md
  4. BIN
      bin/.DS_Store
  5. BIN
      bin/FDMSv20.swf
  6. 39 0
      bin/ResSets.xml
  7. 272 0
      bin/UserInfo.xml
  8. BIN
      bin/expressInstall.swf
  9. 40 0
      bin/index.html
  10. 4 0
      bin/js/swfobject.js
  11. BIN
      bin/photo/1.jpg
  12. BIN
      bin/photo/11.jpg
  13. BIN
      bin/resource/baby.swf
  14. BIN
      bin/resource/bg.png
  15. BIN
      bin/resource/bg.swf
  16. BIN
      bin/resource/copyright.gif
  17. BIN
      bin/resource/diary.fla
  18. BIN
      bin/resource/diary.swf
  19. BIN
      bin/resource/diaryfl.fla
  20. BIN
      bin/resource/diaryfl.swf
  21. BIN
      bin/resource/face.jpg
  22. BIN
      bin/resource/feel.swf
  23. BIN
      bin/resource/fish.swf
  24. BIN
      bin/resource/infomation.swf
  25. BIN
      bin/resource/left_bottom.swf
  26. BIN
      bin/resource/life.swf
  27. BIN
      bin/resource/loading.swf
  28. BIN
      bin/resource/logo.swf
  29. BIN
      bin/resource/marrytime.swf
  30. BIN
      bin/resource/menu.swf
  31. BIN
      bin/resource/paopao.swf
  32. BIN
      bin/resource/photo.fla
  33. BIN
      bin/resource/photo.swf
  34. BIN
      bin/resource/right_bottom.swf
  35. BIN
      bin/resource/shuicao1.png
  36. BIN
      bin/resource/video.fla
  37. BIN
      bin/resource/video.swf
  38. BIN
      bin/resource/videofl.fla
  39. BIN
      bin/resource/videofl.swf
  40. BIN
      bin/resource/wish.swf
  41. BIN
      bin/案例2.7z
  42. 37 0
      obj/FDMSv2.0Config.old
  43. 37 0
      obj/FDMSv2.0Config.xml
  44. BIN
      old/.DS_Store
  45. 48 0
      old/ResSets.xml
  46. BIN
      old/resource/.DS_Store
  47. BIN
      old/resource/baby.fla
  48. BIN
      old/resource/baby.swf
  49. BIN
      old/resource/bg.fla
  50. 49 0
      old/resource/bg.html
  51. BIN
      old/resource/bg.swf
  52. BIN
      old/resource/copyright.gif
  53. BIN
      old/resource/diary.fla
  54. BIN
      old/resource/diary.swf
  55. BIN
      old/resource/flower.fla
  56. BIN
      old/resource/flower.swf
  57. BIN
      old/resource/gress.fla
  58. BIN
      old/resource/gress.swf
  59. BIN
      old/resource/index.fla
  60. BIN
      old/resource/index.swf
  61. BIN
      old/resource/loading.fla
  62. BIN
      old/resource/loading.swf
  63. BIN
      old/resource/logo.fla
  64. BIN
      old/resource/logo.swf
  65. BIN
      old/resource/nav.fla
  66. BIN
      old/resource/nav.swf
  67. BIN
      old/resource/ttree.fla
  68. BIN
      old/resource/ttree.swf
  69. BIN
      old/resource/新建文件夹/1.gif
  70. BIN
      old/resource/新建文件夹/1.jpg
  71. BIN
      old/resource/新建文件夹/2.gif
  72. BIN
      old/resource/新建文件夹/2.jpg
  73. BIN
      old/resource/新建文件夹/3.gif
  74. BIN
      old/resource/新建文件夹/4.gif
  75. BIN
      old/resource/新建文件夹/5.gif
  76. BIN
      old/resource/新建文件夹/copyright.gif
  77. BIN
      old/resource/新建文件夹/loading.fla
  78. BIN
      old/resource/新建文件夹/loading.swf
  79. BIN
      src/.DS_Store
  80. 60 0
      src/Main.as
  81. BIN
      src/class/.DS_Store
  82. 383 0
      src/class/DragBox.as
  83. 407 0
      src/class/ScrollBar.as
  84. 77 0
      src/class/caurina/transitions/AuxFunctions.as
  85. 714 0
      src/class/caurina/transitions/Equations.as
  86. 90 0
      src/class/caurina/transitions/PropertyInfoObj.as
  87. 49 0
      src/class/caurina/transitions/SpecialProperty.as
  88. 42 0
      src/class/caurina/transitions/SpecialPropertyModifier.as
  89. 42 0
      src/class/caurina/transitions/SpecialPropertySplitter.as
  90. 236 0
      src/class/caurina/transitions/TweenListObj.as
  91. 1132 0
      src/class/caurina/transitions/Tweener.as
  92. 471 0
      src/class/caurina/transitions/properties/ColorShortcuts.as
  93. 109 0
      src/class/caurina/transitions/properties/CurveModifiers.as
  94. 161 0
      src/class/caurina/transitions/properties/DisplayShortcuts.as
  95. 520 0
      src/class/caurina/transitions/properties/FilterShortcuts.as
  96. 93 0
      src/class/caurina/transitions/properties/SoundShortcuts.as
  97. 157 0
      src/class/caurina/transitions/properties/TextShortcuts.as
  98. 98 0
      src/class/com/adobe/air/logging/FileTarget.as
  99. 127 0
      src/class/com/adobe/crypto/HMAC.as
  100. 0 0
      src/class/com/adobe/crypto/MD5.as

+ 86 - 0
FDMSv2.0.as3proj

@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+  <!-- Output SWF options -->
+  <output>
+    <movie disabled="False" />
+    <movie input="" />
+    <movie path="bin\FDMSv20.swf" />
+    <movie fps="30" />
+    <movie width="1000" />
+    <movie height="620" />
+    <movie version="10" />
+    <movie background="#FFFFFF" />
+  </output>
+  <!-- Other classes to be compiled into your SWF -->
+  <classpaths>
+    <class path="src" />
+    <class path="..\..\class" />
+  </classpaths>
+  <!-- Build options -->
+  <build>
+    <option accessible="False" />
+    <option allowSourcePathOverlap="False" />
+    <option benchmark="False" />
+    <option es="False" />
+    <option locale="" />
+    <option loadConfig="" />
+    <option optimize="True" />
+    <option showActionScriptWarnings="True" />
+    <option showBindingWarnings="True" />
+    <option showInvalidCSS="True" />
+    <option showDeprecationWarnings="True" />
+    <option showUnusedTypeSelectorWarnings="True" />
+    <option strict="True" />
+    <option useNetwork="True" />
+    <option useResourceBundleMetadata="True" />
+    <option warnings="True" />
+    <option verboseStackTraces="False" />
+    <option linkReport="" />
+    <option loadExterns="" />
+    <option staticLinkRSL="True" />
+    <option additional="" />
+    <option compilerConstants="" />
+    <option customSDK="" />
+  </build>
+  <!-- SWC Include Libraries -->
+  <includeLibraries>
+    <!-- example: <element path="..." /> -->
+  </includeLibraries>
+  <!-- SWC Libraries -->
+  <libraryPaths>
+    <element path="F:\Flash开发\class\com\demonsters\debugger\MonsterDebugger.swc" />
+  </libraryPaths>
+  <!-- External Libraries -->
+  <externalLibraryPaths>
+    <!-- example: <element path="..." /> -->
+  </externalLibraryPaths>
+  <!-- Runtime Shared Libraries -->
+  <rslPaths>
+    <!-- example: <element path="..." /> -->
+  </rslPaths>
+  <!-- Intrinsic Libraries -->
+  <intrinsics>
+    <!-- example: <element path="..." /> -->
+  </intrinsics>
+  <!-- Assets to embed into the output SWF -->
+  <library>
+    <!-- example: <asset path="..." id="..." update="..." glyphs="..." mode="..." place="..." sharepoint="..." /> -->
+  </library>
+  <!-- Class files to compile (other referenced classes will automatically be included) -->
+  <compileTargets>
+    <compile path="src\Main.as" />
+  </compileTargets>
+  <!-- Paths to exclude from the Project Explorer tree -->
+  <hiddenPaths>
+    <!-- example: <hidden path="..." /> -->
+  </hiddenPaths>
+  <!-- Executed before build -->
+  <preBuildCommand />
+  <!-- Executed after build -->
+  <postBuildCommand alwaysRun="False" />
+  <!-- Other project options -->
+  <options>
+    <option showHiddenPaths="False" />
+    <option testMovie="ExternalPlayer" />
+  </options>
+</project>

BIN
FLASH站组装程序结构设计规划.doc


+ 0 - 0
README.md


BIN
bin/.DS_Store


BIN
bin/FDMSv20.swf


+ 39 - 0
bin/ResSets.xml

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8" ?>
+
+<configuration uid="0">
+	<progressBar type="default" set="500,100,#ff0000,#666666,0.1" id="progress" src="resource/loading.swf" level="0" alignSets="Center,0" data="configuration.xml" onProgressFunc="Loading" onStartFunc="Start" onFinishFunc="Finish" reset="" />
+	<resource>
+		<res id="covers" tag="覆盖类素材" preload="true" layer="bottom" >
+			
+			<res id="marrytime" tag="" src="swf,resource/marrytime.swf" alignSets="RT,2"  preload="true" reset="0,20,0,0" />
+			<res id="gress" tag="" src="swf,resource/gress.swf" alignSets="LB,2"  preload="true" loadSets="1,1,bottom" />
+		</res>
+		
+		<res id="cloumn" tag="板块" preload="true" layer="bottom" >
+			<res id="index" space="cloumn" tag="首页" src="swf,resource/infomation.swf" alignSets="Center,2" reset="0,0,550,280" moveOut="clear" unloadSets="1,0,CT" loadSets="1,0,CT" preload="true" />
+			 <res id="photo" space="cloumn" tag="相册" src="swf,resource/photo.swf" alignSets="" moveOut="clear" unloadSets="1,0,CB" loadSets="1,1,CT" reset="0,0,0,0"/>
+			<res id="wish" space="cloumn" tag="祝福" src="swf,resource/wish.swf" alignSets="" moveOut="clear" unloadSets="1,0" loadSets="1,1" reset="0,0,0,0" />
+			<res id="feel" space="cloumn" tag="心情" src="swf,resource/feel.swf" alignSets="Center,2" moveOut="clear" unloadSets="1,0,CB" loadSets="1,1,CT" reset="-250,0,530,620" layer="top" />
+			<res id="diary" space="cloumn" tag="日志" src="swf,resource/diary.swf" alignSets="Center,2" moveOut="clear" unloadSets="1,0,CB" loadSets="1,1,CT" reset="-250,0,530,620" layer="top">
+				<res id="diary_sort" space="cloumn" tag="日志" src="swf,resource/diaryfl.swf" alignSets="RC,2" moveOut="clear" unloadSets="1,0,CB" loadSets="1,1,CT" reset="350,50,451,729" preload="true"  />
+			</res>
+			<res id="video" space="cloumn" tag="心情" src="swf,resource/video.swf" alignSets="Center,2" moveOut="clear" unloadSets="1,0,CB" loadSets="1,1,CT" reset="-250,0,530,620" layer="top">
+				<res id="video_sort" space="cloumn" tag="日志" src="swf,resource/videofl.swf" alignSets="RC,2" moveOut="clear" unloadSets="1,0,CB" loadSets="1,1,CT" reset="350,50,451,729" preload="true"  />
+			</res>
+			<res id="life" space="cloumn" tag="生活" src="swf,resource/life.swf" alignSets="Center,2" moveOut="clear" unloadSets="1,0,CB" loadSets="1,1,CT"  reset="0,-100,800,500" status="0.8,1" />
+			<res id="baby" space="cloumn" tag="宝宝" src="swf,resource/baby.swf" alignSets="Center,2" moveOut="clear" unloadSets="1,0,CB" loadSets="1,1,CT"  />
+			
+		</res>
+		
+		<res id="ress" tag="背景类素材" preload="true" layer="bottom" >
+			<res id="nav" tag="导航" src="swf,resource/menu.swf" preload="true" reset="100,50,0,0" btnAction="btn0#0'index'0&btn1#0'diary'0&btn2#0'photo'0&btn3#0'feel'0&btn4#0'wish'0&btn5#0'video'0&btn6#0'life'0&btn7#0'baby'0" alignSets="LC,2" status="1,0.8" />
+			<res id="pangxie" tag="" src="swf,resource/logo.swf" alignSets="LT,2" preload="true" reset="30,30,0,0" />
+			<res id="qipao" tag="" src="swf,resource/paopao.swf" preload="true" alignSets="RB,2" reset="20,0,300,800" />
+			<res id="shuicao1" tag="" src="img,resource/shuicao1.png" preload="true" alignSets="RB,1" />
+			<res id="left_bottom" tag="" src="swf,resource/left_bottom.swf" preload="true" alignSets="LB,2" />
+			<res id="paopao" tag="" src="swf,resource/paopao.swf" preload="true" alignSets="LB,2" reset="20,0,300,800" />
+			<res id="fish" tag="" src="swf,resource/fish.swf" preload="true" status="0.5,1"  />
+			<res id="bg" tag="" src="swf,resource/bg.swf" preload="true" status="1,1" />
+		</res>
+	</resource>
+</configuration>

+ 272 - 0
bin/UserInfo.xml

@@ -0,0 +1,272 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<UserInfo>
+    <ad enable="false" src=""></ad>
+    <wedday>2011-01-01</wedday>
+    <home>
+        <face url="resource/face.jpg"></face>
+        <husband birthday="1985-05-03" address="河南省郑州市" name="郭靖">
+            <![CDATA[一生一世,白首不离]]>
+        </husband>
+        <wife birthday="1986-06-18" address="河南省郑州市" name="黄蓉">
+            <![CDATA[我决定,爱你一万年!]]>
+        </wife>
+    </home>
+    <diary>
+        <type id="0" title="所有日记"></type>
+        <type id="1" title="日志分类1">
+            <item id="1001" date="2010-10-01">日记标题1</item>
+            <item id="1001" date="2010-10-01">日记标题2</item>
+            <item id="1001" date="2010-10-01">日记标题3</item>
+            <item id="1001" date="2010-10-01">日记标题4</item>
+            <item id="1001" date="2010-10-01">日记标题5</item>
+        </type>
+        <type id="2" title="日志分类2">
+            <item id="1001" date="2010-10-01">日记标题1</item>
+            <item id="1001" date="2010-10-01">日记标题2</item>
+            <item id="1001" date="2010-10-01">日记标题3</item>
+            <item id="1001" date="2010-10-01">日记标题4</item>
+            <item id="1001" date="2010-10-01">日记标题5</item>
+        </type>
+		<type id="3" title="日志分类2">
+            <item id="1001" date="2010-10-01">日记标题1</item>
+            <item id="1001" date="2010-10-01">日记标题2</item>
+            <item id="1001" date="2010-10-01">日记标题3</item>
+            <item id="1001" date="2010-10-01">日记标题4</item>
+            <item id="1001" date="2010-10-01">日记标题5</item>
+			<item id="1001" date="2010-10-01">日记标题1</item>
+            <item id="1001" date="2010-10-01">日记标题2</item>
+            <item id="1001" date="2010-10-01">日记标题3</item>
+            <item id="1001" date="2010-10-01">日记标题4</item>
+            <item id="1001" date="2010-10-01">日记标题5</item>
+        </type>
+    </diary>
+    <feel>
+        <item id="1001" date="2010-10-01" title="心情标题">
+            <![CDATA[心情内容1]]>
+        </item>
+        <item id="1001" date="2010-10-01" title="心情标题">
+            <![CDATA[心情内容2]]>
+        </item>
+        <item id="1001" date="2010-10-01" title="心情标题">
+            <![CDATA[心情内容3]]>
+        </item>
+        <item id="1001" date="2010-10-01" title="心情标题">
+            <![CDATA[心情内容4]]>
+        </item>
+		<item id="1001" date="2010-10-01" title="心情标题">
+            <![CDATA[心情内容5]]>
+        </item>
+        <item id="1001" date="2010-10-01" title="心情标题">
+            <![CDATA[心情内容6]]>
+        </item>
+        <item id="1001" date="2010-10-01" title="心情标题">
+            <![CDATA[心情内容7]]>
+        </item>
+        <item id="1001" date="2010-10-01" title="心情标题">
+            <![CDATA[心情内容8]]>
+        </item>
+		<item id="1001" date="2010-10-01" title="心情标题">
+            <![CDATA[心情内容9]]>
+        </item>
+        <item id="1001" date="2010-10-01" title="心情标题">
+            <![CDATA[心情内容0]]>
+        </item>
+        <item id="1001" date="2010-10-01" title="心情标题">
+            <![CDATA[心情内容11]]>
+        </item>
+        <item id="1001" date="2010-10-01" title="心情标题">
+            <![CDATA[心情内容12]]>
+        </item>
+		<item id="1001" date="2010-10-01" title="心情标题">
+            <![CDATA[心情内容13]]>
+        </item>
+        <item id="1001" date="2010-10-01" title="心情标题">
+            <![CDATA[心情内容14]]>
+        </item>
+        <item id="1001" date="2010-10-01" title="心情标题">
+            <![CDATA[心情内容15]]>
+        </item>
+        <item id="1001" date="2010-10-01" title="心情标题">
+            <![CDATA[心情内容16]]>
+        </item>
+    </feel>
+    <photo>
+        <album id="1" title="相册名1" cover="photo/1.jpg">
+            <item cover="photo/11.jpg" src="http://www.21huazhuang.com/uploadfile/picture/2009-11-26/20091126133354317_10233_big_11.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="http://cimg22.163.com/lady/2008/1/11/20080111200008888d7.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="C:\Users\Dawnboy\Documents\图片收藏\养高清眼美女壁纸--00011.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="http://cimg22.163.com/lady/2008/1/11/20080111200008888d7.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="http://www.21huazhuang.com/uploadfile/picture/2009-11-26/20091126133354317_10233_big_11.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="C:\Users\Dawnboy\Documents\图片收藏\养高清眼美女壁纸--00011.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+        </album>
+		<album id="2" title="相册名2" cover="http://www.hb.xinhuanet.com/photo/2009-01/08/xin_36301060815528902286813.jpg">
+            <item cover="photo/11.jpg" src="http://www.21huazhuang.com/uploadfile/picture/2009-11-26/20091126133354317_10233_big_11.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="http://cimg22.163.com/lady/2008/1/11/20080111200008888d7.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="C:\Users\Dawnboy\Documents\图片收藏\养高清眼美女壁纸--00011.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="http://cimg22.163.com/lady/2008/1/11/20080111200008888d7.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="http://www.21huazhuang.com/uploadfile/picture/2009-11-26/20091126133354317_10233_big_11.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="C:\Users\Dawnboy\Documents\图片收藏\养高清眼美女壁纸--00011.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+        </album>
+		<album id="3" title="相册名3" cover="http://www.21huazhuang.com/uploadfile/picture/2009-11-26/20091126133354317_10233_big_11.jpg">
+            <item cover="photo/11.jpg" src="http://cimg22.163.com/lady/2008/1/11/20080111200008888d7.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="http://www.21huazhuang.com/uploadfile/picture/2009-11-26/20091126133354317_10233_big_11.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="C:\Users\Dawnboy\Documents\图片收藏\养高清眼美女壁纸--00011.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="http://www.21huazhuang.com/uploadfile/picture/2009-11-26/20091126133354317_10233_big_11.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="http://cimg22.163.com/lady/2008/1/11/20080111200008888d7.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="C:\Users\Dawnboy\Documents\图片收藏\养高清眼美女壁纸--00011.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+        </album>
+		<album id="4" title="相册名4" cover="http://www.hb.xinhuanet.com/photo/2009-01/08/xin_36301060815528902286813.jpg">
+            <item cover="photo/11.jpg" src="http://cimg22.163.com/lady/2008/1/11/20080111200008888d7.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="C:\Users\Dawnboy\Documents\图片收藏\养高清眼美女壁纸--00011.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="http://cimg22.163.com/lady/2008/1/11/20080111200008888d7.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="http://www.21huazhuang.com/uploadfile/picture/2009-11-26/20091126133354317_10233_big_11.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="C:\Users\Dawnboy\Documents\图片收藏\养高清眼美女壁纸--00011.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="http://www.21huazhuang.com/uploadfile/picture/2009-11-26/20091126133354317_10233_big_11.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+        </album>
+		<album id="5" title="相册名5" cover="http://cimg22.163.com/lady/2008/1/11/20080111200008888d7.jpg">
+            <item cover="photo/11.jpg" src="C:\Users\Dawnboy\Documents\图片收藏\养高清眼美女壁纸--00011.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="http://cimg22.163.com/lady/2008/1/11/20080111200008888d7.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="http://www.21huazhuang.com/uploadfile/picture/2009-11-26/20091126133354317_10233_big_11.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="C:\Users\Dawnboy\Documents\图片收藏\养高清眼美女壁纸--00011.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="http://www.21huazhuang.com/uploadfile/picture/2009-11-26/20091126133354317_10233_big_11.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+			<item cover="photo/11.jpg" src="http://cimg22.163.com/lady/2008/1/11/20080111200008888d7.jpg" title="照片名" date="2010-01-01">
+                <![CDATA[照片说明]]>
+            </item>
+        </album>
+    </photo>
+    <video>
+        <myvideo id="1" title="我上传的">
+            <item cover="resource/copyright.gif" src="aaa.flv" title="视频名" date="2010-01-01">
+                <![CDATA[视频简介]]>
+            </item>
+			<item cover="resource/copyright.gif" src="aaa.flv" title="视频名" date="2010-01-01">
+                <![CDATA[频简介]]>
+            </item>
+			<item cover="resource/copyright.gif" src="aaa.flv" title="视频名" date="2010-01-01">
+                <![CDATA[视频简介]]>
+            </item>
+			<item cover="resource/copyright.gif" src="aaa.flv" title="视频名" date="2010-01-01">
+                <![CDATA[视频简介]]>
+            </item>
+			<item cover="resource/copyright.gif" src="aaa.flv" title="视频名" date="2010-01-01">
+                <![CDATA[视频简介]]>
+            </item>
+			<item cover="resource/copyright.gif" src="aaa.flv" title="视频名" date="2010-01-01">
+                <![CDATA[视频简介]]>
+            </item>
+        </myvideo>
+        <favvideo id="2" title="我收藏的">
+            <item cover="resource/copyright.gif" src="http://" title="视频名" date="2010-01-01">
+                <![CDATA[视频简介]]>
+            </item>
+        </favvideo>
+    </video>
+    <wish>
+        <item id="1" title="祝福标题1" name="姓名1" musicname="爱" signer="歌手名" date="时间">
+            <![CDATA[祝福内容1]]>
+        </item>
+		<item id="1" title="祝福标题2" name="姓名2" musicname="祝福" signer="歌手名" date="时间">
+            <![CDATA[祝福内容2]]>
+        </item>
+		<item id="1" title="祝福标题3" name="姓名3" musicname="爱" signer="歌手名" date="时间">
+            <![CDATA[祝福内容3]]>
+        </item>
+		<item id="1" title="祝福标题4" name="姓名4" musicname="祝福" signer="歌手名" date="时间">
+            <![CDATA[祝福内容4]]>
+        </item>
+		<item id="1" title="祝福标题5" name="姓名5" musicname="爱" signer="歌手名" date="时间">
+            <![CDATA[祝福内容5]]>
+        </item>
+		<item id="1" title="祝福标题6" name="姓名6" musicname="祝福" signer="歌手名" date="时间">
+            <![CDATA[祝福内容6]]>
+        </item>
+		<item id="1" title="祝福标题7" name="姓名7" musicname="爱" signer="歌手名" date="时间">
+            <![CDATA[祝福内容7]]>
+        </item>
+		<item id="1" title="祝福标题8" name="姓名8" musicname="祝福" signer="歌手名" date="时间">
+            <![CDATA[祝福内容8]]>
+        </item>
+		<item id="1" title="祝福标题9" name="姓名9" musicname="爱" signer="歌手名" date="时间">
+            <![CDATA[祝福内容9]]>
+        </item>
+		<item id="1" title="祝福标题10" name="姓名10" musicname="祝福" signer="歌手名" date="时间">
+            <![CDATA[祝福内容10]]>
+        </item>
+		<item id="1" title="祝福标题11" name="姓名11" musicname="爱" signer="歌手名" date="时间">
+            <![CDATA[祝福内容1]]>
+        </item>
+		<item id="1" title="祝福标题12" name="姓名12" musicname="祝福" signer="歌手名" date="时间">
+            <![CDATA[祝福内容12]]>
+        </item>
+    </wish>
+    <life>
+        <plant>
+            <item id="1">洗衣服</item>
+            <item id="1">洗衣服</item>
+            <item id="1">洗衣服</item>
+            <item id="1">洗衣服</item>
+        </plant>
+		<namefight>
+			
+		</namefight>
+    </life>
+    <baby ischildsite="false" img="babyLock.jpg" />
+</UserInfo>

BIN
bin/expressInstall.swf


+ 40 - 0
bin/index.html

@@ -0,0 +1,40 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html>
+<head>
+	<title>FDMSv2.0</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+	<meta name="language" content="en" />
+	<meta name="description" content="" />
+	<meta name="keywords" content="" />
+	
+	<script src="js/swfobject.js" type="text/javascript"></script>
+	<script type="text/javascript">
+		var flashvars = {
+		};
+		var params = {
+			menu: "false",
+			scale: "noScale",
+			allowFullscreen: "true",
+			allowScriptAccess: "always",
+			bgcolor: "#FFFFFF"
+		};
+		var attributes = {
+			id:"FDMSv20"
+		};
+		swfobject.embedSWF("FDMSv20.swf", "altContent", "100%", "100%", "10.0.0", "expressInstall.swf", flashvars, params, attributes);
+	</script>
+	<style type="text/css">
+		html, body { height:100%; overflow:hidden; }
+		body { margin:0; }
+	</style>
+</head>
+<body>
+	<div id="altContent">
+		<h1>FDMSv2.0</h1>
+		<p>Alternative content</p>
+		<p><a href="http://www.adobe.com/go/getflashplayer"><img 
+			src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" 
+			alt="Get Adobe Flash player" /></a></p>
+	</div>
+</body>
+</html>

File diff suppressed because it is too large
+ 4 - 0
bin/js/swfobject.js


BIN
bin/photo/1.jpg


BIN
bin/photo/11.jpg


BIN
bin/resource/baby.swf


BIN
bin/resource/bg.png


BIN
bin/resource/bg.swf


BIN
bin/resource/copyright.gif


BIN
bin/resource/diary.fla


BIN
bin/resource/diary.swf


BIN
bin/resource/diaryfl.fla


BIN
bin/resource/diaryfl.swf


BIN
bin/resource/face.jpg


BIN
bin/resource/feel.swf


BIN
bin/resource/fish.swf


BIN
bin/resource/infomation.swf


BIN
bin/resource/left_bottom.swf


BIN
bin/resource/life.swf


BIN
bin/resource/loading.swf


BIN
bin/resource/logo.swf


BIN
bin/resource/marrytime.swf


BIN
bin/resource/menu.swf


BIN
bin/resource/paopao.swf


BIN
bin/resource/photo.fla


BIN
bin/resource/photo.swf


BIN
bin/resource/right_bottom.swf


BIN
bin/resource/shuicao1.png


BIN
bin/resource/video.fla


BIN
bin/resource/video.swf


BIN
bin/resource/videofl.fla


BIN
bin/resource/videofl.swf


BIN
bin/resource/wish.swf


BIN
bin/案例2.7z


+ 37 - 0
obj/FDMSv2.0Config.old

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--This Adobe Flex compiler configuration file was generated by a tool.-->
+<!--Any modifications you make may be lost.-->
+<flex-config>
+  <target-player>10.0.0</target-player>
+  <compiler>
+    <define append="true">
+      <name>CONFIG::debug</name>
+      <value>true</value>
+    </define>
+    <define append="true">
+      <name>CONFIG::release</name>
+      <value>false</value>
+    </define>
+    <define append="true">
+      <name>CONFIG::timeStamp</name>
+      <value>'2011/7/15'</value>
+    </define>
+    <source-path append="true">
+      <path-element>F:\Flash开发\AS3程序开发\FDMS系统 v2.0\src</path-element>
+      <path-element>F:\Flash开发\class</path-element>
+      <path-element>E:\Program Files\FlashDevelop\Library\AS3\classes</path-element>
+    </source-path>
+    <library-path append="true">
+      <path-element>F:\Flash开发\class\com\demonsters\debugger\MonsterDebugger.swc</path-element>
+    </library-path>
+  </compiler>
+  <file-specs>
+    <path-element>F:\Flash开发\AS3程序开发\FDMS系统 v2.0\src\Main.as</path-element>
+  </file-specs>
+  <default-background-color>#FFFFFF</default-background-color>
+  <default-frame-rate>30</default-frame-rate>
+  <default-size>
+    <width>1000</width>
+    <height>620</height>
+  </default-size>
+</flex-config>

+ 37 - 0
obj/FDMSv2.0Config.xml

@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--This Adobe Flex compiler configuration file was generated by a tool.-->
+<!--Any modifications you make may be lost.-->
+<flex-config>
+  <target-player>10.0.0</target-player>
+  <compiler>
+    <define append="true">
+      <name>CONFIG::debug</name>
+      <value>true</value>
+    </define>
+    <define append="true">
+      <name>CONFIG::release</name>
+      <value>false</value>
+    </define>
+    <define append="true">
+      <name>CONFIG::timeStamp</name>
+      <value>'2011/7/15'</value>
+    </define>
+    <source-path append="true">
+      <path-element>F:\Flash开发\AS3程序开发\FDMS系统 v2.0\src</path-element>
+      <path-element>F:\Flash开发\class</path-element>
+      <path-element>E:\Program Files\FlashDevelop\Library\AS3\classes</path-element>
+    </source-path>
+    <library-path append="true">
+      <path-element>F:\Flash开发\class\com\demonsters\debugger\MonsterDebugger.swc</path-element>
+    </library-path>
+  </compiler>
+  <file-specs>
+    <path-element>F:\Flash开发\AS3程序开发\FDMS系统 v2.0\src\Main.as</path-element>
+  </file-specs>
+  <default-background-color>#FFFFFF</default-background-color>
+  <default-frame-rate>30</default-frame-rate>
+  <default-size>
+    <width>1000</width>
+    <height>620</height>
+  </default-size>
+</flex-config>

BIN
old/.DS_Store


+ 48 - 0
old/ResSets.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!--
+0,logo_mc,0,2,150,150,100,60|0,logo_mc,2,1,300,300,150,100|1,logo_mc,4,LB
+ scaleMode="scale"
+ 0,logo_mc,0,2,150,150,100,60|0,logo_mc,2,1,300,300,150,100|1,logo_mc,4,LB
+-->
+
+<!--	<siteinfo>
+		<sitename>FWCMS-FLASH站点组合管理系统-FlashWebsiteCombinManagementSystem</sitename>
+		<website>http://127.0.0.1/</website>
+		<contact>
+			<telphone>13939562197</telphone>
+			<phone>+86-0371-12345678</phone>
+			<email>dawnboy@yeah.net</email>
+			<url>http://www.129810.net/</url>
+			<address>河南省郑州市花园路</address>
+			<oicq>11873831</oicq>
+		</contact>
+		<copyright href="http://www.qianshouchina.com">Copyright © 2010-2011 129810.Net.All rights reserved.河南省郑州市XXXXXXXXXXXXXX</copyright>
+		<support href="http://www.qianshouchina.com">技术支持:XXXXX</support>
+	</siteinfo>-->
+
+<configuration uid="0">
+	<progressBar type="default" set="500,100,#ff0000,#666666,0.1" id="progress" src="resource/loading.swf" level="0" alignSets="Center,0" data="configuration.xml" onProgressFunc="Loading" onStartFunc="Start" onFinishFunc="Finish" reset="" />
+	<resource>
+		<res id="covers" tag="覆盖类素材" preload="true" layer="bottom" >
+			<res id="nav" tag="导航" src="swf,resource/nav.swf" preload="true" reset="30,250,0,0" btnAction="btn_0#0,index,0&btn_1#0,diary,0&btn_7#0,baby,0" />
+			<res id="flower" tag="" src="swf,resource/flower.swf" alignSets="LB,2"  preload="true" reset="-50,-20,690,220" />
+			<res id="gress" tag="" src="swf,resource/gress.swf" alignSets="LB,2"  preload="true" loadSets="1,1,bottom" />
+		</res>
+		
+		<res id="cloumn" tag="板块" preload="true" layer="bottom" >
+			<res id="index" space="cloumn" tag="首页" src="swf,resource/index.swf" alignSets="RB,2" preload="true" reset="0,50,910,550" moveOut="clear" unloadSets="1,0,RB" loadSets="1,0,RB" 
+				btnAction="btn5#4,nav,0,to,4|0,baby,0&btn2#4,nav,0,to,1|0,diary,0&btn3#4,nav,0,to,2|0,photo,0" 
+				overAction="btn5#4,nav,0,move,4&btn2#4,nav,0,move,1&btn3#4,nav,0,move,2" 
+				outAction="btn5#4,nav,0,move&btn2#4,nav,0,move&btn3#4,nav,0,move"
+			 />
+			<res id="diary" space="cloumn" tag="日志" src="swf,resource/diary.swf" alignSets="Center,2" moveOut="clear" unloadSets="1,0,CB" loadSets="1,1,CT" reset="0,0,850,415" />
+			<res id="baby" space="cloumn" tag="宝宝" src="swf,resource/baby.swf" alignSets="Center,2" moveOut="clear" unloadSets="1,0,CB" loadSets="1,1,CT" />
+		</res>
+		
+		<res id="ress" tag="背景类素材" preload="true" layer="bottom" >
+			<res id="bird" tag="" src="swf,resource/logo.swf" alignSets="LT,1" preload="true" reset="50,20,0,0"/>
+			<res id="marryTimer" tag="计时" src="swf,resource/ttree.swf" alignSets="RT,2" preload="true" reset="-50,-100,0,0" loadSets="" />
+			<res id="bigbg" tag="" src="swf,resource/bg.swf" alignSets="Center,0"  preload="true" status="1,1.5" loadSets="1,0,Center" />
+		</res>
+	</resource>
+</configuration>

BIN
old/resource/.DS_Store


BIN
old/resource/baby.fla


BIN
old/resource/baby.swf


BIN
old/resource/bg.fla


+ 49 - 0
old/resource/bg.html

@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="zh-CN" xml:lang="zh-CN">
+	<head>
+		<title>bg</title>
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+		<style type="text/css" media="screen">
+		html, body { height:100%; background-color: #ffffff;}
+		body { margin:0; padding:0; overflow:hidden; }
+		#flashContent { width:100%; height:100%; }
+		</style>
+	</head>
+	<body>
+		<div id="flashContent">
+			<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="550" height="400" id="bg" align="middle">
+				<param name="movie" value="bg.swf" />
+				<param name="quality" value="high" />
+				<param name="bgcolor" value="#ffffff" />
+				<param name="play" value="true" />
+				<param name="loop" value="true" />
+				<param name="wmode" value="window" />
+				<param name="scale" value="showall" />
+				<param name="menu" value="true" />
+				<param name="devicefont" value="false" />
+				<param name="salign" value="" />
+				<param name="allowScriptAccess" value="sameDomain" />
+				<!--[if !IE]>-->
+				<object type="application/x-shockwave-flash" data="bg.swf" width="550" height="400">
+					<param name="movie" value="bg.swf" />
+					<param name="quality" value="high" />
+					<param name="bgcolor" value="#ffffff" />
+					<param name="play" value="true" />
+					<param name="loop" value="true" />
+					<param name="wmode" value="window" />
+					<param name="scale" value="showall" />
+					<param name="menu" value="true" />
+					<param name="devicefont" value="false" />
+					<param name="salign" value="" />
+					<param name="allowScriptAccess" value="sameDomain" />
+				<!--<![endif]-->
+					<a href="http://www.adobe.com/go/getflash">
+						<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="获得 Adobe Flash Player" />
+					</a>
+				<!--[if !IE]>-->
+				</object>
+				<!--<![endif]-->
+			</object>
+		</div>
+	</body>
+</html>

BIN
old/resource/bg.swf


BIN
old/resource/copyright.gif


BIN
old/resource/diary.fla


BIN
old/resource/diary.swf


BIN
old/resource/flower.fla


BIN
old/resource/flower.swf


BIN
old/resource/gress.fla


BIN
old/resource/gress.swf


BIN
old/resource/index.fla


BIN
old/resource/index.swf


BIN
old/resource/loading.fla


BIN
old/resource/loading.swf


BIN
old/resource/logo.fla


BIN
old/resource/logo.swf


BIN
old/resource/nav.fla


BIN
old/resource/nav.swf


BIN
old/resource/ttree.fla


BIN
old/resource/ttree.swf


BIN
old/resource/新建文件夹/1.gif


BIN
old/resource/新建文件夹/1.jpg


BIN
old/resource/新建文件夹/2.gif


BIN
old/resource/新建文件夹/2.jpg


BIN
old/resource/新建文件夹/3.gif


BIN
old/resource/新建文件夹/4.gif


BIN
old/resource/新建文件夹/5.gif


BIN
old/resource/新建文件夹/copyright.gif


BIN
old/resource/新建文件夹/loading.fla


BIN
old/resource/新建文件夹/loading.swf


BIN
src/.DS_Store


+ 60 - 0
src/Main.as

@@ -0,0 +1,60 @@
+package 
+{
+	import flash.display.Sprite;
+	import flash.events.Event;
+	import net.fdms.Action.MouseAction;
+	import net.fdms.fdms;
+	import net.fdms.Frame.*;
+	import net.fdms.Function.Align.AlignSets;
+	import net.fdms.Resource.ProgressBar;
+	import flash.events.MouseEvent;
+	
+	/**
+	 * 2011/5/26 14:39
+	 * @author Dawnboy
+	 */
+	public class Main extends Sprite 
+	{
+		public function Main():void 
+		{
+			if (stage) init();
+			else addEventListener(Event.ADDED_TO_STAGE, init);
+		}
+		
+		private function init(e:Event = null):void 
+		{
+			removeEventListener(Event.ADDED_TO_STAGE, init);
+			// entry point
+			
+			//初始化鼠标事件
+			MouseAction.RegMouseAction(OpenMouse, CloseMouse);
+			MouseAction.MouseActionOn();
+			
+			Frame.init(addChild(new Sprite()), stage, addChild(new Sprite()));		//初始化框架
+			ProgressBar.Init(Frame.Control);										//进度条初始化
+			StageSets.init(this.stage);												//初始化场景设置
+			StageSets.addResizeFunc(AlignSets.align);
+			
+			var foo:Object = { ResSets:"ResSets.xml", DataSets:"UserInfo.xml",page:"cloumn:diary" };	//模拟传值
+			//fdms.init(this.loaderInfo.parameters);
+			fdms.init(foo);
+		}
+		
+		private function OpenMouse():void {
+			CloseMouse();
+			addEventListener(MouseEvent.CLICK, MouseAction.BtnAction);
+			addEventListener(MouseEvent.MOUSE_OVER, MouseAction.OverAction);
+			addEventListener(MouseEvent.MOUSE_OUT, MouseAction.OutAction);
+		}
+		
+		private function CloseMouse():void {
+			removeEventListener(MouseEvent.CLICK, MouseAction.BtnAction);
+			removeEventListener(MouseEvent.MOUSE_OVER, MouseAction.OverAction);
+			removeEventListener(MouseEvent.MOUSE_OUT, MouseAction.OutAction);
+			
+		}
+		
+		
+	}
+	
+}

BIN
src/class/.DS_Store


+ 383 - 0
src/class/DragBox.as

@@ -0,0 +1,383 @@
+package 
+{
+
+	import flash.display.*;
+
+	import flash.events.*;
+
+	import flash.geom.*;
+
+	import flash.ui.Mouse;
+
+
+
+	public class DragBox extends Sprite
+	{
+
+		private var gripperMinWidth:Number;//拖动框最小值
+
+		private var gripperMaxWidth:Number;//拖动框最大值
+
+		private var resizeFlag:Boolean = false;//是否可以resize
+
+		private var originalScale:Number;//窗体的高宽比
+
+		private var dragBoundary:Rectangle;//可以拖动的范围
+
+		private var dragOffset:Number;//dragbox窗体的偏移量
+
+		private var mc_cursor:Sprite=new Sprite();//鼠标样式
+
+		private var mc_imageThumb:Sprite=new Sprite();//缩略图
+
+		public function DragBox(rect:Rectangle,minWidth:uint = 75, maxWidth:uint=200,scale:Number=1,offset:Number=0)
+		{
+
+			this.gripperMinWidth = minWidth;
+
+			this.gripperMaxWidth = maxWidth;
+
+			this.originalScale = scale;
+
+			this.dragBoundary = rect;
+
+			this.dragOffset = offset;
+
+			this.addEventListener(Event.ADDED_TO_STAGE, onStage);
+
+		}
+
+		private function onStage(_e:Event):void
+		{
+
+			this.removeEventListener(Event.ADDED_TO_STAGE, onStage);
+
+			initStage();
+
+			initListeners();
+
+		}
+
+		private function initStage()
+		{
+
+			this.alpha = 0.3;
+
+			mc_imageThumb = Sprite(parent.getChildByName("mc_imageThumb"));
+
+			addChild(mc_cursor);
+
+			mc_cursor.visible = false;
+
+		}
+
+		//绘制边框
+
+		private function drawBorder():void
+		{
+
+			this.graphics.clear();
+
+			this.graphics.beginFill(0, 0);
+
+			this.graphics.lineStyle(1, 0x111111);
+
+			this.graphics.drawRect(0, 0, mc_gripper.width, mc_gripper.height);
+
+			this.graphics.endFill();
+
+		}
+
+		//添加侦听器
+
+		private function initListeners():void
+		{
+
+			stage.addEventListener(MouseEvent.MOUSE_UP, onDragBoxMouseUp);
+
+			mc_gripper.addEventListener(MouseEvent.MOUSE_OVER, onRectMouseOver);
+
+			mc_gripper.addEventListener(MouseEvent.MOUSE_OUT, onRectMouseOut);
+
+			mc_gripper.addEventListener(MouseEvent.MOUSE_DOWN, onRectDown);
+
+			mc_gripper.addEventListener(MouseEvent.MOUSE_UP, onRectUp);
+
+			mc_corner.addEventListener(MouseEvent.MOUSE_OVER, onCornerOver);
+
+			mc_corner.addEventListener(MouseEvent.MOUSE_DOWN, onCornerDown);
+
+			mc_corner.addEventListener(MouseEvent.MOUSE_UP, onCornerUp);
+
+		}
+
+		private function onDragBoxMouseUp(_e:MouseEvent)
+		{
+
+			resizeFlag = false;
+
+			mc_gripper.stopDrag();
+
+			mc_corner.stopDrag();
+
+		}
+
+		private function onRectMouseOver(_e:MouseEvent)
+		{
+
+			Mouse.hide();
+
+			mc_cursor.visible = true;
+
+			mouseFollow();
+
+			this.addEventListener(MouseEvent.MOUSE_MOVE, onBgMouseMove);
+
+		}
+
+		public function onBgMouseMove(_e:MouseEvent)
+		{
+
+			mouseFollow();
+
+			_e.updateAfterEvent();
+
+		}
+
+		private function mouseFollow()
+		{
+
+			mc_cursor.x = mouseX;
+
+			mc_cursor.y = mouseY;
+
+		}
+
+		private function onRectMouseOut(_e:MouseEvent)
+		{
+
+			Mouse.show();
+
+			mc_cursor.visible = false;
+
+		}
+
+		private function onRectDown(_e:MouseEvent)
+		{
+
+			this.startDrag(false,new Rectangle(dragBoundary.x, dragBoundary.y, dragBoundary.width - mc_gripper.width, dragBoundary.height - mc_gripper.height));
+
+		}
+
+		private function onRectUp(_e:MouseEvent)
+		{
+
+			createBitmap(parent.getChildByName("video"),mc_gripper);
+
+			this.stopDrag();
+
+		}
+
+		private function onCornerOver(_e:MouseEvent)
+		{
+
+			Mouse.show();
+
+			mc_cursor.visible = false;
+
+		}
+
+		private function onCornerDown(_e:MouseEvent)
+		{
+
+			resizeFlag = true;
+
+			mc_corner.addEventListener(MouseEvent.MOUSE_MOVE, onCornerMove);
+
+		}
+
+		private function onCornerUp(_e:MouseEvent)
+		{
+
+			mc_corner.stopDrag();
+
+			mc_corner.x = mc_gripper.width - mc_corner.width;
+
+			mc_corner.y = mc_gripper.height - mc_corner.height;
+
+		}
+
+		private function onCornerMove(_e:MouseEvent)
+		{
+
+			if (resizeFlag)
+			{
+
+				resizeBox();
+
+				drawBorder();
+
+				_e.updateAfterEvent();
+
+			}
+
+		}
+
+		//窗体缩放部分
+
+		private function resizeBox()
+		{
+
+			//开始拖动
+
+			mc_corner.startDrag();
+
+			//设置宽高
+
+			mc_gripper.width = mc_corner.x + mc_corner.width;
+
+			mc_gripper.height = mc_gripper.width * originalScale;
+
+			//设置右下角那个图标的位置
+
+			mc_cornerBg.x = mc_gripper.width - mc_cornerBg.width;
+
+			mc_cornerBg.y = mc_gripper.height - mc_cornerBg.height;
+
+			checkWall();
+
+			drawBorder();
+
+			createBitmap(parent.getChildByName("video"),mc_gripper);
+
+		}
+
+		//边缘检测
+
+		private function checkWall()
+		{
+
+			//宽度小于最小允许宽度时的处理
+
+			if (mc_gripper.width <= gripperMinWidth)
+			{
+
+				mc_gripper.width = gripperMinWidth;
+
+				mc_cornerBg.x = gripperMinWidth - mc_cornerBg.width;
+
+			}
+
+			//宽度大于最大允许宽度时的处理
+
+			if (mc_gripper.width >= gripperMaxWidth)
+			{
+
+				mc_gripper.width = gripperMaxWidth;
+
+				mc_cornerBg.x = gripperMaxWidth - mc_cornerBg.width;
+
+			}
+
+			//高度小于最小允许高度时的处理
+
+			if (mc_gripper.height <= gripperMinWidth * originalScale)
+			{
+
+				mc_gripper.height = gripperMinWidth * originalScale;
+
+				mc_cornerBg.y = gripperMinWidth * originalScale - mc_cornerBg.height;
+
+			}
+
+			//高度大于最大允许高度时的处理
+
+			if (mc_gripper.height >= gripperMaxWidth * originalScale)
+			{
+
+				mc_gripper.height = gripperMaxWidth * originalScale;
+
+				mc_cornerBg.y = gripperMaxWidth * originalScale - mc_cornerBg.width;
+
+			}
+
+			//拖动到dragBoundary范围外的处理
+
+			if (this.x+mc_gripper.width>=(dragBoundary.width+dragOffset) || this.y+mc_gripper.height>=(dragBoundary.height+dragOffset))
+			{
+
+				var offsetX:Number=this.x+mc_gripper.width-(dragBoundary.width+dragOffset);
+
+				if (offsetX > 0)
+				{
+
+					this.x -=  offsetX;
+
+					onCornerUp(null);
+
+				}
+
+				var offsetY:Number=this.y+mc_gripper.height-(dragBoundary.height+dragOffset);
+
+				if (offsetY > 0)
+				{
+
+					this.y -=  offsetY;
+
+					onCornerUp(null);
+
+				}
+
+			}
+
+		}
+
+		//建立bitmap
+
+		private function createBitmap(sp:Object,box:Sprite)
+		{
+
+			removeChildren(mc_imageThumb);
+
+			var jpgSource = new BitmapData(dragBoundary.width,dragBoundary.height);
+
+			jpgSource.draw(sp);
+
+			var pt:Point = new Point(box.x,box.y);
+
+			pt = box.localToGlobal(pt);
+
+			var rect:Rectangle = new Rectangle(pt.x - dragOffset,pt.y - dragOffset,box.width,box.height);//设置复制的大小和起始点
+
+			var jpgOut:BitmapData = new BitmapData(box.width,box.height);
+
+			jpgOut.copyPixels(jpgSource, rect,new Point(0, 0));
+			//复制,并设置复制到的起始点;
+
+			var bp:Bitmap = new Bitmap(jpgOut);
+
+			bp.width = gripperMaxWidth;
+
+			bp.height = gripperMaxWidth * originalScale;
+
+			mc_imageThumb.addChild(bp);
+
+		}
+
+		//删除子元件的函数
+
+		private function removeChildren(dObj:DisplayObjectContainer)
+		{
+
+			while (dObj.numChildren>0)
+			{
+
+				dObj.removeChildAt(0);
+
+			}
+
+		}
+
+	}
+
+}

+ 407 - 0
src/class/ScrollBar.as

@@ -0,0 +1,407 @@
+package 
+{
+	import flash.display.*;
+	import flash.events.*;
+	import flash.geom.Point;
+	import flash.geom.Rectangle;
+	import flash.utils.Timer;
+	
+	public class ScrollBar
+	{
+		public static const H = "H";
+		public static const L = "L";
+		
+		public const name = "滚动条窗口";
+		
+		private var _speed:Number = 15;
+		private var _upBtn:Sprite;
+		private var _downBtn:Sprite;
+		
+		private var _tween:Number;
+		private var _elastic:Boolean;
+		private var _lineAbleClick:Boolean;
+		private var _mouseWheel:Boolean;
+		private var _direction:String;
+		private var _scale9Grid:Rectangle;
+
+		private var _target:DisplayObject;
+		private var _maskTarget:DisplayObject;
+		private var _scrollBar:Sprite;
+		private var _scrollLine:Sprite;
+		
+		private var _timer:Timer = null;
+		private var _scrollBarOriginalPoint:Point;
+		private var _parentMC:DisplayObjectContainer;
+		private var _rectangle:Rectangle;
+		private var _distanceX:Number;
+		private var _distanceY:Number;
+		private var _targetPoint:Number = NaN;
+		
+		private var _coor:String;
+		private var _length:String;
+		private var _mouse:String;
+		private var _oldLength:Point;
+		private var _abled = true;
+		
+		public function set tween($value:Number):void
+		{
+			_tween = $value < 1||$value > 20?1:$value;
+		}
+		
+		public function set elastic($value:Boolean):void
+		{
+			_elastic = $value ;
+			if (_abled)
+			makeScrollBar();    
+		}
+		
+		public function set lineAbleClick($value:Boolean):void
+		{
+			_lineAbleClick = $value ;
+			if (_lineAbleClick)
+			_scrollLine.addEventListener(MouseEvent.MOUSE_DOWN,              scrollLineMouseDownHandler, false, 0, true );	
+			else 
+			_scrollLine.removeEventListener(MouseEvent.MOUSE_DOWN,              scrollLineMouseDownHandler);	
+		}
+		
+		public function set mouseWheel($value:Boolean):void
+		{
+			_mouseWheel = $value ;
+			if (_mouseWheel && _abled)
+			_parentMC.stage.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler, false, 0, true );
+			else if(_abled)
+			_parentMC.stage.removeEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler);
+		}
+			
+		public function set direction($value:String):void
+		{
+			_direction = $value ;
+			_coor = _direction == "H"?"x":"y";
+			_length = _coor == "x"?"width":"height";
+			_mouse = _coor == "x"?"mouseX":"mouseY";
+			
+			if (_abled)
+			makeScrollBar();  
+		}
+		
+		public function set scale9Grid($value:Rectangle):void
+		{
+			_scale9Grid = $value ;
+			try { _scrollBar.scale9Grid =  _scale9Grid } catch (e) { _scrollBar.scale9Grid = null }
+		}
+		
+		public function set speed($value:Number):void
+		{
+			_speed = $value<5||$value>35?15:$value;
+		}
+		
+		public function set UP($target:Sprite):void
+		{
+			_upBtn = $target;
+			if (!_abled)
+			{
+				_upBtn.visible = false;
+				_upBtn.removeEventListener(MouseEvent.MOUSE_DOWN, upDownBtnMouseDownHandler );
+				return;
+			}
+			_upBtn.addEventListener(MouseEvent.MOUSE_DOWN, upDownBtnMouseDownHandler, false, 0, true );
+		}
+		
+		public function set DOWN($target:Sprite):void
+		{
+			_downBtn = $target;
+			if (!_abled)
+			{
+				_downBtn.visible = false;
+				_downBtn.removeEventListener(MouseEvent.MOUSE_DOWN, upDownBtnMouseDownHandler );
+				return;
+			}
+			_downBtn.addEventListener(MouseEvent.MOUSE_DOWN, upDownBtnMouseDownHandler, false, 0, true );
+		}
+		
+		/**
+		* 双向(横板+竖版)滚动条
+		* @param		$target		      	  	DisplayObjectContainer		 * 被遮罩对象
+		* @param		$maskTarget		        *		        			 * 遮罩对象(可传入Rectangle类型)
+		* @param		$scrollBar		        Sprite		     		     * 滚动滑块
+		* @param		$scrollLine		        Sprite		      			 * 滚动条
+		* @param		$tween		            Number		         		 * 缓动系数
+		* @param		$elastic		        Boolean		       			 * 滑块可否拉伸
+		* @param		$lineAbleClick		    Boolean		      	         * 滚动条可否点击
+		* @param		$mouseWheel		   		Boolean		      	         * 滚轮可用
+		* @param		$direction		    	String		      	         * 方向(默认纵向)
+		*/  
+		public function ScrollBar($target:DisplayObjectContainer, $maskTarget:*, $scrollBar:Sprite, $scrollLine:Sprite, $tween:Number = 0, $elastic:Boolean = true, $lineAbleClick:Boolean = false, $mouseWheel:Boolean = true, $direction:String = "L") 
+		{
+			if (!(($maskTarget is DisplayObject) || ($maskTarget is Rectangle))) throw(new Error("没有传入遮罩对象"));
+			
+			_target = $target;
+			_maskTarget = $maskTarget is Rectangle?drawMaskTarget($maskTarget):$maskTarget;
+			_scrollBar = $scrollBar;
+			_scrollLine = $scrollLine;
+			_tween = $tween < 1||$tween > 20?1:$tween;
+			_elastic = $elastic;
+			_lineAbleClick = $lineAbleClick;
+			_mouseWheel = $mouseWheel;
+			_direction = $direction;
+			_parentMC = _scrollBar.parent;
+			_coor = $direction == "H"?"x":"y";
+			_length = _coor == "x"?"width":"height";
+			_mouse = _coor == "x"?"mouseX":"mouseY";
+			_oldLength = new Point(_scrollBar.width, _scrollBar.height);			
+			makeScrollPane();
+		}
+		
+		/**
+		* 刷新UI
+		*/  
+		public function refresh():void
+		{
+			checkAbled();
+		}
+		
+		private function makeScrollPane():void
+		{
+			initAllThing();
+			_scrollBarOriginalPoint = new Point(_scrollBar.x, _scrollBar.y);
+			makeMask();
+			checkAbled();	
+		}
+		
+		//检查可用性
+		private function checkAbled():void
+		{
+			_scrollBar.y = _scrollLine.y;
+			if (_maskTarget[_length] >= _target[_length])
+			{
+				_scrollBar.visible = false;
+				_scrollLine.visible = false;
+				if (_downBtn)_downBtn.visible = false;
+				if (_upBtn)_upBtn.visible = false;
+				_abled = false;
+				
+				if (_upBtn&&_downBtn) {
+					_upBtn.removeEventListener(MouseEvent.MOUSE_DOWN, upDownBtnMouseDownHandler );
+					_downBtn.removeEventListener(MouseEvent.MOUSE_DOWN, upDownBtnMouseDownHandler );
+				}
+				if (_mouseWheel) makeMouseWheel("stop");
+			}else
+			{
+				_scrollBar.visible = true;
+				_scrollLine.visible = true;
+				if (_downBtn)_downBtn.visible = true;
+				if (_upBtn)_upBtn.visible = true;
+				_abled = true;
+				
+				makeScrollBar(); 
+				if (_upBtn&&_downBtn) {
+					_upBtn.addEventListener(MouseEvent.MOUSE_DOWN, upDownBtnMouseDownHandler, false, 0, true );
+					_downBtn.addEventListener(MouseEvent.MOUSE_DOWN, upDownBtnMouseDownHandler, false, 0, true );
+				}
+				if (_lineAbleClick) makeScrollLine();
+				if (_mouseWheel) makeMouseWheel();
+				timeListener();	
+			}
+		}
+		
+		//timer检测器
+		private function timeListener():void
+		{
+			if (_timer != null) return;
+			_timer = new Timer(1000 / 30, 0);
+			_timer.addEventListener(TimerEvent.TIMER, timeHandler, false, 0, true );
+			_timer.start();
+		}
+		
+		//注册点
+		private function initAllThing():void
+		{
+			setRegistration(_maskTarget as DisplayObjectContainer);
+			setRegistration(_target as DisplayObjectContainer);
+			setRegistration(_scrollLine);
+			setRegistration(_scrollBar);
+		}
+		
+		//初始化遮罩
+		private function makeMask():void
+		{
+			_target.x = Math.floor(_target.x);                                //防止文字模糊
+			_target.y = Math.floor(_target.y);
+			_maskTarget.x = _target.x;
+			_maskTarget.y = _target.y;
+			if (_maskTarget.parent == null)_parentMC.addChild(_maskTarget);
+			_target.mask = _maskTarget;
+			/*
+			GaiaDebug.warn("mask:h"+_target.mask.height+",w"+_target.mask.width+",x"+_target.mask.x+",y"+_target.mask.y);
+			GaiaDebug.warn("target:h" + _target.height + ",w" + _target.width + ",x" + _target.x + ",y" + _target.y);		
+			*/
+		}
+		
+		//背景条
+		private function makeScrollLine():void
+		{
+			_scrollLine.buttonMode = false;
+			_scrollLine.addEventListener(MouseEvent.MOUSE_DOWN,              scrollLineMouseDownHandler, false, 0, true );	
+		}
+		
+		//滚轮
+		private function makeMouseWheel(state:String = "start" ):void
+		{
+			if(state=="start")
+			_parentMC.stage.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler, false, 0, true );
+			else if (state == "stop")
+			_parentMC.stage.removeEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelHandler);
+		}
+		
+		//滑块
+		private function makeScrollBar():void 
+		{
+			_scrollBar.buttonMode = true;
+			_scrollBar.mouseChildren = false;
+			scrollBarLength();                                                  	 //计算滑块长度
+			if (_coor == "y")
+			_rectangle = new Rectangle(_scrollBarOriginalPoint.x, _scrollBarOriginalPoint.y, 0, _scrollLine.getRect(_parentMC)[_length] - _scrollBar.getRect(_parentMC)[_length]);
+			else 
+			_rectangle = new Rectangle(_scrollBarOriginalPoint.x, _scrollBarOriginalPoint.y, _scrollLine.getRect(_parentMC)[_length] - _scrollBar.getRect(_parentMC)[_length], 0);
+			
+			_scrollBar.addEventListener(MouseEvent.MOUSE_DOWN,              scrollBarMouseDownHandler );
+			_scrollBar.addEventListener(MouseEvent.MOUSE_UP,                scrollBarMouseUpHandler);
+			_scrollBar.parent.stage.addEventListener(MouseEvent.MOUSE_UP,   scrollBarMouseUpHandler);
+			_scrollBar.root.stage.addEventListener(Event.MOUSE_LEAVE,       scrollBarMouseUpHandler);
+		}
+		
+		//计算滑块长度
+		private function scrollBarLength():void
+		{
+			if (_elastic)
+			try { _scrollBar.scale9Grid =  _scale9Grid } catch (e) {  _scrollBar.scale9Grid = null }
+			else
+			_scrollBar.scale9Grid = null;
+			
+			_scrollBar.width = _oldLength.x;
+			_scrollBar.height = _oldLength.y;
+			_scrollBar[_length] = _elastic ? _scrollLine[_length] * _maskTarget[_length] / _target[_length] : _oldLength[_coor];
+		}
+		
+		private function scrollBarMouseDownHandler(e:MouseEvent):void
+		{
+			_distanceX = _scrollBar.x - _parentMC.mouseX;
+			_distanceY = _scrollBar.y - _parentMC.mouseY;
+			_scrollBar.addEventListener(Event.ENTER_FRAME, scrolBarEnterFrameHandler);
+		}
+		
+		private function scrollBarMouseUpHandler(e:*):void
+		{
+			_scrollBar.removeEventListener(Event.ENTER_FRAME, scrolBarEnterFrameHandler);
+		}
+		
+		private function scrolBarEnterFrameHandler(e:Event):void
+		{
+			makeDragBar();
+		}
+		
+		private function timeHandler(e:TimerEvent):void
+		{
+			scrollMachine();
+		}
+		
+		//滚动条点击
+		private function scrollLineMouseDownHandler(e:MouseEvent):void
+		{
+			if (_parentMC[_mouse] > _scrollBar[_coor])
+			_scrollBar[_coor] += 3*_speed;
+			else
+			_scrollBar[_coor] -= 3*_speed;
+			judgeBoundary();
+		}
+		
+		//上下按钮点击
+		private function upDownBtnMouseDownHandler(e:MouseEvent):void
+		{
+			if (e.currentTarget == _downBtn)
+			_scrollBar[_coor] += 3*_speed;
+			else
+			_scrollBar[_coor] -= 3 * _speed;
+			judgeBoundary();
+		}
+		
+		//鼠标滚轮
+		private function mouseWheelHandler(e:MouseEvent):void
+		{
+			if (e.delta < 0)
+			_scrollBar[_coor] += _speed;
+			else
+			_scrollBar[_coor] -= _speed;
+			judgeBoundary();
+		}
+		
+		//拖动滑块
+		private function makeDragBar():void
+		{
+			_scrollBar.x = _parentMC.mouseX + _distanceX;
+			_scrollBar.y = _parentMC.mouseY + _distanceY;
+			judgeBoundary();	
+		}
+		
+		//判断边界 
+		private function judgeBoundary() :void
+		{
+			if (_scrollBar.x < _rectangle.x)
+			_scrollBar.x = _rectangle.x;
+			if (_scrollBar.x > _rectangle.right)
+			_scrollBar.x = _rectangle.right;
+			if (_scrollBar.y < _rectangle.y )
+			_scrollBar.y = _rectangle.y;
+			if (_scrollBar.y > _rectangle.bottom)
+			_scrollBar.y = _rectangle.bottom;
+		}
+		
+		//滚动计算公式
+		private function scrollMachine():void
+		{
+			_targetPoint = _maskTarget[_coor] - (_scrollBar[_coor] - _scrollBarOriginalPoint[_coor]) * (_target[_length] - _maskTarget[_length]) / (_scrollLine[_length] - _scrollBar[_length]);
+			if (Math.abs(_target[_coor] - _targetPoint) < .3)
+			{
+				if (_target[_coor] != _targetPoint) _target[_coor] = _targetPoint;
+				return;
+			}
+			
+			if (_tween != 0)
+			_target[_coor] += (_targetPoint - _target[_coor]) / _tween; 
+			else
+			_target[_coor] = _targetPoint;
+		}
+		
+		//绘制遮罩
+		private function drawMaskTarget($rect:Rectangle):Sprite
+		{
+			var maskTarget:Sprite = new Sprite();
+			maskTarget.graphics.beginFill(0xffffff);
+			maskTarget.graphics.drawRect($rect.x, $rect.y, $rect.width, $rect.height);
+			maskTarget.graphics.endFill();
+			return maskTarget;
+		}
+		
+		//注册点移到左上角
+		private function setRegistration($target:DisplayObjectContainer):void
+		{
+			var rect = $target.getRect($target);
+			var _x = rect.x;
+			var _y = rect.y;
+			var depth:Number = $target.numChildren;
+			if (depth == 0) return;	
+			for (var i:uint = 0; i < depth; i++ )
+			{
+				var target:DisplayObject = $target.getChildAt(i);
+				target.x -= _x;
+				target.y -= _y;
+			}
+			if ($target.parent != null)
+			{
+				$target.x += _x;
+				$target.y += _y;
+			}
+		}
+	}
+	
+}

+ 77 - 0
src/class/caurina/transitions/AuxFunctions.as

@@ -0,0 +1,77 @@
+package caurina.transitions {
+
+	/**
+	 * Generic, auxiliary functions
+	 *
+	 * @author		Zeh Fernando
+	 * @version		1.0.0
+	 * @private
+	 */
+
+	public class AuxFunctions {
+
+		/**
+		 * Gets the R (xx0000) bits from a number
+		 *
+		 * @param		p_num				Number		Color number (ie, 0xffff00)
+		 * @return							Number		The R value
+		 */
+		public static function numberToR(p_num:Number):Number {
+			// The initial & is meant to crop numbers bigger than 0xffffff
+			return (p_num & 0xff0000) >> 16;
+		}
+
+		/**
+		 * Gets the G (00xx00) bits from a number
+		 *
+		 * @param		p_num				Number		Color number (ie, 0xffff00)
+		 * @return							Number		The G value
+		 */
+		public static function numberToG(p_num:Number):Number {
+			return (p_num & 0xff00) >> 8;
+		}
+
+		/**
+		 * Gets the B (0000xx) bits from a number
+		 *
+		 * @param		p_num				Number		Color number (ie, 0xffff00)
+		 * @return							Number		The B value
+		 */
+		public static function numberToB(p_num:Number):Number {
+			return (p_num & 0xff);
+		}
+
+		/**
+		 * Returns the number of properties an object has
+		 *
+		 * @param		p_object			Object		Target object with a number of properties
+		 * @return							Number		Number of total properties the object has
+		 */
+		public static function getObjectLength(p_object:Object):uint {
+			var totalProperties:uint = 0;
+			for (var pName:String in p_object) totalProperties ++;
+			return totalProperties;
+		}
+
+        /* Takes a variable number of objects as parameters and "adds" their properties, from left to right. If a latter object defines a property as null, it will be removed from the final object
+    	* @param		args				Object(s)	A variable number of objects
+    	* @return							Object		An object with the sum of all paremeters added as properties.
+    	*/
+    	public static function concatObjects(...args) : Object{
+    		var finalObject : Object = {};
+    		var currentObject : Object;
+    		for (var i : int = 0; i < args.length; i++){
+    			currentObject = args[i];
+    			for (var prop : String in currentObject){
+    				if (currentObject[prop] == null){
+    				    // delete in case is null
+    					delete finalObject[prop];
+    				}else{
+    					finalObject[prop] = currentObject[prop];
+    				}
+    			}
+    		}
+    		return finalObject;
+    	}
+	}
+}

File diff suppressed because it is too large
+ 714 - 0
src/class/caurina/transitions/Equations.as


+ 90 - 0
src/class/caurina/transitions/PropertyInfoObj.as

@@ -0,0 +1,90 @@
+package caurina.transitions {
+
+	/**
+	 * PropertyInfoObj
+	 * An object containing the updating info for a given property (its starting value, and its final value)
+	 *
+	 * @author		Zeh Fernando
+	 * @version		1.0.0
+	 * @private
+	 */
+
+	public class PropertyInfoObj {
+		
+		public var valueStart				:Number;	// Starting value of the tweening (null if not started yet)
+		public var valueComplete			:Number;	// Final desired value
+		public var originalValueComplete	:Object;	// Final desired value as declared initially
+		public var arrayIndex				:Number;	// Index (if this is an array item)
+		public var extra					:Object;	// Additional parameters, used by some special properties
+		public var isSpecialProperty		:Boolean;	// Whether or not this is a special property instead of a direct one
+		public var hasModifier				:Boolean;	// Whether or not it has a modifier function
+		public var modifierFunction		:Function;	// Modifier function, if any
+		public var modifierParameters		:Array;		// Additional array of modifier parameters
+
+		// ==================================================================================================================================
+		// CONSTRUCTOR function -------------------------------------------------------------------------------------------------------------
+
+		/**
+		 * Initializes the basic PropertyInfoObj.
+		 *
+		 * @param	p_valueStart		Number		Starting value of the tweening (null if not started yet)
+		 * @param	p_valueComplete		Number		Final (desired) property value
+		 */
+		function PropertyInfoObj(p_valueStart:Number, p_valueComplete:Number, p_originalValueComplete:Object, p_arrayIndex:Number, p_extra:Object, p_isSpecialProperty:Boolean, p_modifierFunction:Function, p_modifierParameters:Array) {
+			valueStart			=	p_valueStart;
+			valueComplete		=	p_valueComplete;
+			originalValueComplete	=	p_originalValueComplete;
+			arrayIndex				=	p_arrayIndex;
+			extra					=	p_extra;
+			isSpecialProperty		=	p_isSpecialProperty;
+			hasModifier			=	Boolean(p_modifierFunction);
+			modifierFunction 	=	p_modifierFunction;
+			modifierParameters	=	p_modifierParameters;
+		}
+
+
+		// ==================================================================================================================================
+		// OTHER functions ------------------------------------------------------------------------------------------------------------------
+
+		/**
+		 * Clones this property info and returns the new PropertyInfoObj
+		 *
+		 * @param	omitEvents		Boolean			Whether or not events such as onStart (and its parameters) should be omitted
+		 * @return 					TweenListObj	A copy of this object
+		 */
+		public function clone():PropertyInfoObj {
+			var nProperty:PropertyInfoObj = new PropertyInfoObj(valueStart, valueComplete, originalValueComplete, arrayIndex, extra, isSpecialProperty, modifierFunction, modifierParameters);
+			return nProperty;
+		}
+
+		/**
+		 * Returns this object described as a String.
+		 *
+		 * @return 					String		The description of this object.
+		 */
+		public function toString():String {
+			var returnStr:String = "\n[PropertyInfoObj ";
+			returnStr += "valueStart:" + String(valueStart);
+			returnStr += ", ";
+			returnStr += "valueComplete:" + String(valueComplete);
+			returnStr += ", ";
+			returnStr += "originalValueComplete:" + String(originalValueComplete);
+			returnStr += ", ";
+			returnStr += "arrayIndex:" + String(arrayIndex);
+			returnStr += ", ";
+			returnStr += "extra:" + String(extra);
+			returnStr += ", ";
+			returnStr += "isSpecialProperty:" + String(isSpecialProperty);
+			returnStr += ", ";
+			returnStr += "hasModifier:" + String(hasModifier);
+			returnStr += ", ";
+			returnStr += "modifierFunction:" + String(modifierFunction);
+			returnStr += ", ";
+			returnStr += "modifierParameters:" + String(modifierParameters);
+			returnStr += "]\n";
+			return returnStr;
+		}
+		
+	}
+
+}

+ 49 - 0
src/class/caurina/transitions/SpecialProperty.as

@@ -0,0 +1,49 @@
+package caurina.transitions {
+	
+	/**
+	 * SpecialProperty
+	 * A kind of a getter/setter for special properties
+	 *
+	 * @author		Zeh Fernando
+	 * @version		1.0.0
+	 * @private
+	 */
+
+	public class SpecialProperty {
+	
+		public var getValue:Function; // (p_obj:Object, p_parameters:Array, p_extra:Object): Number
+		public var setValue:Function; // (p_obj:Object, p_value:Number, p_parameters:Array, p_extra:Object): Void
+		public var parameters:Array;
+		public var preProcess:Function; // (p_obj:Object, p_parameters:Array, p_originalValueComplete:Object, p_extra:Object): Number
+
+		/**
+		 * Builds a new special property object.
+		 *
+		 * @param		p_getFunction		Function	Reference to the function used to get the special property value
+		 * @param		p_setFunction		Function	Reference to the function used to set the special property value
+		 */
+		public function SpecialProperty (p_getFunction:Function, p_setFunction:Function, p_parameters:Array = null, p_preProcessFunction:Function = null) {
+			getValue = p_getFunction;
+			setValue = p_setFunction;
+			parameters = p_parameters;
+			preProcess = p_preProcessFunction;
+		}
+	
+		/**
+		 * Converts the instance to a string that can be used when trace()ing the object
+		 */
+		public function toString():String {
+			var value:String = "";
+			value += "[SpecialProperty ";
+			value += "getValue:"+String(getValue);
+			value += ", ";
+			value += "setValue:"+String(setValue);
+			value += ", ";
+			value += "parameters:"+String(parameters);
+			value += ", ";
+			value += "preProcess:"+String(preProcess);
+			value += "]";
+			return value;
+		}
+	}
+}

+ 42 - 0
src/class/caurina/transitions/SpecialPropertyModifier.as

@@ -0,0 +1,42 @@
+package caurina.transitions {
+
+	/**
+	 * SpecialPropertyModifier
+	 * A special property which actually acts on other properties
+	 *
+	 * @author		Zeh Fernando
+	 * @version		1.0.0
+	 * @private
+	 */
+
+	public class SpecialPropertyModifier {
+
+		public var modifyValues:Function;
+		public var getValue:Function;
+
+		/**
+		 * Builds a new special property modifier object.
+		 * 
+		 * @param		p_modifyFunction		Function		Function that returns the modifider parameters.
+		 */
+		public function SpecialPropertyModifier (p_modifyFunction:Function, p_getFunction:Function) {
+			modifyValues = p_modifyFunction;
+			getValue = p_getFunction;
+		}
+
+	/**
+	 * Converts the instance to a string that can be used when trace()ing the object
+	 */
+	public function toString():String {
+		var value:String = "";
+		value += "[SpecialPropertyModifier ";
+		value += "modifyValues:"+String(modifyValues);
+		value += ", ";
+		value += "getValue:"+String(getValue);
+		value += "]";
+		return value;
+	}
+
+	}
+
+}

+ 42 - 0
src/class/caurina/transitions/SpecialPropertySplitter.as

@@ -0,0 +1,42 @@
+package caurina.transitions {
+
+	/**
+	 * SpecialPropertySplitter
+	 * A proxy setter for special properties
+	 *
+	 * @author		Zeh Fernando
+	 * @version		1.0.0
+	 * @private
+	 */
+
+	public class SpecialPropertySplitter {
+
+		public var parameters:Array;
+		public var splitValues:Function;
+
+		/**
+		 * Builds a new group special property object.
+		 *
+		 * @param		p_splitFunction		Function	Reference to the function used to split a value
+		 */
+		public function SpecialPropertySplitter (p_splitFunction:Function, p_parameters:Array) {
+			splitValues = p_splitFunction;
+			parameters = p_parameters;
+		}
+
+		/**
+		 * Converts the instance to a string that can be used when trace()ing the object
+		 */
+		public function toString():String {
+			var value:String = "";
+			value += "[SpecialPropertySplitter ";
+			value += "splitValues:"+String(splitValues); // .toString();
+			value += ", ";
+			value += "parameters:"+String(parameters);
+			value += "]";
+			return value;
+		}
+
+	}
+
+}

+ 236 - 0
src/class/caurina/transitions/TweenListObj.as

@@ -0,0 +1,236 @@
+package caurina.transitions {
+    import caurina.transitions.AuxFunctions;
+	/**
+	 * The tween list object. Stores all of the properties and information that pertain to individual tweens.
+	 *
+	 * @author		Nate Chatellier, Zeh Fernando
+	 * @version		1.0.4
+	 * @private
+	 */
+
+	public class TweenListObj {
+		
+		public var scope					:Object;	// Object affected by this tweening
+		public var properties				:Object;	// List of properties that are tweened (PropertyInfoObj instances)
+			// .valueStart					:Number		// Initial value of the property
+			// .valueComplete				:Number		// The value the property should have when completed
+		public var timeStart				:Number;	// Time when this tweening should start
+		public var timeComplete				:Number;	// Time when this tweening should end
+		public var useFrames				:Boolean;	// Whether or not to use frames instead of time
+		public var transition				:Function;	// Equation to control the transition animation
+		public var transitionParams			:Object;	// Additional parameters for the transition
+		public var onStart					:Function;	// Function to be executed on the object when the tween starts (once)
+		public var onUpdate					:Function;	// Function to be executed on the object when the tween updates (several times)
+		public var onComplete				:Function;	// Function to be executed on the object when the tween completes (once)
+		public var onOverwrite				:Function;	// Function to be executed on the object when the tween is overwritten
+		public var onError					:Function;	// Function to be executed if an error is thrown when tweener exectues a callback (onComplete, onUpdate etc)
+		public var onStartParams			:Array;		// Array of parameters to be passed for the event
+		public var onUpdateParams			:Array;		// Array of parameters to be passed for the event
+		public var onCompleteParams			:Array;		// Array of parameters to be passed for the event
+		public var onOverwriteParams		:Array;		// Array of parameters to be passed for the event
+		public var onStartScope				:Object;	// Scope in which the event function is ran
+		public var onUpdateScope			:Object;	// Scope in which the event function is ran
+		public var onCompleteScope			:Object;	// Scope in which the event function is ran
+		public var onOverwriteScope			:Object;	// Scope in which the event function is ran
+		public var onErrorScope				:Object;	// Scope in which the event function is ran
+		public var rounded					:Boolean;	// Use rounded values when updating
+		public var isPaused					:Boolean;	// Whether or not this tween is paused
+		public var timePaused				:Number;	// Time when this tween was paused
+		public var isCaller					:Boolean;	// Whether or not this tween is a "caller" tween
+		public var count					:Number;	// Number of times this caller should be called
+		public var timesCalled				:Number;	// How many times the caller has already been called ("caller" tweens only)
+		public var waitFrames				:Boolean;	// Whether or not this caller should wait at least one frame for each call execution ("caller" tweens only)
+		public var skipUpdates				:Number;	// How many updates should be skipped (default = 0; 1 = update-skip-update-skip...)
+		public var updatesSkipped			:Number;	// How many updates have already been skipped
+		public var hasStarted				:Boolean;	// Whether or not this tween has already started
+
+		// ==================================================================================================================================
+		// CONSTRUCTOR function -------------------------------------------------------------------------------------------------------------
+
+		/**
+		 * Initializes the basic TweenListObj.
+		 *
+		 * @param	p_scope				Object		Object affected by this tweening
+		 * @param	p_timeStart			Number		Time when this tweening should start
+		 * @param	p_timeComplete		Number		Time when this tweening should end
+		 * @param	p_useFrames			Boolean		Whether or not to use frames instead of time
+		 * @param	p_transition		Function	Equation to control the transition animation
+		 */
+		function TweenListObj(p_scope:Object, p_timeStart:Number, p_timeComplete:Number, p_useFrames:Boolean, p_transition:Function, p_transitionParams:Object) {
+			scope				=	p_scope;
+			timeStart			=	p_timeStart;
+			timeComplete		=	p_timeComplete;
+			useFrames			=	p_useFrames;
+			transition			=	p_transition;
+			transitionParams	=	p_transitionParams;
+
+			// Other default information
+			properties		=	new Object();
+			isPaused		=	false;
+			timePaused		=	undefined;
+			isCaller		=	false;
+			updatesSkipped	=	0;
+			timesCalled		=	0;
+			skipUpdates		=	0;
+			hasStarted		=	false;
+		}
+
+
+		// ==================================================================================================================================
+		// OTHER functions ------------------------------------------------------------------------------------------------------------------
+	
+		/**
+		 * Clones this tweening and returns the new TweenListObj
+		 *
+		 * @param	omitEvents		Boolean			Whether or not events such as onStart (and its parameters) should be omitted
+		 * @return					TweenListObj	A copy of this object
+		 */
+		public function clone(omitEvents:Boolean):TweenListObj {
+			var nTween:TweenListObj = new TweenListObj(scope, timeStart, timeComplete, useFrames, transition, transitionParams);
+			nTween.properties = new Array();
+			for (var pName:String in properties) {
+				nTween.properties[pName] = properties[pName].clone();
+			}
+			nTween.skipUpdates = skipUpdates;
+			nTween.updatesSkipped = updatesSkipped;
+			if (!omitEvents) {
+				nTween.onStart = onStart;
+				nTween.onUpdate = onUpdate;
+				nTween.onComplete = onComplete;
+				nTween.onOverwrite = onOverwrite;
+				nTween.onError = onError;
+				nTween.onStartParams = onStartParams;
+				nTween.onUpdateParams = onUpdateParams;
+				nTween.onCompleteParams = onCompleteParams;
+				nTween.onOverwriteParams = onOverwriteParams;
+				nTween.onStartScope = onStartScope;
+				nTween.onUpdateScope = onUpdateScope;
+				nTween.onCompleteScope = onCompleteScope;
+				nTween.onOverwriteScope = onOverwriteScope;
+				nTween.onErrorScope = onErrorScope;
+			}
+			nTween.rounded = rounded;
+			nTween.isPaused = isPaused;
+			nTween.timePaused = timePaused;
+			nTween.isCaller = isCaller;
+			nTween.count = count;
+			nTween.timesCalled = timesCalled;
+			nTween.waitFrames = waitFrames;
+			nTween.hasStarted = hasStarted;
+
+			return nTween;
+		}
+
+		/**
+		 * Returns this object described as a String.
+		 *
+		 * @return					String		The description of this object.
+		 */
+		public function toString():String {
+			var returnStr:String = "\n[TweenListObj ";
+			returnStr += "scope:" + String(scope);
+			returnStr += ", properties:";
+			var isFirst:Boolean = true;
+			for (var i:String in properties) {
+				if (!isFirst) returnStr += ",";
+				returnStr += "[name:"+properties[i].name;
+				returnStr += ",valueStart:"+properties[i].valueStart;
+				returnStr += ",valueComplete:"+properties[i].valueComplete;
+				returnStr += "]";
+				isFirst = false;
+			}
+			returnStr += ", timeStart:" + String(timeStart);
+			returnStr += ", timeComplete:" + String(timeComplete);
+			returnStr += ", useFrames:" + String(useFrames);
+			returnStr += ", transition:" + String(transition);
+			returnStr += ", transitionParams:" + String(transitionParams);
+
+			if (skipUpdates)		returnStr += ", skipUpdates:"		+ String(skipUpdates);
+			if (updatesSkipped)		returnStr += ", updatesSkipped:"	+ String(updatesSkipped);
+
+			if (Boolean(onStart))			returnStr += ", onStart:"			+ String(onStart);
+			if (Boolean(onUpdate))			returnStr += ", onUpdate:"			+ String(onUpdate);
+			if (Boolean(onComplete))		returnStr += ", onComplete:"		+ String(onComplete);
+			if (Boolean(onOverwrite))		returnStr += ", onOverwrite:"		+ String(onOverwrite);
+			if (Boolean(onError))			returnStr += ", onError:"			+ String(onError);
+			
+			if (onStartParams)		returnStr += ", onStartParams:"		+ String(onStartParams);
+			if (onUpdateParams)		returnStr += ", onUpdateParams:"	+ String(onUpdateParams);
+			if (onCompleteParams)	returnStr += ", onCompleteParams:"	+ String(onCompleteParams);
+			if (onOverwriteParams)	returnStr += ", onOverwriteParams:" + String(onOverwriteParams);
+
+			if (onStartScope)		returnStr += ", onStartScope:"		+ String(onStartScope);
+			if (onUpdateScope)		returnStr += ", onUpdateScope:"		+ String(onUpdateScope);
+			if (onCompleteScope)	returnStr += ", onCompleteScope:"	+ String(onCompleteScope);
+			if (onOverwriteScope)	returnStr += ", onOverwriteScope:"	+ String(onOverwriteScope);
+			if (onErrorScope)		returnStr += ", onErrorScope:"		+ String(onErrorScope);
+
+			if (rounded)			returnStr += ", rounded:"			+ String(rounded);
+			if (isPaused)			returnStr += ", isPaused:"			+ String(isPaused);
+			if (timePaused)			returnStr += ", timePaused:"		+ String(timePaused);
+			if (isCaller)			returnStr += ", isCaller:"			+ String(isCaller);
+			if (count)				returnStr += ", count:"				+ String(count);
+			if (timesCalled)		returnStr += ", timesCalled:"		+ String(timesCalled);
+			if (waitFrames)			returnStr += ", waitFrames:"		+ String(waitFrames);
+			if (hasStarted)			returnStr += ", hasStarted:"		+ String(hasStarted);
+			
+			returnStr += "]\n";
+			return returnStr;
+		}
+		
+		/**
+		 * Checks if p_obj "inherits" properties from other objects, as set by the "base" property. Will create a new object, leaving others intact.
+		 * o_bj.base can be an object or an array of objects. Properties are collected from the first to the last element of the "base" filed, with higher
+		 * indexes overwritting smaller ones. Does not modify any of the passed objects, but makes a shallow copy of all properties.
+		 *
+		 * @param		p_obj		Object				Object that should be tweened: a movieclip, textfield, etc.. OR an array of objects
+		 * @return					Object				A new object with all properties from the p_obj and p_obj.base.
+		 */
+
+		public static function makePropertiesChain(p_obj : Object) : Object{
+			// Is this object inheriting properties from another object?
+			var baseObject : Object = p_obj.base;
+			if(baseObject){
+				// object inherits. Are we inheriting from an object or an array
+				var chainedObject : Object = {};
+				var chain : Object;
+				if (baseObject is Array){
+					// Inheritance chain is the base array
+					chain = [];
+					// make a shallow copy
+					for (var k : Number = 0 ; k< baseObject.length; k++) chain.push(baseObject[k]);
+				}else{
+					// Only one object to be added to the array
+					chain = [baseObject];
+				}
+				// add the final object to the array, so it's properties are added last
+				chain.push(p_obj);
+				var currChainObj : Object;
+				// Loops through each object adding it's property to the final object
+				var len : Number = chain.length;
+				for(var i : Number = 0; i < len ; i ++){
+					if(chain[i]["base"]){
+						// deal with recursion: watch the order! "parent" base must be concatenated first!
+						currChainObj = AuxFunctions.concatObjects( makePropertiesChain(chain[i]["base"] ), chain[i]);
+					}else{
+						currChainObj = chain[i] ;
+					}
+					chainedObject = AuxFunctions.concatObjects(chainedObject, currChainObj );
+				}
+				if( chainedObject["base"]){
+				    delete chainedObject["base"];
+				}
+				return chainedObject;
+			}else{
+				// No inheritance, just return the object it self
+				return p_obj;
+			}
+		}
+		
+
+	}
+	
+	
+
+	
+}

File diff suppressed because it is too large
+ 1132 - 0
src/class/caurina/transitions/Tweener.as


+ 471 - 0
src/class/caurina/transitions/properties/ColorShortcuts.as

@@ -0,0 +1,471 @@
+package caurina.transitions.properties {
+
+	/**
+	 * properties.ColorShortcuts
+	 * List of default special color properties (normal and splitter properties) for the Tweener class
+	 * The function names are strange/inverted because it makes for easier debugging (alphabetic order). They're only for internal use (on this class) anyways.
+	 *
+	 * @author		Zeh Fernando, Nate Chatellier, Arthur Debert
+	 * @version		1.0.0
+	 */
+
+	import flash.geom.ColorTransform;
+	import flash.filters.ColorMatrixFilter;
+
+	import caurina.transitions.Tweener;
+	import caurina.transitions.AuxFunctions;
+
+	public class ColorShortcuts {
+
+		// Sources:
+		// http://www.graficaobscura.com/matrix/index.html
+		// And mario Klingemann's ColorMatrix class as mentioned on the credits:
+		// http://www.quasimondo.com/archives/000565.php
+		
+		// Defines luminance using sRGB luminance
+		private static var LUMINANCE_R:Number = 0.212671;
+		private static var LUMINANCE_G:Number = 0.715160;
+		private static var LUMINANCE_B:Number = 0.072169;
+		
+		/**
+		 * There's no constructor.
+		 */
+		public function ColorShortcuts () {
+			trace ("This is an static class and should not be instantiated.")
+		}
+
+		/**
+		 * Registers all the special properties to the Tweener class, so the Tweener knows what to do with them.
+		 */
+		public static function init(): void {
+
+			// Normal properties
+			Tweener.registerSpecialProperty("_color_ra", _oldColor_property_get,	_oldColor_property_set,	["redMultiplier"]);
+			Tweener.registerSpecialProperty("_color_rb", _color_property_get,		_color_property_set,	["redOffset"]);
+			Tweener.registerSpecialProperty("_color_ga", _oldColor_property_get,	_oldColor_property_set,	["greenMultiplier"]);
+			Tweener.registerSpecialProperty("_color_gb", _color_property_get,		_color_property_set,	["greenOffset"]);
+			Tweener.registerSpecialProperty("_color_ba", _oldColor_property_get,	_oldColor_property_set,	["blueMultiplier"]);
+			Tweener.registerSpecialProperty("_color_bb", _color_property_get,		_color_property_set,	["blueOffset"]);
+			Tweener.registerSpecialProperty("_color_aa", _oldColor_property_get,	_oldColor_property_set,	["alphaMultiplier"]);
+			Tweener.registerSpecialProperty("_color_ab", _color_property_get,		_color_property_set,	["alphaOffset"]);
+
+			Tweener.registerSpecialProperty("_color_redMultiplier", 	_color_property_get, _color_property_set, ["redMultiplier"]);
+			Tweener.registerSpecialProperty("_color_redOffset",			_color_property_get, _color_property_set, ["redOffset"]);
+			Tweener.registerSpecialProperty("_color_greenMultiplier",	_color_property_get, _color_property_set, ["greenMultiplier"]);
+			Tweener.registerSpecialProperty("_color_greenOffset",		_color_property_get, _color_property_set, ["greenOffset"]);
+			Tweener.registerSpecialProperty("_color_blueMultiplier",	_color_property_get, _color_property_set, ["blueMultiplier"]);
+			Tweener.registerSpecialProperty("_color_blueOffset",		_color_property_get, _color_property_set, ["blueOffset"]);
+			Tweener.registerSpecialProperty("_color_alphaMultiplier",	_color_property_get, _color_property_set, ["alphaMultiplier"]);
+			Tweener.registerSpecialProperty("_color_alphaOffset",		_color_property_get, _color_property_set, ["alphaOffset"]);
+
+			// Normal splitter properties
+			Tweener.registerSpecialPropertySplitter("_color", _color_splitter);
+			Tweener.registerSpecialPropertySplitter("_colorTransform", _colorTransform_splitter);
+
+			// Color changes that depend on the ColorMatrixFilter
+			Tweener.registerSpecialProperty("_brightness",		_brightness_get,	_brightness_set, [false]);
+			Tweener.registerSpecialProperty("_tintBrightness",	_brightness_get,	_brightness_set, [true]);
+			Tweener.registerSpecialProperty("_contrast",		_contrast_get,		_contrast_set);
+			Tweener.registerSpecialProperty("_hue",				_hue_get,			_hue_set);
+			Tweener.registerSpecialProperty("_saturation",		_saturation_get,	_saturation_set, [false]);
+			Tweener.registerSpecialProperty("_dumbSaturation",	_saturation_get,	_saturation_set, [true]);
+
+		}
+
+
+		// ==================================================================================================================================
+		// PROPERTY GROUPING/SPLITTING functions --------------------------------------------------------------------------------------------
+
+		// ----------------------------------------------------------------------------------------------------------------------------------
+		// _color
+
+		/**
+		 * Splits the _color parameter into specific color variables
+		 *
+		 * @param		p_value				Number		The original _color value
+		 * @return							Array		An array containing the .name and .value of all new properties
+		 */
+		public static function _color_splitter (p_value:*, p_parameters:Array):Array {
+			var nArray:Array = new Array();
+			if (p_value == null) {
+				// No parameter passed, so just resets the color
+				nArray.push({name:"_color_redMultiplier",	value:1});
+				nArray.push({name:"_color_redOffset",		value:0});
+				nArray.push({name:"_color_greenMultiplier",	value:1});
+				nArray.push({name:"_color_greenOffset",		value:0});
+				nArray.push({name:"_color_blueMultiplier",	value:1});
+				nArray.push({name:"_color_blueOffset",		value:0});
+			} else {
+				// A color tinting is passed, so converts it to the object values
+				nArray.push({name:"_color_redMultiplier",	value:0});
+				nArray.push({name:"_color_redOffset",		value:AuxFunctions.numberToR(p_value)});
+				nArray.push({name:"_color_greenMultiplier",	value:0});
+				nArray.push({name:"_color_greenOffset",		value:AuxFunctions.numberToG(p_value)});
+				nArray.push({name:"_color_blueMultiplier",	value:0});
+				nArray.push({name:"_color_blueOffset",		value:AuxFunctions.numberToB(p_value)});
+			}
+			return nArray;
+		}
+
+
+		// ----------------------------------------------------------------------------------------------------------------------------------
+		// _colorTransform
+
+		/**
+		 * Splits the _colorTransform parameter into specific color variables
+		 *
+		 * @param		p_value				Number		The original _colorTransform value
+		 * @return							Array		An array containing the .name and .value of all new properties
+		 */
+		public static function _colorTransform_splitter (p_value:Object, p_parameters:Array):Array {
+			var nArray:Array = new Array();
+			if (p_value == null) {
+				// No parameter passed, so just resets the color
+				nArray.push({name:"_color_redMultiplier",	value:1});
+				nArray.push({name:"_color_redOffset",		value:0});
+				nArray.push({name:"_color_greenMultiplier",	value:1});
+				nArray.push({name:"_color_greenOffset",		value:0});
+				nArray.push({name:"_color_blueMultiplier",	value:1});
+				nArray.push({name:"_color_blueOffset",		value:0});
+			} else {
+				// A color transformation object is passed, so converts it to the object values
+				nArray.push({name:"_color_redMultiplier",	value:p_value.redMultiplier});
+				nArray.push({name:"_color_redOffset", 		value:p_value.redOffset});
+				nArray.push({name:"_color_blueMultiplier",	value:p_value.blueMultiplier});
+				nArray.push({name:"_color_blueOffset",		value:p_value.blueOffset});
+				nArray.push({name:"_color_greenMultiplier",	value:p_value.greenMultiplier});
+				nArray.push({name:"_color_greenOffset",		value:p_value.greenOffset});
+				nArray.push({name:"_color_alphaMultiplier",	value:p_value.alphaMultiplier});
+				nArray.push({name:"_color_alphaOffset",		value:p_value.alphaOffset});
+			}
+			return nArray;
+		}
+
+
+		// ==================================================================================================================================
+		// NORMAL SPECIAL PROPERTY functions ------------------------------------------------------------------------------------------------
+
+		// ----------------------------------------------------------------------------------------------------------------------------------
+		// _color_*
+
+		/**
+		 * _color_*
+		 * Generic function for the ra/rb/etc components of the deprecated colorTransform object
+		 */
+		public static function _oldColor_property_get (p_obj:Object, p_parameters:Array, p_extra:Object = null):Number {
+			return p_obj.transform.colorTransform[p_parameters[0]] * 100;
+		}
+		public static function _oldColor_property_set (p_obj:Object, p_value:Number, p_parameters:Array, p_extra:Object = null): void {
+			var tf:ColorTransform = p_obj.transform.colorTransform;
+			tf[p_parameters[0]] = p_value / 100;
+			p_obj.transform.colorTransform = tf;
+		}
+
+		/**
+		 * _color_*
+		 * Generic function for the redMultiplier/redOffset/etc components of the new colorTransform
+		 */
+		public static function _color_property_get (p_obj:Object, p_parameters:Array, p_extra:Object = null):Number {
+			return p_obj.transform.colorTransform[p_parameters[0]];
+		}
+		public static function _color_property_set (p_obj:Object, p_value:Number, p_parameters:Array, p_extra:Object = null): void {
+			var cfm:ColorTransform = p_obj.transform.colorTransform;
+			cfm[p_parameters[0]] = p_value;
+			p_obj.transform.colorTransform = cfm;
+		}
+
+		// ----------------------------------------------------------------------------------------------------------------------------------
+		// Special coloring
+
+		/**
+		 * _brightness
+		 * Brightness of an object: -1 -> [0] -> +1
+		 */
+		public static function _brightness_get (p_obj:Object, p_parameters:Array, p_extra:Object = null):Number {
+
+			var isTint:Boolean = p_parameters[0];
+
+			/*
+			// Using ColorMatrix:
+			
+			var mtx:Array = getObjectMatrix(p_obj);
+			
+			var mc:Number = 1 - ((mtx[0] + mtx[6] + mtx[12]) / 3); // Brightness as determined by the main channels
+			var co:Number = (mtx[4] + mtx[9] + mtx[14]) / 3; // Brightness as determined by the offset channels
+			*/
+
+			var cfm:ColorTransform = p_obj.transform.colorTransform;
+			var mc:Number = 1 - ((cfm.redMultiplier + cfm.greenMultiplier + cfm.blueMultiplier) / 3); // Brightness as determined by the main channels
+			var co:Number = (cfm.redOffset + cfm.greenOffset + cfm.blueOffset) / 3;
+
+			if (isTint) {
+				// Tint style
+				//return (mc+(co/255))/2;
+				return co > 0 ? co / 255 : -mc;
+			} else {
+				// Native, Flash "Adjust Color" and Photoshop style
+				return co / 100;
+			}
+		}
+		public static function _brightness_set (p_obj:Object, p_value:Number, p_parameters:Array, p_extra:Object = null): void {
+			//var mtx:Array = getObjectMatrix(p_obj);
+
+			var isTint:Boolean = p_parameters[0];
+
+			var mc:Number; // Main channel
+			var co:Number; // Channel offset
+
+			if (isTint) {
+				// Tint style
+				mc = 1 - Math.abs(p_value);
+				co = p_value > 0 ? Math.round(p_value*255) : 0;
+			} else {
+				// Native, Flash "Adjust Color" and Photoshop style
+				mc = 1;
+				co = Math.round(p_value*100);
+			}
+
+			/*
+			// Using ColorMatrix:
+			var mtx:Array = [
+				mc, cc, cc, cc, co,
+				cc, mc, cc, cc, co,
+				cc, cc, mc, cc, co,
+				0,  0,  0,  1,  0
+			];
+			setObjectMatrix(p_obj, mtx);
+			*/
+			var cfm:ColorTransform = new ColorTransform(mc, mc, mc, 1, co, co, co, 0);
+			p_obj.transform.colorTransform = cfm;
+		}
+
+		/**
+		 * _saturation
+		 * Saturation of an object: 0 -> [1] -> 2
+		 */
+		public static function _saturation_get (p_obj:Object, p_parameters:Array, p_extra:Object = null):Number {
+
+			var mtx:Array = getObjectMatrix(p_obj);
+
+			var isDumb:Boolean = p_parameters[0];
+			var rl:Number = isDumb ? 1/3 : LUMINANCE_R;
+			var gl:Number = isDumb ? 1/3 : LUMINANCE_G;
+			var bl:Number = isDumb ? 1/3 : LUMINANCE_B;
+
+			var mc:Number = ((mtx[0]-rl)/(1-rl) + (mtx[6]-gl)/(1-gl) + (mtx[12]-bl)/(1-bl)) / 3;					// Color saturation as determined by the main channels
+			var cc:Number = 1 - ((mtx[1]/gl + mtx[2]/bl + mtx[5]/rl + mtx[7]/bl + mtx[10]/rl + mtx[11]/gl) / 6);	// Color saturation as determined by the other channels
+			return (mc + cc) / 2;
+		}
+		public static function _saturation_set (p_obj:Object, p_value:Number, p_parameters:Array, p_extra:Object = null): void {
+			
+			var isDumb:Boolean = p_parameters[0];
+			var rl:Number = isDumb ? 1/3 : LUMINANCE_R;
+			var gl:Number = isDumb ? 1/3 : LUMINANCE_G;
+			var bl:Number = isDumb ? 1/3 : LUMINANCE_B;
+
+			var sf:Number = p_value;
+			var nf:Number = 1-sf;
+			var nr:Number = rl * nf;
+			var ng:Number = gl * nf;
+			var nb:Number = bl * nf;
+
+			var mtx:Array = [
+				nr+sf,	ng,		nb,		0,	0,
+				nr,		ng+sf,	nb,		0,	0,
+				nr,		ng,		nb+sf,	0,	0,
+				0,  	0, 		0,  	1,  0
+			];
+			setObjectMatrix(p_obj, mtx);
+		}
+
+		/**
+		 * _contrast
+		 * Contrast of an object: -1 -> [0] -> +1
+		 */
+		public static function _contrast_get (p_obj:Object, p_parameters:Array, p_extra:Object = null):Number {
+
+			/*
+			// Using ColorMatrix:
+			var mtx:Array = getObjectMatrix(p_obj);
+
+			var mc:Number = ((mtx[0] + mtx[6] + mtx[12]) / 3) - 1;		// Contrast as determined by the main channels
+			var co:Number = (mtx[4] + mtx[9] + mtx[14]) / 3 / -128;		// Contrast as determined by the offset channel
+			*/
+			var cfm:ColorTransform = p_obj.transform.colorTransform;
+			var mc:Number;	// Contrast as determined by the main channels
+			var co:Number;	// Contrast as determined by the offset channel
+			mc = ((cfm.redMultiplier + cfm.greenMultiplier + cfm.blueMultiplier) / 3) - 1;
+			co = (cfm.redOffset + cfm.greenOffset + cfm.blueOffset) / 3 / -128;
+			/*
+			if (cfm.ra < 100) {
+				// Low contrast
+				mc = ((cfm.ra + cfm.ga + cfm.ba) / 300) - 1;
+				co = (cfm.rb + cfm.gb + cfm.bb) / 3 / -128;
+			} else {
+				// High contrast
+				mc = (((cfm.ra + cfm.ga + cfm.ba) / 300) - 1) / 37;
+				co = (cfm.rb + cfm.gb + cfm.bb) / 3 / -3840;
+			}
+			*/
+
+			return (mc+co)/2;
+		}
+		public static function _contrast_set (p_obj:Object, p_value:Number, p_parameters:Array, p_extra:Object = null): void {
+			
+			var mc:Number;	// Main channel
+			var co:Number;	// Channel offset
+			mc = p_value + 1;
+			co = Math.round(p_value*-128);
+
+			/*
+			if (p_value < 0) {
+				// Low contrast
+				mc = p_value + 1;
+				co = Math.round(p_value*-128);
+			} else {
+				// High contrast
+				mc = (p_value * 37) + 1;
+				co = Math.round(p_value*-3840);
+			}
+			*/
+			
+			// Flash: * 8, * -512
+
+			/*
+			// Using ColorMatrix:
+			var mtx:Array = [
+				mc,	0,	0, 	0, co,
+				0,	mc,	0, 	0, co,
+				0,	0,	mc,	0, co,
+				0,  0, 	0, 	1,  0
+			];
+			setObjectMatrix(p_obj, mtx);
+			*/
+			var cfm:ColorTransform = new ColorTransform(mc, mc, mc, 1, co, co, co, 0);
+			p_obj.transform.colorTransform = cfm;
+		}
+
+		/**
+		 * _hue
+		 * Hue of an object: -180 -> [0] -> 180
+		 */
+		public static function _hue_get (p_obj:Object, p_parameters:Array, p_extra:Object = null):Number {
+
+			var mtx:Array = getObjectMatrix(p_obj);
+
+			// Find the current Hue based on a given matrix.
+			// This is a kind of a brute force method by sucessive division until a close enough angle is found.
+			// Reverse-engineering the hue equation would be is a better choice, but it's hard to find material
+			// on the correct calculation employed by Flash.
+			// This code has to run only once (before the tween starts), so it's good enough.
+
+			var hues:Array = [];
+			var i:Number;
+
+			hues[0] = {angle:-179.9, matrix:getHueMatrix(-179.9)};
+			hues[1] = {angle:180, matrix:getHueMatrix(180)};
+		
+			for (i = 0; i < hues.length; i++) {
+				hues[i].distance = getHueDistance(mtx, hues[i].matrix);
+			}
+
+			var maxTries:Number = 15;	// Number o maximum divisions until the hue is found
+			var angleToSplit:Number;
+
+			for (i = 0; i < maxTries; i++) {
+				// Find the nearest angle
+				if (hues[0].distance < hues[1].distance) {
+					// First is closer
+					angleToSplit = 1;
+				} else {
+					// Second is closer
+					angleToSplit = 0;
+				}
+				hues[angleToSplit].angle = (hues[0].angle + hues[1].angle)/2;
+				hues[angleToSplit].matrix = getHueMatrix(hues[angleToSplit].angle)
+				hues[angleToSplit].distance = getHueDistance(mtx, hues[angleToSplit].matrix);
+			}
+
+			return hues[angleToSplit].angle;
+		}
+
+		public static function _hue_set (p_obj:Object, p_value:Number, p_parameters:Array, p_extra:Object = null): void {
+			setObjectMatrix(p_obj, getHueMatrix(p_value));
+		}
+
+		public static function getHueDistance (mtx1:Array, mtx2:Array): Number {
+			return (Math.abs(mtx1[0] - mtx2[0]) + Math.abs(mtx1[1] - mtx2[1]) + Math.abs(mtx1[2] - mtx2[2]));
+		}
+
+		public static function getHueMatrix (hue:Number): Array {
+			var ha:Number = hue * Math.PI/180;		// Hue angle, to radians
+
+			var rl:Number = LUMINANCE_R;
+			var gl:Number = LUMINANCE_G;
+			var bl:Number = LUMINANCE_B;
+
+			var c:Number = Math.cos(ha);
+			var s:Number = Math.sin(ha);
+
+			var mtx:Array = [
+				(rl + (c * (1 - rl))) + (s * (-rl)),
+				(gl + (c * (-gl))) + (s * (-gl)),
+				(bl + (c * (-bl))) + (s * (1 - bl)),
+				0, 0,
+
+				(rl + (c * (-rl))) + (s * 0.143),
+				(gl + (c * (1 - gl))) + (s * 0.14),
+				(bl + (c * (-bl))) + (s * -0.283),
+				0, 0,
+
+				(rl + (c * (-rl))) + (s * (-(1 - rl))),
+				(gl + (c * (-gl))) + (s * gl),
+				(bl + (c * (1 - bl))) + (s * bl),
+				0, 0,
+
+				0, 0, 0, 1, 0
+			];
+			
+			return mtx;
+		}
+
+
+		// ==================================================================================================================================
+		// AUXILIARY functions --------------------------------------------------------------------------------------------------------------
+
+		private static function getObjectMatrix(p_obj:Object): Array {
+			// Get the current color matrix of an object
+			for (var i:Number = 0; i < p_obj.filters.length; i++) {
+				if (p_obj.filters[i] is ColorMatrixFilter) {
+					return p_obj.filters[i].matrix.concat();
+				}
+			}
+			return [
+				1, 0, 0, 0, 0,
+				0, 1, 0, 0, 0,
+				0, 0, 1, 0, 0,
+				0, 0, 0, 1, 0
+			];
+		}
+
+		private static function setObjectMatrix(p_obj:Object, p_matrix:Array): void {
+			// Set the current color matrix of an object
+			var objFilters:Array = p_obj.filters.concat();
+			var found:Boolean = false;
+			for (var i:Number = 0; i < objFilters.length; i++) {
+				if (objFilters[i] is ColorMatrixFilter) {
+					objFilters[i].matrix = p_matrix.concat();
+					found = true;
+				}
+			}
+			if (!found) {
+				// Has to create a new color matrix filter
+				var cmtx:ColorMatrixFilter = new ColorMatrixFilter(p_matrix);
+				objFilters[objFilters.length] = cmtx;
+			}
+			p_obj.filters = objFilters;
+		}
+
+	}
+
+}

+ 109 - 0
src/class/caurina/transitions/properties/CurveModifiers.as

@@ -0,0 +1,109 @@
+package caurina.transitions.properties {
+
+	/**
+	 * properties.CurveModifiers
+	 * List of default special properties modifiers for the Tweener class
+	 * The function names are strange/inverted because it makes for easier debugging (alphabetic order). They're only for internal use (on this class) anyways.
+	 *
+	 * @author		Zeh Fernando, Nate Chatellier, Arthur Debert
+	 * @version		1.0.0
+	 */
+
+	import caurina.transitions.Tweener;
+
+	public class CurveModifiers {
+
+		/**
+		 * There's no constructor.
+		 */
+		public function CurveModifiers () {
+			trace ("This is an static class and should not be instantiated.")
+		}
+
+		/**
+		 * Registers all the special properties to the Tweener class, so the Tweener knows what to do with them.
+		 */
+		public static function init(): void {
+
+			// Bezier modifiers
+			Tweener.registerSpecialPropertyModifier("_bezier", _bezier_modifier, _bezier_get);
+		}
+
+
+		// ==================================================================================================================================
+		// SPECIAL PROPERTY MODIFIER functions ----------------------------------------------------------------------------------------------
+
+		// ----------------------------------------------------------------------------------------------------------------------------------
+		// _bezier
+
+		/**
+		 * Given the parameter object passed to this special property, return an array listing the properties that should be modified, and their parameters
+		 *
+		 * @param		p_obj				Object		Parameter passed to this property
+		 * @return							Array		Array listing name and parameter of each property
+		 */
+		public static function _bezier_modifier (p_obj:*):Array {
+			var mList:Array = []; // List of properties to be modified
+			var pList:Array; // List of parameters passed, normalized as an array
+			if (p_obj is Array) {
+				// Complex
+				pList = p_obj;
+			} else {
+				pList = [p_obj];
+			}
+
+			var i:uint;
+			var istr:String;
+			var mListObj:Object = {}; // Object describing each property name and parameter
+
+			for (i = 0; i < pList.length; i++) {
+				for (istr in pList[i]) {
+					if (mListObj[istr] == undefined) mListObj[istr] = [];
+					mListObj[istr].push(pList[i][istr]);
+				}
+			}
+			for (istr in mListObj) {
+				mList.push({name:istr, parameters:mListObj[istr]});
+			}
+			return mList;
+		}
+
+		/**
+		 * Given tweening specifications (beging, end, t), applies the property parameter to it, returning new t
+		 *
+		 * @param		b					Number		Beginning value of the property
+		 * @param		e					Number		Ending (desired) value of the property
+		 * @param		t					Number		Current t of this tweening (0-1), after applying the easing equation
+		 * @param		p					Array		Array of parameters passed to this specific property
+		 * @return							Number		New t, with the p parameters applied to it
+		 */
+		public static function _bezier_get (b:Number, e:Number, t:Number, p:Array):Number {
+			// This is based on Robert Penner's code
+			if (p.length == 1) {
+				// Simple curve with just one bezier control point
+				return b + t*(2*(1-t)*(p[0]-b) + t*(e - b));
+			} else {
+				// Array of bezier control points, must find the point between each pair of bezier points
+				var ip:uint = Math.floor(t * p.length); // Position on the bezier list
+				var it:Number = (t - (ip * (1 / p.length))) * p.length; // t inside this ip
+				var p1:Number, p2:Number;
+				if (ip == 0) {
+					// First part: belongs to the first control point, find second midpoint
+					p1 = b;
+					p2 = (p[0]+p[1])/2;
+				} else if (ip == p.length - 1) {
+					// Last part: belongs to the last control point, find first midpoint
+					p1 = (p[ip-1]+p[ip])/2;
+					p2 = e;
+				} else {
+					// Any middle part: find both midpoints
+					p1 = (p[ip-1]+p[ip])/2;
+					p2 = (p[ip]+p[ip+1])/2;
+				}
+				return p1+it*(2*(1-it)*(p[ip]-p1) + it*(p2 - p1));
+			}
+		}
+
+	}
+
+}

+ 161 - 0
src/class/caurina/transitions/properties/DisplayShortcuts.as

@@ -0,0 +1,161 @@
+package caurina.transitions.properties {
+
+	/**
+	 * properties.DisplayShortcuts.as
+	 * List of default special MovieClip properties (normal and splitter properties) for the Tweener class
+	 * The function names are strange/inverted because it makes for easier debugging (alphabetic order). They're only for internal use (on this class) anyways.
+	 *
+	 * @author		Zeh Fernando, Nate Chatellier, Arthur Debert
+	 * @version		1.0.0
+	 */
+
+	import flash.geom.Point;
+	import flash.geom.Rectangle;
+
+	import caurina.transitions.Tweener;
+
+	public class DisplayShortcuts {
+
+		/**
+		 * There's no constructor.
+		 */
+		public function DisplayShortcuts () {
+			trace ("This is an static class and should not be instantiated.")
+		}
+
+		/**
+		 * Registers all the special properties to the Tweener class, so the Tweener knows what to do with them.
+		 */
+		public static function init(): void {
+
+			// Normal properties
+			Tweener.registerSpecialProperty("_frame", _frame_get, _frame_set);
+			Tweener.registerSpecialProperty("_autoAlpha", _autoAlpha_get, _autoAlpha_set);
+
+			// Scale splitter properties
+			Tweener.registerSpecialPropertySplitter("_scale", _scale_splitter);
+
+			// scrollRect splitter properties
+			Tweener.registerSpecialPropertySplitter("_scrollRect", _scrollRect_splitter);
+			
+			// scrollrect normal properties
+			Tweener.registerSpecialProperty("_scrollRect_x",		_scrollRect_property_get, _scrollRect_property_set, ["x"]);
+			Tweener.registerSpecialProperty("_scrollRect_y",		_scrollRect_property_get, _scrollRect_property_set, ["y"]);
+			Tweener.registerSpecialProperty("_scrollRect_left",		_scrollRect_property_get, _scrollRect_property_set, ["left"]);
+			Tweener.registerSpecialProperty("_scrollRect_right",	_scrollRect_property_get, _scrollRect_property_set, ["right"]);
+			Tweener.registerSpecialProperty("_scrollRect_top",		_scrollRect_property_get, _scrollRect_property_set, ["top"]);
+			Tweener.registerSpecialProperty("_scrollRect_bottom",	_scrollRect_property_get, _scrollRect_property_set, ["bottom"]);
+			Tweener.registerSpecialProperty("_scrollRect_width",	_scrollRect_property_get, _scrollRect_property_set, ["width"]);
+			Tweener.registerSpecialProperty("_scrollRect_height",	_scrollRect_property_get, _scrollRect_property_set, ["height"]);
+
+		}
+
+
+		// ==================================================================================================================================
+		// PROPERTY GROUPING/SPLITTING functions --------------------------------------------------------------------------------------------
+
+		// ----------------------------------------------------------------------------------------------------------------------------------
+		// scale
+		public static function _scale_splitter(p_value:Number, p_parameters:Array) : Array{
+			var nArray:Array = new Array();
+			nArray.push({name:"scaleX", value: p_value});
+			nArray.push({name:"scaleY", value: p_value});
+			return nArray;
+		}
+
+		// ----------------------------------------------------------------------------------------------------------------------------------
+		// _scrollRect
+
+		/**
+		 * Splits the _scrollRect parameter into specific scrollRect variables
+		 *
+		 * @param		p_value				Rectangle	The original _scrollRect rectangle
+		 * @return							Array		An array containing the .name and .value of all new properties
+		 */
+		public static function _scrollRect_splitter (p_value:Rectangle, p_parameters:Array, p_extra:Object = null):Array {
+			var nArray:Array = new Array();
+			if (p_value == null) {
+				// No parameter passed, so try any rectangle :/
+				nArray.push({name:"_scrollRect_x", value:0});
+				nArray.push({name:"_scrollRect_y", value:0});
+				nArray.push({name:"_scrollRect_width", value:100});
+				nArray.push({name:"_scrollRect_height", value:100});
+			} else {
+				// A rectangle is passed, so just return the properties
+				nArray.push({name:"_scrollRect_x", value:p_value.x});
+				nArray.push({name:"_scrollRect_y", value:p_value.y});
+				nArray.push({name:"_scrollRect_width", value:p_value.width});
+				nArray.push({name:"_scrollRect_height", value:p_value.height});
+			}
+			return nArray;
+		}
+
+
+		// ==================================================================================================================================
+		// NORMAL SPECIAL PROPERTY functions ------------------------------------------------------------------------------------------------
+
+		// ----------------------------------------------------------------------------------------------------------------------------------
+		// _frame
+
+		/**
+		 * Returns the current frame number from the movieclip timeline
+		 *
+		 * @param		p_obj				Object		MovieClip object
+		 * @return							Number		The current frame
+		 */
+		public static function _frame_get (p_obj:Object, p_parameters:Array, p_extra:Object = null):Number {
+			return p_obj.currentFrame;
+		}
+
+		/**
+		 * Sets the timeline frame
+		 *
+		 * @param		p_obj				Object		MovieClip object
+		 * @param		p_value				Number		New frame number
+		 */
+		public static function _frame_set (p_obj:Object, p_value:Number, p_parameters:Array, p_extra:Object = null): void {
+			p_obj.gotoAndStop(Math.round(p_value));
+		}
+
+		
+		// ----------------------------------------------------------------------------------------------------------------------------------
+		// _autoAlpha
+
+		/**
+		 * Returns the current alpha
+		 *
+		 * @param		p_obj				Object		MovieClip or Textfield object
+		 * @return							Number		The current alpha
+		 */
+		public static function _autoAlpha_get (p_obj:Object, p_parameters:Array, p_extra:Object = null):Number {
+			return p_obj.alpha;
+		}
+
+		/**
+		 * Sets the current autoAlpha
+		 *
+		 * @param		p_obj				Object		MovieClip or Textfield object
+		 * @param		p_value				Number		New alpha
+		 */
+		public static function _autoAlpha_set (p_obj:Object, p_value:Number, p_parameters:Array, p_extra:Object = null): void {
+			p_obj.alpha = p_value;
+			p_obj.visible = p_value > 0;
+		}
+
+		// ----------------------------------------------------------------------------------------------------------------------------------
+		// _scrollRect_*
+
+		/**
+		 * _scrollRect_*
+		 * Generic function for the properties of the scrollRect object
+		 */
+		public static function _scrollRect_property_get (p_obj:Object, p_parameters:Array, p_extra:Object = null):Number {
+			return p_obj.scrollRect[p_parameters[0]];
+		}
+		public static function _scrollRect_property_set (p_obj:Object, p_value:Number, p_parameters:Array, p_extra:Object = null): void {
+			var rect:Rectangle = p_obj.scrollRect;
+			rect[p_parameters[0]] = Math.round(p_value);
+			p_obj.scrollRect = rect;
+		}
+	}
+}

+ 520 - 0
src/class/caurina/transitions/properties/FilterShortcuts.as

@@ -0,0 +1,520 @@
+package caurina.transitions.properties {
+
+	/**
+	 * properties.FilterShortcuts
+	 * Special properties for the Tweener class to handle MovieClip filters
+	 * The function names are strange/inverted because it makes for easier debugging (alphabetic order). They're only for internal use (on this class) anyways.
+	 *
+	 * @author		Zeh Fernando, Nate Chatellier, Arthur Debert
+	 * @version		1.0.0
+	 */
+
+	import flash.display.BitmapData;
+	import flash.filters.BevelFilter;
+	import flash.filters.BitmapFilter;
+	import flash.filters.BlurFilter;
+	import flash.filters.ColorMatrixFilter;
+	import flash.filters.ConvolutionFilter;
+	import flash.filters.DisplacementMapFilter;
+	import flash.filters.DropShadowFilter;
+	import flash.filters.GlowFilter;
+	import flash.filters.GradientBevelFilter;
+	import flash.filters.GradientGlowFilter;
+	import flash.geom.Point;
+
+	import caurina.transitions.Tweener;
+	import caurina.transitions.AuxFunctions;
+
+	public class FilterShortcuts {
+
+		/**
+		 * There's no constructor.
+		 */
+		public function FilterShortcuts () {
+			trace ("This is an static class and should not be instantiated.")
+		}
+
+		/**
+		 * Registers all the special properties to the Tweener class, so the Tweener knows what to do with them.
+		 */
+		public static function init(): void {
+
+			// Filter tweening splitter properties
+			Tweener.registerSpecialPropertySplitter("_filter", _filter_splitter);
+
+			// Shortcuts - BevelFilter
+			// http://livedocs.adobe.com/flex/2/langref/flash/filters/BevelFilter.html
+			Tweener.registerSpecialProperty("_Bevel_angle",				_filter_property_get,	_filter_property_set,	[BevelFilter, "angle"]);
+			Tweener.registerSpecialProperty("_Bevel_blurX",				_filter_property_get,	_filter_property_set,	[BevelFilter, "blurX"]);
+			Tweener.registerSpecialProperty("_Bevel_blurY",				_filter_property_get,	_filter_property_set,	[BevelFilter, "blurY"]);
+			Tweener.registerSpecialProperty("_Bevel_distance",			_filter_property_get,	_filter_property_set,	[BevelFilter, "distance"]);
+			Tweener.registerSpecialProperty("_Bevel_highlightAlpha",	_filter_property_get,	_filter_property_set,	[BevelFilter, "highlightAlpha"]);
+			Tweener.registerSpecialPropertySplitter("_Bevel_highlightColor",		_generic_color_splitter, ["_Bevel_highlightColor_r", "_Bevel_highlightColor_g", "_Bevel_highlightColor_b"]);
+			Tweener.registerSpecialProperty("_Bevel_highlightColor_r",	_filter_property_get,	_filter_property_set,	[BevelFilter, "highlightColor", "color", "r"]);
+			Tweener.registerSpecialProperty("_Bevel_highlightColor_g",	_filter_property_get,	_filter_property_set,	[BevelFilter, "highlightColor", "color", "g"]);
+			Tweener.registerSpecialProperty("_Bevel_highlightColor_b",	_filter_property_get,	_filter_property_set,	[BevelFilter, "highlightColor", "color", "b"]);
+			Tweener.registerSpecialProperty("_Bevel_knockout",			_filter_property_get,	_filter_property_set,	[BevelFilter, "knockout"]);
+			Tweener.registerSpecialProperty("_Bevel_quality",			_filter_property_get,	_filter_property_set,	[BevelFilter, "quality"]);
+			Tweener.registerSpecialProperty("_Bevel_shadowAlpha",		_filter_property_get,	_filter_property_set,	[BevelFilter, "shadowAlpha"]);
+			Tweener.registerSpecialPropertySplitter("_Bevel_shadowColor",		_generic_color_splitter, ["_Bevel_shadowColor_r", "_Bevel_shadowColor_g", "_Bevel_shadowColor_b"]);
+			Tweener.registerSpecialProperty("_Bevel_shadowColor_r",		_filter_property_get,	_filter_property_set,	[BevelFilter, "shadowColor", "color", "r"]);
+			Tweener.registerSpecialProperty("_Bevel_shadowColor_g",		_filter_property_get,	_filter_property_set,	[BevelFilter, "shadowColor", "color", "g"]);
+			Tweener.registerSpecialProperty("_Bevel_shadowColor_b",		_filter_property_get,	_filter_property_set,	[BevelFilter, "shadowColor", "color", "b"]);
+			Tweener.registerSpecialProperty("_Bevel_strength",			_filter_property_get,	_filter_property_set,	[BevelFilter, "strength"]);
+			Tweener.registerSpecialProperty("_Bevel_type",				_filter_property_get,	_filter_property_set,	[BevelFilter, "type"]);
+
+			// Shortcuts - BlurFilter
+			// http://livedocs.adobe.com/flex/2/langref/flash/filters/BlurFilter.html
+			Tweener.registerSpecialProperty("_Blur_blurX",				_filter_property_get,	_filter_property_set, [BlurFilter, "blurX"]);
+			Tweener.registerSpecialProperty("_Blur_blurY",				_filter_property_get,	_filter_property_set, [BlurFilter, "blurY"]);
+			Tweener.registerSpecialProperty("_Blur_quality",			_filter_property_get,	_filter_property_set, [BlurFilter, "quality"]);
+
+			// Shortcuts - ColorMatrixFilter
+			// http://livedocs.adobe.com/flex/2/langref/flash/filters/ColorMatrixFilter.html
+			Tweener.registerSpecialPropertySplitter("_ColorMatrix_matrix",	_generic_matrix_splitter, [[1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0],
+																										["_ColorMatrix_matrix_rr", "_ColorMatrix_matrix_rg", "_ColorMatrix_matrix_rb", "_ColorMatrix_matrix_ra", "_ColorMatrix_matrix_ro",
+																										"_ColorMatrix_matrix_gr", "_ColorMatrix_matrix_gg", "_ColorMatrix_matrix_gb", "_ColorMatrix_matrix_ga", "_ColorMatrix_matrix_go",
+																										"_ColorMatrix_matrix_br", "_ColorMatrix_matrix_bg", "_ColorMatrix_matrix_bb", "_ColorMatrix_matrix_ba", "_ColorMatrix_matrix_bo",
+																										"_ColorMatrix_matrix_ar", "_ColorMatrix_matrix_ag", "_ColorMatrix_matrix_ab", "_ColorMatrix_matrix_aa", "_ColorMatrix_matrix_ao"]]);
+			Tweener.registerSpecialProperty("_ColorMatrix_matrix_rr",	_filter_property_get,	_filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 0]);
+			Tweener.registerSpecialProperty("_ColorMatrix_matrix_rg",	_filter_property_get,	_filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 1]);
+			Tweener.registerSpecialProperty("_ColorMatrix_matrix_rb",	_filter_property_get,	_filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 2]);
+			Tweener.registerSpecialProperty("_ColorMatrix_matrix_ra",	_filter_property_get,	_filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 3]);
+			Tweener.registerSpecialProperty("_ColorMatrix_matrix_ro",	_filter_property_get,	_filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 4]);
+			Tweener.registerSpecialProperty("_ColorMatrix_matrix_gr",	_filter_property_get,	_filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 5]);
+			Tweener.registerSpecialProperty("_ColorMatrix_matrix_gg",	_filter_property_get,	_filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 6]);
+			Tweener.registerSpecialProperty("_ColorMatrix_matrix_gb",	_filter_property_get,	_filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 7]);
+			Tweener.registerSpecialProperty("_ColorMatrix_matrix_ga",	_filter_property_get,	_filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 8]);
+			Tweener.registerSpecialProperty("_ColorMatrix_matrix_go",	_filter_property_get,	_filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 9]);
+			Tweener.registerSpecialProperty("_ColorMatrix_matrix_br",	_filter_property_get,	_filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 10]);
+			Tweener.registerSpecialProperty("_ColorMatrix_matrix_bg",	_filter_property_get,	_filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 11]);
+			Tweener.registerSpecialProperty("_ColorMatrix_matrix_bb",	_filter_property_get,	_filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 12]);
+			Tweener.registerSpecialProperty("_ColorMatrix_matrix_ba",	_filter_property_get,	_filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 13]);
+			Tweener.registerSpecialProperty("_ColorMatrix_matrix_bo",	_filter_property_get,	_filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 14]);
+			Tweener.registerSpecialProperty("_ColorMatrix_matrix_ar",	_filter_property_get,	_filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 15]);
+			Tweener.registerSpecialProperty("_ColorMatrix_matrix_ag",	_filter_property_get,	_filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 16]);
+			Tweener.registerSpecialProperty("_ColorMatrix_matrix_ab",	_filter_property_get,	_filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 17]);
+			Tweener.registerSpecialProperty("_ColorMatrix_matrix_aa",	_filter_property_get,	_filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 18]);
+			Tweener.registerSpecialProperty("_ColorMatrix_matrix_ao",	_filter_property_get,	_filter_property_set, [ColorMatrixFilter, "matrix", "matrix", 19]);
+
+			// Shortcuts - ConvolutionFilter
+			// http://livedocs.adobe.com/flex/2/langref/flash/filters/ConvolutionFilter.html
+			Tweener.registerSpecialProperty("_Convolution_alpha",			_filter_property_get,	_filter_property_set,	[ConvolutionFilter, "alpha"]);
+			Tweener.registerSpecialProperty("_Convolution_bias",			_filter_property_get,	_filter_property_set,	[ConvolutionFilter, "bias"]);
+			Tweener.registerSpecialProperty("_Convolution_clamp",			_filter_property_get,	_filter_property_set,	[ConvolutionFilter, "clamp"]);
+			Tweener.registerSpecialPropertySplitter("_Convolution_color",	_generic_color_splitter, ["_Convolution_color_r", "_Convolution_color_g", "_Convolution_color_b"]);
+			Tweener.registerSpecialProperty("_Convolution_color_r",			_filter_property_get,	_filter_property_set,	[ConvolutionFilter, "color", "color", "r"]);
+			Tweener.registerSpecialProperty("_Convolution_color_g",			_filter_property_get,	_filter_property_set,	[ConvolutionFilter, "color", "color", "g"]);
+			Tweener.registerSpecialProperty("_Convolution_color_b",			_filter_property_get,	_filter_property_set,	[ConvolutionFilter, "color", "color", "b"]);
+			Tweener.registerSpecialProperty("_Convolution_divisor",			_filter_property_get,	_filter_property_set,	[ConvolutionFilter, "divisor"]);
+			//Tweener.registerSpecialPropertySplitter("_Convolution_matrix",	_generic_array_splitter, ["_Convolution_matrix_array"]);
+			//Tweener.registerSpecialProperty("_Convolution_matrix_array",	_filter_property_get,	_filter_property_set,	[ConvolutionFilter, "matrix", "array"]);
+			Tweener.registerSpecialProperty("_Convolution_matrixX",			_filter_property_get,	_filter_property_set,	[ConvolutionFilter, "matrixX"]);
+			Tweener.registerSpecialProperty("_Convolution_matrixY",			_filter_property_get,	_filter_property_set,	[ConvolutionFilter, "matrixY"]);
+			Tweener.registerSpecialProperty("_Convolution_preserveAlpha",	_filter_property_get,	_filter_property_set,	[ConvolutionFilter, "preserveAlpha"]);
+
+			// Shortcuts - DisplacementMapFilter
+			// http://livedocs.adobe.com/flex/2/langref/flash/filters/DisplacementMapFilter.html
+			Tweener.registerSpecialProperty("_DisplacementMap_alpha",			_filter_property_get,	_filter_property_set, [DisplacementMapFilter, "alpha"]);
+			Tweener.registerSpecialPropertySplitter("_DisplacementMap_color",	_generic_color_splitter, ["_DisplacementMap_color_r", "_DisplacementMap_color_r", "_DisplacementMap_color_r"]);
+			Tweener.registerSpecialProperty("_DisplacementMap_color_r",			_filter_property_get,	_filter_property_set, [DisplacementMapFilter, "color", "color", "r"]);
+			Tweener.registerSpecialProperty("_DisplacementMap_color_g",			_filter_property_get,	_filter_property_set, [DisplacementMapFilter, "color", "color", "g"]);
+			Tweener.registerSpecialProperty("_DisplacementMap_color_b",			_filter_property_get,	_filter_property_set, [DisplacementMapFilter, "color", "color", "b"]);
+			Tweener.registerSpecialProperty("_DisplacementMap_componentX",		_filter_property_get,	_filter_property_set, [DisplacementMapFilter, "componentX"]);
+			Tweener.registerSpecialProperty("_DisplacementMap_componentY",		_filter_property_get,	_filter_property_set, [DisplacementMapFilter, "componentY"]);
+			Tweener.registerSpecialProperty("_DisplacementMap_mapBitmap",		_filter_property_get,	_filter_property_set, [DisplacementMapFilter, "mapBitmap"]);
+			Tweener.registerSpecialPropertySplitter("_DisplacementMap_mapPoint",_generic_point_splitter, ["_DisplacementMap_mapPoint_x", "_DisplacementMap_mapPoint_y"]);
+			Tweener.registerSpecialProperty("_DisplacementMap_mapPoint_x",		_filter_property_get,	_filter_property_set, [DisplacementMapFilter, "mapPoint", "point", "x"]);
+			Tweener.registerSpecialProperty("_DisplacementMap_mapPoint_y",		_filter_property_get,	_filter_property_set, [DisplacementMapFilter, "mapPoint", "point", "y"]);
+			Tweener.registerSpecialProperty("_DisplacementMap_mode",			_filter_property_get,	_filter_property_set, [DisplacementMapFilter, "mode"]);
+			Tweener.registerSpecialProperty("_DisplacementMap_scaleX",			_filter_property_get,	_filter_property_set, [DisplacementMapFilter, "scaleX"]);
+			Tweener.registerSpecialProperty("_DisplacementMap_scaleY",			_filter_property_get,	_filter_property_set, [DisplacementMapFilter, "scaleY"]);
+
+			// Shortcuts - DropShadowFilter
+			// http://livedocs.adobe.com/flex/2/langref/flash/filters/DropShadowFilter.html
+			Tweener.registerSpecialProperty("_DropShadow_alpha",			_filter_property_get,	_filter_property_set, [DropShadowFilter, "alpha"]);
+			Tweener.registerSpecialProperty("_DropShadow_angle",			_filter_property_get,	_filter_property_set, [DropShadowFilter, "angle"]);
+			Tweener.registerSpecialProperty("_DropShadow_blurX",			_filter_property_get,	_filter_property_set, [DropShadowFilter, "blurX"]);
+			Tweener.registerSpecialProperty("_DropShadow_blurY",			_filter_property_get,	_filter_property_set, [DropShadowFilter, "blurY"]);
+			Tweener.registerSpecialPropertySplitter("_DropShadow_color",	_generic_color_splitter, ["_DropShadow_color_r", "_DropShadow_color_g", "_DropShadow_color_b"]);
+			Tweener.registerSpecialProperty("_DropShadow_color_r",			_filter_property_get,	_filter_property_set, [DropShadowFilter, "color", "color", "r"]);
+			Tweener.registerSpecialProperty("_DropShadow_color_g",			_filter_property_get,	_filter_property_set, [DropShadowFilter, "color", "color", "g"]);
+			Tweener.registerSpecialProperty("_DropShadow_color_b",			_filter_property_get,	_filter_property_set, [DropShadowFilter, "color", "color", "b"]);
+			Tweener.registerSpecialProperty("_DropShadow_distance",			_filter_property_get,	_filter_property_set, [DropShadowFilter, "distance"]);
+			Tweener.registerSpecialProperty("_DropShadow_hideObject",		_filter_property_get,	_filter_property_set, [DropShadowFilter, "hideObject"]);
+			Tweener.registerSpecialProperty("_DropShadow_inner",			_filter_property_get,	_filter_property_set, [DropShadowFilter, "inner"]);
+			Tweener.registerSpecialProperty("_DropShadow_knockout",			_filter_property_get,	_filter_property_set, [DropShadowFilter, "knockout"]);
+			Tweener.registerSpecialProperty("_DropShadow_quality",			_filter_property_get,	_filter_property_set, [DropShadowFilter, "quality"]);
+			Tweener.registerSpecialProperty("_DropShadow_strength",			_filter_property_get,	_filter_property_set, [DropShadowFilter, "strength"]);
+			
+			// Shortcuts - GlowFilter
+			// http://livedocs.adobe.com/flex/2/langref/flash/filters/GlowFilter.html
+			Tweener.registerSpecialProperty("_Glow_alpha",				_filter_property_get,	_filter_property_set, [GlowFilter, "alpha"]);
+			Tweener.registerSpecialProperty("_Glow_blurX",				_filter_property_get,	_filter_property_set, [GlowFilter, "blurX"]);
+			Tweener.registerSpecialProperty("_Glow_blurY",				_filter_property_get,	_filter_property_set, [GlowFilter, "blurY"]);
+			Tweener.registerSpecialPropertySplitter("_Glow_color",		_generic_color_splitter, ["_Glow_color_r", "_Glow_color_g", "_Glow_color_b"]);
+			Tweener.registerSpecialProperty("_Glow_color_r",			_filter_property_get,	_filter_property_set, [GlowFilter, "color", "color", "r"]);
+			Tweener.registerSpecialProperty("_Glow_color_g",			_filter_property_get,	_filter_property_set, [GlowFilter, "color", "color", "g"]);
+			Tweener.registerSpecialProperty("_Glow_color_b",			_filter_property_get,	_filter_property_set, [GlowFilter, "color", "color", "b"]);
+			Tweener.registerSpecialProperty("_Glow_inner",				_filter_property_get,	_filter_property_set, [GlowFilter, "inner"]);
+			Tweener.registerSpecialProperty("_Glow_knockout",			_filter_property_get,	_filter_property_set, [GlowFilter, "knockout"]);
+			Tweener.registerSpecialProperty("_Glow_quality",			_filter_property_get,	_filter_property_set, [GlowFilter, "quality"]);
+			Tweener.registerSpecialProperty("_Glow_strength",			_filter_property_get,	_filter_property_set, [GlowFilter, "strength"]);
+
+			// Shortcuts - GradientBevelFilter
+			// http://livedocs.adobe.com/flex/2/langref/flash/filters/GradientBevelFilter.html
+			// .alphas (array)
+			Tweener.registerSpecialProperty("_GradientBevel_angle",		_filter_property_get,	_filter_property_set, [GradientBevelFilter, "angle"]);
+			Tweener.registerSpecialProperty("_GradientBevel_blurX",		_filter_property_get,	_filter_property_set, [GradientBevelFilter, "blurX"]);
+			Tweener.registerSpecialProperty("_GradientBevel_blurY",		_filter_property_get,	_filter_property_set, [GradientBevelFilter, "blurY"]);
+			// .colors (array)
+			Tweener.registerSpecialProperty("_GradientBevel_distance",	_filter_property_get,	_filter_property_set, [GradientBevelFilter, "distance"]);
+			Tweener.registerSpecialProperty("_GradientBevel_quality",	_filter_property_get,	_filter_property_set, [GradientBevelFilter, "quality"]);
+			// .ratios(array)
+			Tweener.registerSpecialProperty("_GradientBevel_strength",	_filter_property_get,	_filter_property_set, [GradientBevelFilter, "strength"]);
+			Tweener.registerSpecialProperty("_GradientBevel_type",		_filter_property_get,	_filter_property_set, [GradientBevelFilter, "type"]);
+
+			// Shortcuts - GradientGlowFilter
+			// http://livedocs.adobe.com/flex/2/langref/flash/filters/GradientGlowFilter.html
+			// .alphas (array)
+			Tweener.registerSpecialProperty("_GradientGlow_angle",		_filter_property_get,	_filter_property_set, [GradientGlowFilter, "angle"]);
+			Tweener.registerSpecialProperty("_GradientGlow_blurX",		_filter_property_get,	_filter_property_set, [GradientGlowFilter, "blurX"]);
+			Tweener.registerSpecialProperty("_GradientGlow_blurY",		_filter_property_get,	_filter_property_set, [GradientGlowFilter, "blurY"]);
+			// .colors (array)
+			Tweener.registerSpecialProperty("_GradientGlow_distance",	_filter_property_get,	_filter_property_set, [GradientGlowFilter, "distance"]);
+			Tweener.registerSpecialProperty("_GradientGlow_knockout",	_filter_property_get,	_filter_property_set, [GradientGlowFilter, "knockout"]);
+			Tweener.registerSpecialProperty("_GradientGlow_quality",	_filter_property_get,	_filter_property_set, [GradientGlowFilter, "quality"]);
+			// .ratios (array)
+			Tweener.registerSpecialProperty("_GradientGlow_strength",	_filter_property_get,	_filter_property_set, [GradientGlowFilter, "strength"]);
+			Tweener.registerSpecialProperty("_GradientGlow_type",		_filter_property_get,	_filter_property_set, [GradientGlowFilter, "type"]);
+
+		}
+
+
+		// ==================================================================================================================================
+		// PROPERTY GROUPING/SPLITTING functions --------------------------------------------------------------------------------------------
+
+		// ----------------------------------------------------------------------------------------------------------------------------------
+		// generic splitters
+
+		/**
+		 * A generic color splitter - from 0xrrggbb to r, g, b with the name of the parameters passed
+		 *
+		 * @param		p_value				Number		The original _color value
+		 * @return							Array		An array containing the .name and .value of all new properties
+		 */
+		public static function _generic_color_splitter (p_value:Number, p_parameters:Array):Array {
+			var nArray:Array = new Array();
+			nArray.push({name:p_parameters[0], value:AuxFunctions.numberToR(p_value)});
+			nArray.push({name:p_parameters[1], value:AuxFunctions.numberToG(p_value)});
+			nArray.push({name:p_parameters[2], value:AuxFunctions.numberToB(p_value)});
+			return nArray;
+		}
+
+		/**
+		 * A generic mapPoint splitter - from Point to x, y with the name of the parameters passed
+		 *
+		 * @param		p_value				Point		The original point
+		 * @return							Array		An array containing the .name and .value of all new properties
+		 */
+		public static function _generic_point_splitter (p_value:Point, p_parameters:Array):Array {
+			var nArray:Array = new Array();
+			nArray.push({name:p_parameters[0], value:p_value.x});
+			nArray.push({name:p_parameters[1], value:p_value.y});
+			return nArray;
+		}
+
+		/**
+		 * A generic matrix splitter - from [] to items with the name of the parameters passed
+		 *
+		 * @param		p_value				Array		The original matrix
+		 * @return							Array		An array containing the .name and .value of all new properties
+		 */
+		public static function _generic_matrix_splitter (p_value:Array, p_parameters:Array):Array {
+			if (p_value == null) p_value = p_parameters[0].concat();
+			var nArray:Array = new Array();
+			for (var i:Number = 0; i < p_value.length; i++) {
+				nArray.push({name:p_parameters[1][i], value:p_value[i]});
+			}
+			return nArray;
+		}
+
+		/**
+		 * A generic array splitter - from [] to items with the index passed back
+		 *
+		 * @param		p_value				Array		The original array value
+		 * @return							Array		An array containing the .name and .value of all new properties
+		 */
+		/*
+		public static function _generic_array_splitter (p_value:Array, p_parameters:Array):Array {
+			if (p_value == null) p_value = p_parameters[0].concat();
+			var nArray:Array = new Array();
+			for (var i:Number = 0; i < p_value.length; i++) {
+				nArray.push({name:p_parameters[1][i], value:p_value[i], arrayIndex:i});
+			}
+			return nArray;
+		}
+		*/
+
+		// ----------------------------------------------------------------------------------------------------------------------------------
+		// filters
+
+		/**
+		 * Splits the _filter, _blur, etc parameter into specific filter variables
+		 *
+		 * @param		p_value				BitmapFilter	A BitmapFilter instance
+		 * @return							Array			An array containing the .name and .value of all new properties
+		 */
+		public static function _filter_splitter (p_value:BitmapFilter, p_parameters:Array, p_extra:Object = null):Array {
+			var nArray:Array = new Array();
+			if (p_value is BevelFilter) {
+				nArray.push({name:"_Bevel_angle",					value:BevelFilter(p_value).angle});
+				nArray.push({name:"_Bevel_blurX",					value:BevelFilter(p_value).blurX});
+				nArray.push({name:"_Bevel_blurY",					value:BevelFilter(p_value).blurY});
+				nArray.push({name:"_Bevel_distance",				value:BevelFilter(p_value).distance});
+				nArray.push({name:"_Bevel_highlightAlpha",			value:BevelFilter(p_value).highlightAlpha});
+				nArray.push({name:"_Bevel_highlightColor",			value:BevelFilter(p_value).highlightColor});
+				nArray.push({name:"_Bevel_knockout",				value:BevelFilter(p_value).knockout});
+				nArray.push({name:"_Bevel_quality",					value:BevelFilter(p_value).quality});
+				nArray.push({name:"_Bevel_shadowAlpha",				value:BevelFilter(p_value).shadowAlpha});
+				nArray.push({name:"_Bevel_shadowColor",				value:BevelFilter(p_value).shadowColor});
+				nArray.push({name:"_Bevel_strength",				value:BevelFilter(p_value).strength});
+				nArray.push({name:"_Bevel_type",					value:BevelFilter(p_value).type});
+			} else if (p_value is BlurFilter) {
+				nArray.push({name:"_Blur_blurX",					value:BlurFilter(p_value).blurX});
+				nArray.push({name:"_Blur_blurY",					value:BlurFilter(p_value).blurY});
+				nArray.push({name:"_Blur_quality",					value:BlurFilter(p_value).quality});
+			} else if (p_value is ColorMatrixFilter) {
+				nArray.push({name:"_ColorMatrix_matrix",			value:ColorMatrixFilter(p_value).matrix});
+			} else if (p_value is ConvolutionFilter) {
+				nArray.push({name:"_Convolution_alpha",				value:ConvolutionFilter(p_value).alpha});
+				nArray.push({name:"_Convolution_bias",				value:ConvolutionFilter(p_value).bias});
+				nArray.push({name:"_Convolution_clamp",				value:ConvolutionFilter(p_value).clamp});
+				nArray.push({name:"_Convolution_color",				value:ConvolutionFilter(p_value).color});
+				// .matrix
+				nArray.push({name:"_Convolution_divisor",			value:ConvolutionFilter(p_value).divisor});
+				nArray.push({name:"_Convolution_matrixX",			value:ConvolutionFilter(p_value).matrixX});
+				nArray.push({name:"_Convolution_matrixY",			value:ConvolutionFilter(p_value).matrixY});
+				nArray.push({name:"_Convolution_preserveAlpha",		value:ConvolutionFilter(p_value).preserveAlpha});
+			} else if (p_value is DisplacementMapFilter) {
+				nArray.push({name:"_DisplacementMap_alpha",			value:DisplacementMapFilter(p_value).alpha});
+				nArray.push({name:"_DisplacementMap_color",			value:DisplacementMapFilter(p_value).color});
+				nArray.push({name:"_DisplacementMap_componentX",	value:DisplacementMapFilter(p_value).componentX});
+				nArray.push({name:"_DisplacementMap_componentY",	value:DisplacementMapFilter(p_value).componentY});
+				nArray.push({name:"_DisplacementMap_mapBitmap",		value:DisplacementMapFilter(p_value).mapBitmap});
+				nArray.push({name:"_DisplacementMap_mapPoint",		value:DisplacementMapFilter(p_value).mapPoint});
+				nArray.push({name:"_DisplacementMap_mode",			value:DisplacementMapFilter(p_value).mode});
+				nArray.push({name:"_DisplacementMap_scaleX",		value:DisplacementMapFilter(p_value).scaleX});
+				nArray.push({name:"_DisplacementMap_scaleY",		value:DisplacementMapFilter(p_value).scaleY});
+			} else if (p_value is DropShadowFilter) {
+				nArray.push({name:"_DropShadow_alpha",				value:DropShadowFilter(p_value).alpha});
+				nArray.push({name:"_DropShadow_angle",				value:DropShadowFilter(p_value).angle});
+				nArray.push({name:"_DropShadow_blurX",				value:DropShadowFilter(p_value).blurX});
+				nArray.push({name:"_DropShadow_blurY",				value:DropShadowFilter(p_value).blurY});
+				nArray.push({name:"_DropShadow_color",				value:DropShadowFilter(p_value).color});
+				nArray.push({name:"_DropShadow_distance",			value:DropShadowFilter(p_value).distance});
+				nArray.push({name:"_DropShadow_hideObject",			value:DropShadowFilter(p_value).hideObject});
+				nArray.push({name:"_DropShadow_inner",				value:DropShadowFilter(p_value).inner});
+				nArray.push({name:"_DropShadow_knockout",			value:DropShadowFilter(p_value).knockout});
+				nArray.push({name:"_DropShadow_quality",			value:DropShadowFilter(p_value).quality});
+				nArray.push({name:"_DropShadow_strength",			value:DropShadowFilter(p_value).strength});
+			} else if (p_value is GlowFilter) {
+				nArray.push({name:"_Glow_alpha",					value:GlowFilter(p_value).alpha});
+				nArray.push({name:"_Glow_blurX",					value:GlowFilter(p_value).blurX});
+				nArray.push({name:"_Glow_blurY",					value:GlowFilter(p_value).blurY});
+				nArray.push({name:"_Glow_color",					value:GlowFilter(p_value).color});
+				nArray.push({name:"_Glow_inner",					value:GlowFilter(p_value).inner});
+				nArray.push({name:"_Glow_knockout",					value:GlowFilter(p_value).knockout});
+				nArray.push({name:"_Glow_quality",					value:GlowFilter(p_value).quality});
+				nArray.push({name:"_Glow_strength",					value:GlowFilter(p_value).strength});
+			} else if (p_value is GradientBevelFilter) {
+				// .alphas (array)
+				nArray.push({name:"_GradientBevel_angle",			value:GradientBevelFilter(p_value).strength});
+				nArray.push({name:"_GradientBevel_blurX",			value:GradientBevelFilter(p_value).blurX});
+				nArray.push({name:"_GradientBevel_blurY",			value:GradientBevelFilter(p_value).blurY});
+				// .colors (array)
+				nArray.push({name:"_GradientBevel_distance",		value:GradientBevelFilter(p_value).distance});
+				nArray.push({name:"_GradientBevel_quality",			value:GradientBevelFilter(p_value).quality});
+				// .ratios(array)
+				nArray.push({name:"_GradientBevel_strength",		value:GradientBevelFilter(p_value).strength});
+				nArray.push({name:"_GradientBevel_type",			value:GradientBevelFilter(p_value).type});
+			} else if (p_value is GradientGlowFilter) {
+				// .alphas (array)
+				nArray.push({name:"_GradientGlow_angle",			value:GradientGlowFilter(p_value).strength});
+				nArray.push({name:"_GradientGlow_blurX",			value:GradientGlowFilter(p_value).blurX});
+				nArray.push({name:"_GradientGlow_blurY",			value:GradientGlowFilter(p_value).blurY});
+				// .colors (array)
+				nArray.push({name:"_GradientGlow_distance",			value:GradientGlowFilter(p_value).distance});
+				nArray.push({name:"_GradientGlow_knockout",			value:GradientGlowFilter(p_value).knockout});
+				nArray.push({name:"_GradientGlow_quality",			value:GradientGlowFilter(p_value).quality});
+				// .ratios(array)
+				nArray.push({name:"_GradientGlow_strength",			value:GradientGlowFilter(p_value).strength});
+				nArray.push({name:"_GradientGlow_type",				value:GradientGlowFilter(p_value).type});
+			} else {
+				// ?
+				trace ("Tweener FilterShortcuts Error :: Unknown filter class used");
+			}
+			return nArray;
+		}
+
+
+		// ==================================================================================================================================
+		// NORMAL SPECIAL PROPERTY functions ------------------------------------------------------------------------------------------------
+
+		// ----------------------------------------------------------------------------------------------------------------------------------
+		// filters
+
+		/**
+		 * (filters)
+		 * Generic function for the properties of filter objects
+		 */
+		public static function _filter_property_get (p_obj:Object, p_parameters:Array, p_extra:Object = null):Number {
+			var f:Array = p_obj.filters;
+			var i:Number;
+			var filterClass:Object = p_parameters[0];
+			var propertyName:String = p_parameters[1];
+			var splitType:String = p_parameters[2];
+			for (i = 0; i < f.length; i++) {
+				if (f[i] is Class(filterClass)) {
+					if (splitType == "color") {
+						// Composite, color channel
+						var colorComponent:String = p_parameters[3];
+						if (colorComponent == "r") return AuxFunctions.numberToR(f[i][propertyName]);
+						if (colorComponent == "g") return AuxFunctions.numberToG(f[i][propertyName]);
+						if (colorComponent == "b") return AuxFunctions.numberToB(f[i][propertyName]);
+					} else if (splitType == "matrix") {
+						// Composite, some kind of matrix
+						return f[i][propertyName][p_parameters[3]];
+					} else if (splitType == "point") {
+						// Composite, a point
+						return f[i][propertyName][p_parameters[3]];
+					} else {
+						// Standard property
+						return (f[i][propertyName]);
+					}
+				}
+			}
+
+			// No value found for this property - no filter instance found using this class!
+			// Must return default desired values
+			var defaultValues:Object;
+			switch (filterClass) {
+				case BevelFilter:
+					defaultValues = {angle:NaN, blurX:0, blurY:0, distance:0, highlightAlpha:1, highlightColor:NaN, knockout:null, quality:NaN, shadowAlpha:1, shadowColor:NaN, strength:2, type:null};
+					break;
+				case BlurFilter:
+					defaultValues = {blurX:0, blurY:0, quality:NaN};
+					break;
+				case ColorMatrixFilter:
+					defaultValues = {matrix:[1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]};
+					break;
+				case ConvolutionFilter:
+					defaultValues = {alpha:0, bias:0, clamp:null, color:NaN, divisor:1, matrix:[1], matrixX:1, matrixY:1, preserveAlpha:null};
+					break;
+				case DisplacementMapFilter:
+					defaultValues = {alpha:0, color:NaN, componentX:null, componentY:null, mapBitmap:null, mapPoint:null, mode:null, scaleX:0, scaleY:0};
+					break;
+				case DropShadowFilter:
+					defaultValues = {distance:0, angle:NaN, color:NaN, alpha:1, blurX:0, blurY:0, strength:1, quality:NaN, inner:null, knockout:null, hideObject:null};
+					break;
+				case GlowFilter:
+					defaultValues = {alpha:1, blurX:0, blurY:0, color:NaN, inner:null, knockout:null, quality:NaN, strength:2};
+					break;
+				case GradientBevelFilter:
+					defaultValues = {alphas:null, angle:NaN, blurX:0, blurY:0, colors:null, distance:0, knockout:null, quality:NaN, ratios:NaN, strength:1, type:null};
+					break;
+				case GradientGlowFilter:
+					defaultValues = {alphas:null, angle:NaN, blurX:0, blurY:0, colors:null, distance:0, knockout:null, quality:NaN, ratios:NaN, strength:1, type:null};
+					break;
+			}
+			// When returning NaN, the Tweener engine sets the starting value as being the same as the final value (if not found)
+			// When returning null, the Tweener engine doesn't tween it at all, just setting it to the final value
+			// This is DIFFERENT from the default filter applied as default on _filter_property_set because some values shouldn't be tweened
+			if (splitType == "color") {
+				// Composite, color channel; always defaults to target value
+				return NaN;
+			} else if (splitType == "matrix") {
+				// Composite, matrix; always defaults to target value
+				return defaultValues[propertyName][p_parameters[3]];
+			} else if (splitType == "point") {
+				// Composite, point; always defaults to target value
+				return defaultValues[propertyName][p_parameters[3]];
+			} else {
+				// Standard property
+				return defaultValues[propertyName];
+			}
+		}
+
+		public static function _filter_property_set (p_obj:Object, p_value:Number, p_parameters:Array, p_extra:Object = null): void {
+			var f:Array = p_obj.filters;
+			var i:Number;
+			var filterClass:Object = p_parameters[0];
+			var propertyName:String = p_parameters[1];
+			var splitType:String = p_parameters[2];
+			for (i = 0; i < f.length; i++) {
+				if (f[i] is Class(filterClass)) {
+					if (splitType == "color") {
+						// Composite, color channel
+						var colorComponent:String = p_parameters[3];
+						if (colorComponent == "r") f[i][propertyName] = (f[i][propertyName] & 0xffff) | (p_value << 16);
+						if (colorComponent == "g") f[i][propertyName] = (f[i][propertyName] & 0xff00ff) | (p_value << 8);
+						if (colorComponent == "b") f[i][propertyName] = (f[i][propertyName] & 0xffff00) | p_value;
+					} else if (splitType == "matrix") {
+						var mtx:Array = f[i][propertyName];
+						mtx[p_parameters[3]] = p_value;
+						f[i][propertyName] = mtx;
+					} else if (splitType == "point") {
+						var pt:Point = Point(f[i][propertyName]);
+						pt[p_parameters[3]] = p_value;
+						f[i][propertyName] = pt;
+					} else {
+						// Standard property
+						f[i][propertyName] = p_value;
+					}
+					p_obj.filters = f;
+					return;
+				}
+			}
+
+			// The correct filter class wasn't found, so create a new one that is the equivalent of the object without the filter
+			if (f == null) f = new Array();
+			var fi:BitmapFilter;
+			switch (filterClass) {
+				case BevelFilter:
+					fi = new BevelFilter(0, 45, 0xffffff, 1, 0x000000, 1, 0, 0);
+					break;
+				case BlurFilter:
+					fi = new BlurFilter(0, 0);
+					break;
+				case ColorMatrixFilter:
+					fi = new ColorMatrixFilter([1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0]);
+					break;
+				case ConvolutionFilter:
+					fi = new ConvolutionFilter(1, 1, [1], 1, 0, true, true, 0x000000, 0);
+					break;
+				case DisplacementMapFilter:
+					// Doesn't make much sense to create a new empty DisplacementMapFilter if there's nothing to tween
+					fi = new DisplacementMapFilter(new BitmapData(10, 10), new Point(0, 0), 0, 1, 0, 0);
+					break;
+				case DropShadowFilter:
+					fi = new DropShadowFilter(0, 45, 0x000000, 1, 0, 0);
+					break;
+				case GlowFilter:
+					fi = new GlowFilter(0xff0000, 1, 0, 0);
+					break;
+				case GradientBevelFilter:
+					fi = new GradientBevelFilter(0, 45, [0xffffff, 0x000000], [1, 1], [32, 223], 0, 0);
+					break;
+				case GradientGlowFilter:
+					fi = new GradientGlowFilter(0, 45, [0xffffff, 0x000000], [1, 1], [32, 223], 0, 0);
+					break;
+			}
+			//fi[propertyName] = p_value;
+			f.push(fi);
+			p_obj.filters = f;
+			_filter_property_set(p_obj, p_value, p_parameters);
+		}
+
+	}
+
+}

+ 93 - 0
src/class/caurina/transitions/properties/SoundShortcuts.as

@@ -0,0 +1,93 @@
+package caurina.transitions.properties {
+
+	/**
+	 * properties.SoundShortcuts
+	 * List of default special properties for Sounds
+	 * The function names are strange/inverted because it makes for easier debugging (alphabetic order). They're only for internal use (on this class) anyways.
+	 *
+	 * @author		Zeh Fernando, Nate Chatellier, Arthur Debert
+	 * @version		1.0.0
+	 */
+
+	import flash.media.SoundTransform;
+
+	import caurina.transitions.Tweener;
+
+	public class SoundShortcuts {
+
+		/**
+		 * There's no constructor.
+		 */
+		public function SoundShortcuts () {
+			trace ("This is an static class and should not be instantiated.")
+		}
+
+		/**
+		 * Registers all the special properties to the Tweener class, so the Tweener knows what to do with them.
+		 */
+		public static function init():void {
+
+			// Normal properties
+			Tweener.registerSpecialProperty("_sound_volume", _sound_volume_get, _sound_volume_set);
+			Tweener.registerSpecialProperty("_sound_pan", _sound_pan_get, _sound_pan_set);
+
+		}
+
+
+		// ==================================================================================================================================
+		// NORMAL SPECIAL PROPERTY functions ------------------------------------------------------------------------------------------------
+
+		// ----------------------------------------------------------------------------------------------------------------------------------
+		// _sound_volume
+
+		/**
+		 * Returns the current sound volume
+		 *
+		 * @param		p_obj				Object		SoundChannel object
+		 * @return							Number		The current volume
+		 */
+		public static function _sound_volume_get (p_obj:Object, p_parameters:Array, p_extra:Object = null):Number {
+			return p_obj.soundTransform.volume;
+		}
+
+		/**
+		 * Sets the sound volume
+		 *
+		 * @param		p_obj				Object		SoundChannel object
+		 * @param		p_value				Number		New volume
+		 */
+		public static function _sound_volume_set (p_obj:Object, p_value:Number, p_parameters:Array, p_extra:Object = null):void {
+			var sndTransform:SoundTransform = p_obj.soundTransform;
+			sndTransform.volume = p_value;
+			p_obj.soundTransform = sndTransform;
+		}
+
+
+		// ----------------------------------------------------------------------------------------------------------------------------------
+		// _sound_pan
+
+		/**
+		 * Returns the current sound pan
+		 *
+		 * @param		p_obj				Object		SoundChannel object
+		 * @return							Number		The current pan
+		 */
+		public static function _sound_pan_get (p_obj:Object, p_parameters:Array, p_extra:Object = null):Number {
+			return p_obj.soundTransform.pan;
+		}
+
+		/**
+		 * Sets the sound volume
+		 *
+		 * @param		p_obj				Object		SoundChannel object
+		 * @param		p_value				Number		New pan
+		 */
+		public static function _sound_pan_set (p_obj:Object, p_value:Number, p_parameters:Array, p_extra:Object = null):void {
+			var sndTransform:SoundTransform = p_obj.soundTransform;
+			sndTransform.pan = p_value;
+			p_obj.soundTransform = sndTransform;
+		}
+
+	}
+
+}

+ 157 - 0
src/class/caurina/transitions/properties/TextShortcuts.as

@@ -0,0 +1,157 @@
+package caurina.transitions.properties {
+
+	/**
+	 * properties.TextShortcuts
+	 * Special properties for the Tweener class to handle MovieClip filters
+	 * The function names are strange/inverted because it makes for easier debugging (alphabetic order). They're only for internal use (on this class) anyways.
+	 *
+	 * @author		Zeh Fernando, Nate Chatellier, Arthur Debert
+	 * @version		1.0.0
+	 */
+
+	import caurina.transitions.Tweener;
+	import caurina.transitions.AuxFunctions;
+
+	import flash.text.TextFormat;
+
+	public class TextShortcuts {
+
+		/**
+		 * There's no constructor.
+		 */
+		public function TextShortcuts () {
+			trace ("This is an static class and should not be instantiated.")
+		}
+
+		/**
+		 * Registers all the special properties to the Tweener class, so the Tweener knows what to do with them.
+		 */
+		public static function init(): void {
+			// Normal properties
+			Tweener.registerSpecialProperty("_text", _text_get, _text_set, null, _text_preProcess);
+	//		Tweener.registerSpecialPropertyModifier("_text", _text_modifier, _text_get);
+
+			// TextFormat-based properties
+			Tweener.registerSpecialPropertySplitter("_text_color",		_generic_color_splitter, ["_text_color_r", "_text_color_g", "_text_color_b"]);
+			Tweener.registerSpecialProperty("_text_color_r",			_textFormat_property_get,	_textFormat_property_set,	["color", true, "r"]);
+			Tweener.registerSpecialProperty("_text_color_g",			_textFormat_property_get,	_textFormat_property_set,	["color", true, "g"]);
+			Tweener.registerSpecialProperty("_text_color_b",			_textFormat_property_get,	_textFormat_property_set,	["color", true, "b"]);
+			Tweener.registerSpecialProperty("_text_indent",				_textFormat_property_get,	_textFormat_property_set,	["indent"]);
+			Tweener.registerSpecialProperty("_text_leading",			_textFormat_property_get,	_textFormat_property_set,	["leading"]);
+			Tweener.registerSpecialProperty("_text_leftMargin",			_textFormat_property_get,	_textFormat_property_set,	["leftMargin"]);
+			Tweener.registerSpecialProperty("_text_letterSpacing",		_textFormat_property_get,	_textFormat_property_set,	["letterSpacing"]);
+			Tweener.registerSpecialProperty("_text_rightMargin",		_textFormat_property_get,	_textFormat_property_set,	["rightMargin"]);
+			Tweener.registerSpecialProperty("_text_size",				_textFormat_property_get,	_textFormat_property_set,	["size"]);
+
+		}
+
+
+		// ==================================================================================================================================
+		// NORMAL SPECIAL PROPERTY functions ------------------------------------------------------------------------------------------------
+
+		// ----------------------------------------------------------------------------------------------------------------------------------
+		// _text
+
+		/**
+		 * Returns the current frame number from the movieclip timeline
+		 *
+		 * @param		p_obj				Object		MovieClip object
+		 * @return							Number		The current frame
+		 */
+		public static function _text_get (p_obj:Object, p_parameters:Array, p_extra:Object = null):Number {
+			//return p_obj._currentFrame;
+			return -p_obj.text.length;
+		}
+
+		/**
+		 * Sets the timeline frame
+		 *
+		 * @param		p_obj				Object		MovieClip object
+		 * @param		p_value				Number		New frame number
+		 */
+		public static function _text_set (p_obj:Object, p_value:Number, p_parameters:Array, p_extra:Object = null): void {
+			//p_obj.gotoAndStop(Math.round(p_value));
+			//p_obj.text =
+			if (p_value < 0) {
+				// Old text
+				p_obj.text = p_extra.oldText.substr(0, -Math.round(p_value));
+			} else {
+				// New text
+				p_obj.text = p_extra.newText.substr(0, Math.round(p_value));
+			}
+		}
+
+		public static function _text_preProcess (p_obj:Object, p_parameters:Array, p_originalValueComplete:Object, p_extra:Object): Number {
+			p_extra.oldText = p_obj.text;
+			p_extra.newText = p_originalValueComplete;
+			return p_extra.newText.length;
+		}
+
+		// ==================================================================================================================================
+		// PROPERTY GROUPING/SPLITTING functions --------------------------------------------------------------------------------------------
+
+		// ----------------------------------------------------------------------------------------------------------------------------------
+		// generic splitters
+
+		/**
+		 * A generic color splitter - from 0xrrggbb to r, g, b with the name of the parameters passed
+		 *
+		 * @param		p_value				Number		The original _color value
+		 * @return							Array		An array containing the .name and .value of all new properties
+		 */
+		public static function _generic_color_splitter (p_value:Number, p_parameters:Array):Array {
+			var nArray:Array = new Array();
+			nArray.push({name:p_parameters[0], value:AuxFunctions.numberToR(p_value)});
+			nArray.push({name:p_parameters[1], value:AuxFunctions.numberToG(p_value)});
+			nArray.push({name:p_parameters[2], value:AuxFunctions.numberToB(p_value)});
+			return nArray;
+		}
+
+
+		// ==================================================================================================================================
+		// NORMAL SPECIAL PROPERTY functions ------------------------------------------------------------------------------------------------
+
+		/**
+		 * Generic function for the textformat properties
+		 */
+		public static function _textFormat_property_get (p_obj:Object, p_parameters:Array, p_extra:Object = null):Number {
+			var fmt:TextFormat = p_obj.getTextFormat();
+			var propertyName:String = p_parameters[0];
+			var isColor:Boolean = p_parameters[1];
+			if (!isColor) {
+				// Standard property
+				return (fmt[propertyName]);
+			} else {
+				// Composite, color channel
+				var colorComponent:String = p_parameters[2];
+				if (colorComponent == "r") return AuxFunctions.numberToR(fmt[propertyName]);
+				if (colorComponent == "g") return AuxFunctions.numberToG(fmt[propertyName]);
+				if (colorComponent == "b") return AuxFunctions.numberToB(fmt[propertyName]);
+			}
+
+			return NaN;
+		}
+
+		public static function _textFormat_property_set (p_obj:Object, p_value:Number, p_parameters:Array, p_extra:Object = null): void {
+			var fmt:TextFormat = p_obj.getTextFormat();
+			var propertyName:String = p_parameters[0];
+			var isColor:Boolean = p_parameters[1];
+			if (!isColor) {
+				// Standard property
+				fmt[propertyName] = p_value;
+			} else {
+				// Composite, color channel
+				var colorComponent:String = p_parameters[2];
+				if (colorComponent == "r") fmt[propertyName] = (fmt[propertyName] & 0xffff) | (p_value << 16);
+				if (colorComponent == "g") fmt[propertyName] = (fmt[propertyName] & 0xff00ff) | (p_value << 8);
+				if (colorComponent == "b") fmt[propertyName] = (fmt[propertyName] & 0xffff00) | p_value;
+			}
+			
+			p_obj.defaultTextFormat = fmt;
+			p_obj.setTextFormat(fmt);
+
+		}
+
+	}
+
+}

+ 98 - 0
src/class/com/adobe/air/logging/FileTarget.as

@@ -0,0 +1,98 @@
+/*
+  Copyright (c) 2008, Adobe Systems Incorporated
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without 
+  modification, are permitted provided that the following conditions are
+  met:
+
+  * Redistributions of source code must retain the above copyright notice, 
+    this list of conditions and the following disclaimer.
+  
+  * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the 
+    documentation and/or other materials provided with the distribution.
+  
+  * Neither the name of Adobe Systems Incorporated nor the names of its 
+    contributors may be used to endorse or promote products derived from 
+    this software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+package com.adobe.air.logging
+{
+	import mx.logging.AbstractTarget;
+	import flash.filesystem.File;
+	import flash.filesystem.FileStream;
+	import flash.filesystem.FileMode;
+	import mx.logging.LogEvent;
+	import flash.system.System;
+	import flash.system.Capabilities;
+	import mx.logging.targets.LineFormattedTarget;
+	import mx.core.mx_internal;
+	
+	use namespace mx_internal;
+
+	/**
+	 * An Adobe AIR only class that provides a log target for the Flex logging
+	 * framework, that logs files to a file on the user's system.
+	 * 
+	 * This class will only work when running within Adobe AIR>
+	 */
+	public class FileTarget extends LineFormattedTarget
+	{
+		private const DEFAULT_LOG_PATH:String = "app-storage:/application.log";
+		
+		private var log:File;
+		
+		public function FileTarget(logFile:File = null)
+		{
+			if(logFile != null)
+			{
+				log = logFile;
+			}
+			else
+			{
+				log = new File(DEFAULT_LOG_PATH);
+			}
+		}
+		
+		public function get logURI():String
+		{
+			return log.url;
+		}
+		
+		mx_internal override function internalLog(message:String):void
+	    {
+			write(message);
+	    }		
+		
+		private function write(msg:String):void
+		{		
+			var fs:FileStream = new FileStream();
+				fs.open(log, FileMode.APPEND);
+				fs.writeUTFBytes(msg + "\n");
+				fs.close();
+		}	
+		
+		public function clear():void
+		{
+			var fs:FileStream = new FileStream();
+				fs.open(log, FileMode.WRITE);
+				fs.writeUTFBytes("");
+				fs.close();			
+		}
+		
+	}
+}

+ 127 - 0
src/class/com/adobe/crypto/HMAC.as

@@ -0,0 +1,127 @@
+/*
+  Copyright (c) 2008, Adobe Systems Incorporated
+  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without 
+  modification, are permitted provided that the following conditions are
+  met:
+
+  * Redistributions of source code must retain the above copyright notice, 
+    this list of conditions and the following disclaimer.
+  
+  * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the 
+    documentation and/or other materials provided with the distribution.
+  
+  * Neither the name of Adobe Systems Incorporated nor the names of its 
+    contributors may be used to endorse or promote products derived from 
+    this software without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+  IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
+  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+  LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+package com.adobe.crypto {
+	import flash.utils.ByteArray;
+	import flash.utils.Endian;
+	import flash.utils.describeType;
+	/**
+	 * Keyed-Hashing for Message Authentication
+	 * Implementation based on algorithm description at 
+	 * http://www.faqs.org/rfcs/rfc2104.html
+	 */
+	public class HMAC 
+	{
+		/**
+		 * Performs the HMAC hash algorithm using byte arrays.
+		 *
+		 * @param secret The secret key
+		 * @param message The message to hash
+		 * @param algorithm Hash object to use
+		 * @return A string containing the hash value of message
+		 * @langversion ActionScript 3.0
+		 * @playerversion Flash 8.5
+		 * @tiptext
+		 */
+		public static function hash( secret:String, message:String, algorithm:Object = null ):String
+		{
+			var text:ByteArray = new ByteArray();
+			var k_secret:ByteArray = new ByteArray();
+			
+			text.writeUTFBytes(message);
+			k_secret.writeUTFBytes(secret);
+			
+			return hashBytes(k_secret, text, algorithm);
+		}
+		
+		/**
+		 * Performs the HMAC hash algorithm using string.
+		 *
+		 * @param secret The secret key
+		 * @param message The message to hash
+		 * @param algorithm Hash object to use
+		 * @return A string containing the hash value of message
+		 * @langversion ActionScript 3.0
+		 * @playerversion Flash 8.5
+		 * @tiptext
+		 */
+		public static function hashBytes( secret:ByteArray, message:ByteArray, algorithm:Object = null ):String
+		{
+			var ipad:ByteArray = new ByteArray();
+			var opad:ByteArray = new ByteArray();
+			var endian:String = Endian.BIG_ENDIAN;
+			
+			if(algorithm == null){
+				algorithm = MD5;
+			}
+			
+			if ( describeType(algorithm).@name.toString() == "com.adobe.crypto::MD5" ) {
+				endian = Endian.LITTLE_ENDIAN;
+			}
+			
+			if ( secret.length > 64 ) {
+				algorithm.hashBytes(secret);
+				secret = new ByteArray();
+				secret.endian = endian;
+				
+				while ( algorithm.digest.bytesAvailable != 0 ) {
+					secret.writeInt(algorithm.digest.readInt());
+				}
+			}
+
+			secret.length = 64
+			secret.position = 0;
+			for ( var x:int = 0; x < 64; x++ ) {
+				var byte:int = secret.readByte();
+				ipad.writeByte(0x36 ^ byte);
+				opad.writeByte(0x5c ^ byte);
+			}
+			
+			ipad.writeBytes(message);
+			algorithm.hashBytes(ipad);
+			var tmp:ByteArray = new ByteArray();
+			tmp.endian = endian;	
+			
+			while ( algorithm.digest.bytesAvailable != 0 ) {
+				tmp.writeInt(algorithm.digest.readInt());
+			}
+			tmp.position = 0;
+			
+			while ( tmp.bytesAvailable != 0 ) {
+				opad.writeByte(tmp.readUnsignedByte());
+			}
+			return algorithm.hashBytes( opad );
+		}
+		
+	}
+	
+}

+ 0 - 0
src/class/com/adobe/crypto/MD5.as


Some files were not shown because too many files changed in this diff