	
PENGUIN Readme

Penguin includes Flash classes to capture mobile device rotation and translation
Penguin comes with a Tilt Emulator that writes TiltML (http://tiltml.wordpress.com)
http://penguinsflash.wordpress.com
Written by Inventor Dan Zen
http://www.danzen.com

~~~~~~~~~~~~~~
Penguin is open source and free to use
If you are using Penguin for commercial purposes please consider donating
Look for the Karatja links on the site for happy donating ;-)

~~~~~~~~~~~~~~

Read the comments in the sample .as files in the samples/samples/ folder

and the Penguin.as file in the com/danzen/interfaces/ folder

There are two other versions of Penguin - PenguinPop and PenguinCuddle

These let you use the emulator in a pop up window and in the same swf file

In the samples there is a concise explanation on how to install classes and use Penguin

The section below is for those who have not used classes or not used classes often

--------
CLASSES
--------

Classes are what objects are made from in Object Oriented Programming (OOP).
Pretty well everything is made from a class - numbers, strings, dates, movieclips, etc.
Many classes are provided by Flash (Adobe) but we can also make our own "custom" classes 
Classes are stored in text files with the .as extension
Classes are organized in folders and we call these folders "packages"
Each FLA has what is called a document class that gets run when the swf starts
You can specify the document class in the properties panel when you click on the stage. 
The document class should NOT be one of the Dan Zen provided classes.  
See the provided FLA's for examples of document classes.  
You need will need to import any provided Dan Zen classes into your document class
Please see http://www.flickr.com/photos/danzen/1382459629/ at full size for visual reference.
See below for a recommended installation

--------
HOW TO INSTALL CUSTOM CLASSES
--------

A "class path" is how classes are located in Flash
you should make a folder called "classes" in a generic location on the computer
"generic" means do not put the classes folder in the same folder as a specific project
once you have made the classes folder - for example c:\classes then add the folder to the class path
like so: from the top Flash menu choose Edit > Preferences > ActionScript - ActionScript 3 Settings 
then use the + sign for the source path box to add the path to your classes folder

people who distribute classes often use the reverse domain technique
this allows you to put many people's classes in your classes folder without overwriting other classes
com/danzen is how Dan Zen distributes classes		
so you should have a com folder in your classes folder and a danzen folder in the com folder
folders that contain classes are called packages so com is a package and danzen is a package
danzen distributes classes in a variety of packages like utilities, effects, interfaces, etc.
any further packages like these should also be added to the danzen package 
inside these are the classes (with .as extensions)

--------
HOW TO USE CLASSES IN YOUR DOCUMENT CLASS
--------

The samples show you how to set up a document class that calls the provided class
the document class is the class that gets called when you test or publish your FLA
the document class starts with a package declaration as its first line
just inside that you need to import com.danzen.packagename.ClassName; along with other classes you use
next, there is a class definition and inside that is a constructor method that gets run first
in your constructor (or some other method), you create a new object from the provided class like so:
var myObject:ClassName = new ClassName(); replacing ClassName with the provided class
if you need access to your class in more than one method then you can set a property on the class
just above your constructor you declare your property:
private var myObject:ClassName;
and in your constructor (or some other method), you assign your new object to the property:
myObject = new ClassName();
follow the examples for specific usage as some classes require parameters (extra information)

Consider taking interactive multimedia at Sheridan if you want to learn all this ;-)

http://imm.sheridanc.on.ca
http://interactivemultimedia.wordpress.com

All the best,


Dan Zen
http://www.danzen.com
http://danzen.wordpress.com

mad inventor
meets internet
finds peace
