Skip to content

unic8 Studios

Documentations Tutorials FAQs Links Advanced search
EnglishGerman
Advertisement
You are here: Home arrow Documentations arrow Scaena - Documentation arrow 2. Variables
2. Variables
Wednesday, 12 September 2007
NOTE: This article is under development!

General data types

Flash is able to handle some general data types which are mentioned in the online documentation.

E4X linking

ECMAScript for XML (E4X) is a new feature of ActionScript 3 and can also be used to resolve parameters which are defined by the setup section of the timeline script . These can be accessed by XML links.

Example 

<!--
Get width and height of the 3D scene and assign it to a 3D object
-->
<object name="plane1" width="[scene.@width]" height="[scene.@height]" ... />

<!--
Move a 3D object to the left end of the 3D scene
-->
<tween>
  <object name="plane1">
    <end x="-[scene.@width]"/>
  </object>
</tween>

MathParser 

The built-in parser for basic mathematics is able to process the following calculations:

  • add
  • substract
  • mutiply
  • divide
With these abilities you can combine variables from above mentioned E4X linking and also add your custom calculations. The parser is also able to do mutiple calculations at once and also with considering brackets.

Example 

<!--
Get width and height of the 3D scene and assign it to a 3D object with 50% of the original values
-->
<object name="plane1" width="[scene.@width]/2" height="[scene.@height]/2" ... />
 
< Prev   Next >

Support us

Through our partner cafepress.com we sell several clothes and more with our brand so called U8 web wear. With each purchase you get a unique product and support our work. Thanks!


Support This Site