Skip to content
February 6, 2013 / Danii Oliver

Naming multiple instances and arguments in For Loop

This is the syntax for when you want to tell multiple instances to do the same thing but you don’t want to have to type the commands one by one.
With this setup you can just tell it once all you want it to do then stick in a for loop and it will run as many times as there are instances named and specified

for(var i:uint=0;i<4;i++){

In Robotlegs if you are building a Flash Professional your syntax will be a bit different.
For instance if the items you are trying to target are within an Injected class you must create your naming string first and replace “this’ with the [Inject] public var name then the created string inside the brackets not concatenation  It will be more like you a writing in the form of KEY[VALUE].property = or KEY[VALUE].method().

var table:String;
var hover:String;

for (var i:uint = 0; i < 5; i++)
table = “table” + i;
hover = “coverHover” + i
view[table].buttonMode = true;
view[table].addEventListener( MouseEvent.MOUSE_DOWN, liftCover, false, 0, true );

view[hover].visible = false;
view[table].addEventListener( MouseEvent.MOUSE_OVER, hoverCover, false, 0, true );
view[table].addEventListener( MouseEvent.MOUSE_OUT, offCover, false, 0, true );

October 5, 2015 / Danii Oliver

Working with Web Audio API post not yet completed

Building Standard and Complex Functionalities

(that do not exist)

In the event of not having a built in API method, a developer needs to use the tools she has to create what we call a hack. A work around to piece together various parts that will give us a desired outcome.

Building the following Functionality with the Web Audio API

Stop Play Pause   [ See the Code >> ](Coming Soon)

Audio Channel Splitting  [ See the Code >> ](Coming Soon)

Audio Channel Swapping  [ See the Code >> ](Coming Soon)

October 5, 2015 / Danii Oliver

Starting with Web Audio API

With the use of crossfading through the Web Audio API and a single video file I will be creating an interactive experience that brings a little bit of magic to tablet devices with the touch of your finger. My goal is to swap between to separate Audio Visual assets in an extremely seamless way.

Further reading on the Web Audio API here.

Getting Started:


Initialize an AudioContext. Only one is needed and will serve the needs of multiple audio files and actions.

var context;
window.addEventListener('load', init, false);
function init() {
  try {
    // Fix up for prefixing
    window.AudioContext = window.AudioContext||window.webkitAudioContext;
    context = new AudioContext();
  catch(e) {
    alert('Web Audio API is not supported in this browser');

or simply

window.AudioContext = window.AudioContext || window.webkitAudioContext;
var context = new AudioContext();


We have to create connections like connecting wires to an amplifier or sender to receiver one by one.

Create and AudioContext
Give the AudioContext buffered content to create a full SOURCE
Connect the SOURCE to the GAIN
Connect GAIN to OUTPUT for Simple Audio





I will be documenting my high level tasks for the purpose of understanding but these things will not need to be done as a library with everything in place will be the outcome of all of this.

If you wish to understand it all read the next posts [ Read On >> ]

If you wish to dive in and only want to implement this one functionality without improving on it [ Skip Ahead >> (Coming Soon) ]

September 21, 2015 / Danii Oliver

On-Boarding to ReactJS

Terminal: npm – -version
(if no version number)
Install nodes from
(will install node and npm at root down)
(( if VM or Virtual Box is needed speak with an expert ))

Go to … and add each to your chrome

Go to Facebook REPO for react scripts needed

Go To … to learn about React-Tools

Install react tools directly to working directory by navigating to working directory in Terminals or type cd and drag directly to the command line.

Once in directory type:
sudo npm install -g react-tools
enter password
npm build for react which transforms the JSX is now installed.

To build when ready for deployment type
jsx src/ build/ (( or jsx the top of the directory with the JSX javascript the build/))

!!! During Development use
in head tags to use browser transformer to test. build/ when ready to deploy.


Click here to download the full text and the html with script tags >> react-environment-setup

JSX reference

*To view development renderings view exclusively in Firefox!!

Click here to download the full text and the html with script tags >> react-environment-setup

June 11, 2013 / Danii Oliver

Video Streaming Content Protection – FMS

FMS – Flash Media Server Allows for the protection of media content in different ways.

What this means is that content will be secure from caching on users computer, time limits on playback.

Setup is as follows:

All media needs to be added to the FMS applications/vod/media directory
All manifests need to me added to the webroot/vod directory

If RTMP Protected Streaming
to play the FLV files and have them stream the FLVs need a link like this:

to play the F4V files and have them stream the F4Vs need a link like this:

For Dynamic Bitrate
use the manifest files in the url

If HDS or httpDynamicStreaming (Open Source never blocked)
((this is for live video fragmenting))
9(this is the streaming path)0

If these methods are not possible they may use

March 20, 2013 / Danii Oliver

Constructor – Object Oriented Analysis and Design


Constructors initialize. You can have more than one constructor this is overloading the constructor.
class Inkjet {
public Inkjet(){…}

public Inkjet(int red, int blue, int green){…}

*with signatures the name of the arg fields is not important it is the type and order

If constructor is public…
Inkjet p = new Inkjet(); ← constructor must be public for this to work

If constructor is private, you can not instantiate the class from outside the class.
The class can only instantiate itself! → [see static Methods to make sense of this]

If the constructor is protected it means that it is expected to be instantiated in the subclass.

March 18, 2013 / Danii Oliver

Overriding – Object Oriented Analysis and Design


Overriding Purpose to redefine a method that is in the superclass in order to have the subclass version be the one that runs.

  • Can only override public and protected.
  • CAN NOT be private, the subclass will not see it.
  • Return type must match and so must the signature.

If class Printer has a method Print(), the class Inkjet can’t output a better version of Print() if it is using the superclass defined Print() method.

If you want to make the Print() method better or different you would define your own Print() method in class Inkjet.
! →  Simply creating another method named print inside class Inkjet then creating an object pointer /reference Printer p = new Inkjet() then calling p.print(); will still call the class Printer’s Print() method.

class Output {

public doPrint(Printer p){

p.Print(); ← this does not happen by default to be the object type


*this is good because you will never have to change this code for any subclass of printer used

But if you override the Print() method in Inkjet and you point to an Inkjet
Class Printer {
public void print(){…}

Class Inkjet: Printer{
override public public void print(){…}
**Polymorphism will work in your favor here if you want the method in the subclass

How to get the method of the subclass?

Override – tells the compiler don’t pay attention to the type of reference PAY ATTENTION to the type of object!

  • Overriding needs two classes the Superclass and a Subclass.
  • The signatures need to be the same – name, arguments and return type.

**You can not override a PRIVATE method.
Overriding protected can only be used inside subclass. You cannot call a protected method in the outside class that instantiates an object of the subclass

The value of overriding is that you will be able to call the method of a subclass over the same method of it’s superclass

  • You want to do this if you are enhancing or changing the functionality of a subclass’s method.
  • Redefine = Override

Enhancing not Changing with private fields

If you want to call the parent method and improve it you would call the super.Method
or base.Method

class Inkjet {
public void Print{



*Super means you don’t have to rewrite the original code that you still need.
*Here you are only calling one public or protected method from inside a superclass.


public virtual void Print() {…} → Flags the superclass method to be possibly overridden. You don’t have to override but you can if you want to. You must use the virtual keyword for Polymorphism to work.

March 14, 2013 / Danii Oliver

Overloading – Object Oriented Analysis and Design


Signature of a method is the name of the method plus the order and type of the arguments.

  • return type is not a signature.
  • with signatures the name of the arg fields is not important it is the type and order.
  • overloading is just reusing the name and changing the args for a unique signature.
  • order and type have to be different
  • does not take return type into consideration. If the return types are different… you will get a compiler error

Class A {
public void foo(int a){…}

public void foo(char b){…}

public void foo(int a, char b){…}

public void foo(char b, int a){…}

public void foo(string b, string a){…}

This is syntactical sugar! It doesn’t improve anything about the program all it does is allow the programmer to not have to remember another method name, all they have to do is set the arguments she wants to set.

*Overloading can only happen inside a class. Feature point the order and type of the arguments must differ for each method.

Have to be in place :

  • must be within one class
  • keep name change order and type of arguments
  • has nothing to do with return types

“Superclass Methods” can be overloaded within a Subclass

Class Printer {
public string print(int x){…}

Class Laser : Printer{
→ STILL HAS ← public string print(int x){…}
public string print(char y){…}

++Overloading and Overloading are NOT related

+++This is not possible in AS3.


Get every new post delivered to your Inbox.

Join 201 other followers

%d bloggers like this: