Actionscript is truly messing with my head.
PLEASE PLEASE someone have a look at the below code and tell me why the onMotionFinished event handler does not load the function?if i comment out the line, the code works, but I need the timing of the onMotionFinished. what am i missing?!
// Declare Variables
var contentVariable:Number = 0; // Navigation Tool
var enterText_tween:Object; // Listener
trace(contentVariable);
// Import Tween Classes
import mx.transitions.Tween;
import mx.transitions.easing.*;
// Ensure Flash doesn’t scale it’s content
Stage.scaleMode = "noScale";
// Ensure Flash always puts the stage in top left corner
Stage.align = "CC";
//--------------------
//** FUNCTIONS **//
//--------------------
//--------------------
//** Playback **//
//--------------------
// Place Logo Clip
this.attachMovie("salmanLogo_mc", "salmanLogo_mc", this.getNextHighestDepth(), {_x:75, _y:50, _xscale:75, _yscale:75});
// Place Intro Text
this.attachMovie("enterText_mc", "enterText_mc", this.getNextHighestDepth(), {_x:450, _y:315, _alpha:0});
this.enterText_tween = new Tween(this.enterText_mc, "_x", Strong.easeInOut, 550, 450, 7, true);
new Tween(this.enterText_mc, "_alpha", Strong.easeInOut, 0, 80, 5, true);
// Place Enter Button
this.enterText_tween.onMotionFinished = function () {
this.attachMovie("enterButton_mc", "enterButton_mc", this.getNextHighestDepth(), {_x:450, _y:385, _alpha:0});
new Tween(this.enterButton_mc, "_alpha", Regular.easeInOut, 0, 100, 2, true);
}