Web Site

The web site is now live at www.vedamatics.com
Showing posts with label Code. Show all posts
Showing posts with label Code. Show all posts

Friday, March 18, 2011

xml buttons for quiz

Having a dynamic textfield for the XML data interfered with the button below.


Solution 1: Creating a mask on top of the dynamic text field.
Problem: The button animation wouldn't play.


Solution 2: Insert the dynamic fields into the button and alter the code accordingly.
Problem: This method was giving errors and the XML data could not find the text fields.


Solution 3: disable the mouse option for the test fields
theText.mouseEnabled = false;

It works!

Monday, February 7, 2011

Working Code - Main.fla

What works:



stop();

import com.greensock.*;
import com.greensock.easing.*;

//import the tween styles
import fl.transitions.Tween;
import fl.transitions.easing.*;

Tuesday, October 5, 2010

Trigonometry for animation

Computers have a lot more affinity to radians
1 radian = 57.2958 degrees

6.2832 radians = 360 degrees

π = 3.1416

2π = 6.2832 radians = 360 degrees

360° = 2π
180° = π
90° = π/2

Rotation property of a sprite / movie clip is measured in degrees
Radians for angle
Degrees for rotation

Formula
radians = degrees*Math.PI/180
degrees = radians*180/Math.PI